diff --git a/eng/Packages.Data.props b/eng/Packages.Data.props index 0f2e825dfc19..1395d0b59b9c 100644 --- a/eng/Packages.Data.props +++ b/eng/Packages.Data.props @@ -227,7 +227,7 @@ All should have PrivateAssets="All" set so they don't become package dependencies --> - + diff --git a/eng/emitter-package-lock.json b/eng/emitter-package-lock.json index a5a1738beac4..cf56a6b135af 100644 --- a/eng/emitter-package-lock.json +++ b/eng/emitter-package-lock.json @@ -5,64 +5,64 @@ "packages": { "": { "dependencies": { - "@azure-tools/typespec-csharp": "0.2.0-beta.20240914.1" + "@azure-tools/typespec-csharp": "0.2.0-beta.20240920.1" }, "devDependencies": { - "@azure-tools/typespec-autorest": "0.45.0", - "@azure-tools/typespec-azure-core": "0.45.0", - "@azure-tools/typespec-azure-resource-manager": "0.45.0", - "@azure-tools/typespec-azure-rulesets": "0.45.0", - "@azure-tools/typespec-client-generator-core": "0.45.3", - "@typespec/compiler": "0.59.0", - "@typespec/http": "0.59.0", - "@typespec/openapi": "0.59.0", - "@typespec/rest": "0.59.0", - "@typespec/versioning": "0.59.0", - "@typespec/xml": "0.59.0" + "@azure-tools/typespec-autorest": "0.46.0", + "@azure-tools/typespec-azure-core": "0.46.0", + "@azure-tools/typespec-azure-resource-manager": "0.46.0", + "@azure-tools/typespec-azure-rulesets": "0.46.0", + "@azure-tools/typespec-client-generator-core": "0.46.0", + "@typespec/compiler": "0.60.0", + "@typespec/http": "0.60.0", + "@typespec/openapi": "0.60.0", + "@typespec/rest": "0.60.0", + "@typespec/versioning": "0.60.0", + "@typespec/xml": "0.60.0" } }, "node_modules/@autorest/csharp": { - "version": "3.0.0-beta.20240914.1", - "resolved": "https://registry.npmjs.org/@autorest/csharp/-/csharp-3.0.0-beta.20240914.1.tgz", - "integrity": "sha512-3Ee8wPHWSVs9HyD0U+iu6ANJAaE1g9B1VypeAzkTP5JDfrJ5ACCNGQJXmUQ3rRqfDG+hvdYhoFEVWEz4XP9TyA==" + "version": "3.0.0-beta.20240920.1", + "resolved": "https://registry.npmjs.org/@autorest/csharp/-/csharp-3.0.0-beta.20240920.1.tgz", + "integrity": "sha512-Irefdf9G5PKkeBpjwRg0hnJE+gp6uPmNZJfOikBW2xYYAin5Gfq9uZfkPiP76+tnrPyMg+7DwGNNVNauyGEg8Q==" }, "node_modules/@azure-tools/typespec-autorest": { - "version": "0.45.0", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-autorest/-/typespec-autorest-0.45.0.tgz", - "integrity": "sha512-6ycZ0bEfXC0U26FHHEt9smAhxh78SACIDY+u7zLAopRzmxjTuthDdGgYSShuRDu3J+vEBi1fOKpz4cYQkgRkBQ==", + "version": "0.46.0", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-autorest/-/typespec-autorest-0.46.0.tgz", + "integrity": "sha512-LCIvxQgjczWUq/wi6fzKBqYHWJYD0hRLA8wBPzFasriHdBDHjpZ6vgTPmApzt0H5ArZX92Ar53Q5+ZXD9ktMUg==", "dev": true, "engines": { "node": ">=18.0.0" }, "peerDependencies": { - "@azure-tools/typespec-azure-core": "~0.45.0", - "@azure-tools/typespec-azure-resource-manager": "~0.45.0", - "@azure-tools/typespec-client-generator-core": "~0.45.0", - "@typespec/compiler": "~0.59.0", - "@typespec/http": "~0.59.0", - "@typespec/openapi": "~0.59.0", - "@typespec/rest": "~0.59.0", - "@typespec/versioning": "~0.59.0" + "@azure-tools/typespec-azure-core": "~0.46.0", + "@azure-tools/typespec-azure-resource-manager": "~0.46.0", + "@azure-tools/typespec-client-generator-core": "~0.46.0", + "@typespec/compiler": "~0.60.0", + "@typespec/http": "~0.60.0", + "@typespec/openapi": "~0.60.0", + "@typespec/rest": "~0.60.0", + "@typespec/versioning": "~0.60.0" } }, "node_modules/@azure-tools/typespec-azure-core": { - "version": "0.45.0", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-core/-/typespec-azure-core-0.45.0.tgz", - "integrity": "sha512-GycGMCmaIVSN+TftPtlPJLyeOrglbLmH08ZiZaVMjSih/TQEJM21RGR6d8QdjlkQWN61ntNDRD+RP2uv9tHmqw==", + "version": "0.46.0", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-core/-/typespec-azure-core-0.46.0.tgz", + "integrity": "sha512-BNE31enSHWtWlrdIKShBS6CNFGk3OYmHSBnWqobcFJkTGXC090EoV2u6otn4BMI99fZRSR4gpwp/kYU9KLE9Jw==", "dev": true, "engines": { "node": ">=18.0.0" }, "peerDependencies": { - "@typespec/compiler": "~0.59.0", - "@typespec/http": "~0.59.0", - "@typespec/rest": "~0.59.0" + "@typespec/compiler": "~0.60.0", + "@typespec/http": "~0.60.0", + "@typespec/rest": "~0.60.0" } }, "node_modules/@azure-tools/typespec-azure-resource-manager": { - "version": "0.45.0", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-resource-manager/-/typespec-azure-resource-manager-0.45.0.tgz", - "integrity": "sha512-PdhB03P8PoOlUoUWd+CF5WipGzu2Q3ZjT0EAzgQe878DmXvxMq+zYaPJQtvkq9R6jCxFauDSr5gG7Yd4NINAuA==", + "version": "0.46.0", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-resource-manager/-/typespec-azure-resource-manager-0.46.0.tgz", + "integrity": "sha512-ileS/0OMp0pmtWU3k0g2ZGfA957nOiEHtFJzAILsYYBFeBWgWuEuCPcKaGYScvlYTTK4Pyplpb7u00RBZBBObQ==", "dev": true, "dependencies": { "change-case": "~5.4.4", @@ -72,33 +72,33 @@ "node": ">=18.0.0" }, "peerDependencies": { - "@azure-tools/typespec-azure-core": "~0.45.0", - "@typespec/compiler": "~0.59.0", - "@typespec/http": "~0.59.0", - "@typespec/openapi": "~0.59.0", - "@typespec/rest": "~0.59.0", - "@typespec/versioning": "~0.59.0" + "@azure-tools/typespec-azure-core": "~0.46.0", + "@typespec/compiler": "~0.60.0", + "@typespec/http": "~0.60.0", + "@typespec/openapi": "~0.60.0", + "@typespec/rest": "~0.60.0", + "@typespec/versioning": "~0.60.0" } }, "node_modules/@azure-tools/typespec-azure-rulesets": { - "version": "0.45.0", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-rulesets/-/typespec-azure-rulesets-0.45.0.tgz", - "integrity": "sha512-OpMYYc0ElxnswABud22GSqE24ZoJCRGh9fwSA8SoqsJr0uXRX7D6D5pA1FHFT3b5uBVHy0l+FFHvjz9wxfsbUw==", + "version": "0.46.0", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-rulesets/-/typespec-azure-rulesets-0.46.0.tgz", + "integrity": "sha512-HssO+0ARHbnuLhRiT/7l5DF2hV91Jf/MmsSPdOsDMbVZG26YsB8JD1MiBqs9VJZjB+1xn2DiimYrgqF4n9aDvw==", "dev": true, "engines": { "node": ">=18.0.0" }, "peerDependencies": { - "@azure-tools/typespec-azure-core": "~0.45.0", - "@azure-tools/typespec-azure-resource-manager": "~0.45.0", - "@azure-tools/typespec-client-generator-core": "~0.45.0", - "@typespec/compiler": "~0.59.0" + "@azure-tools/typespec-azure-core": "~0.46.0", + "@azure-tools/typespec-azure-resource-manager": "~0.46.0", + "@azure-tools/typespec-client-generator-core": "~0.46.0", + "@typespec/compiler": "~0.60.0" } }, "node_modules/@azure-tools/typespec-client-generator-core": { - "version": "0.45.3", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-client-generator-core/-/typespec-client-generator-core-0.45.3.tgz", - "integrity": "sha512-o1E38DJnJ71ixK3jHTy42QgY1ztXPGEOhJjdzSb9aI0aXlqqBt0Klgg52RuBHBajQ+RI+nWtGLE+LJaVDSHAqw==", + "version": "0.46.0", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-client-generator-core/-/typespec-client-generator-core-0.46.0.tgz", + "integrity": "sha512-Ss0dNcOeTyc9CBsNFV6OToLV7OOKidAfeewmKePtY2qAHW+CqWZnVvUHunpFt2jFs6CqjFpgU9g+1wPbLCFj9A==", "dev": true, "dependencies": { "change-case": "~5.4.4", @@ -108,21 +108,21 @@ "node": ">=18.0.0" }, "peerDependencies": { - "@azure-tools/typespec-azure-core": "~0.45.0", - "@typespec/compiler": "~0.59.0", - "@typespec/http": "~0.59.0", - "@typespec/openapi": "~0.59.0", - "@typespec/rest": "~0.59.0", - "@typespec/versioning": "~0.59.0" + "@azure-tools/typespec-azure-core": "~0.46.0", + "@typespec/compiler": "~0.60.0", + "@typespec/http": "~0.60.0", + "@typespec/openapi": "~0.60.0", + "@typespec/rest": "~0.60.0", + "@typespec/versioning": "~0.60.0" } }, "node_modules/@azure-tools/typespec-csharp": { - "version": "0.2.0-beta.20240914.1", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-csharp/-/typespec-csharp-0.2.0-beta.20240914.1.tgz", - "integrity": "sha512-5c8u0Q942CH6xkhYw1d9l/1cGpNUnD/Zhw/7mnEDIXc3wZqp1PGnn2ryXR54GZ7cDHNYOwIVstO79PFnUjwbPw==", + "version": "0.2.0-beta.20240920.1", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-csharp/-/typespec-csharp-0.2.0-beta.20240920.1.tgz", + "integrity": "sha512-u966AN8O+tDdLTjMN0WyWcsgAzuOiNUX5a8mjP1Zmv7M+U2ak6l956xPQCtdtB7PG3UED8vj8LQ5k4N5oMp7Ug==", "dependencies": { - "@autorest/csharp": "3.0.0-beta.20240914.1", - "@typespec/http-client-csharp": "0.1.9-alpha.20240906.1", + "@autorest/csharp": "3.0.0-beta.20240920.1", + "@typespec/http-client-csharp": "0.1.9-alpha.20240917.1", "json-serialize-refs": "0.1.0-0" }, "peerDependencies": { @@ -224,9 +224,9 @@ } }, "node_modules/@typespec/compiler": { - "version": "0.59.0", - "resolved": "https://registry.npmjs.org/@typespec/compiler/-/compiler-0.59.0.tgz", - "integrity": "sha512-fqh2TeAWQyt70f7NkfwOvoQMqHAfGzIfvcUi+XW55+ms6opiqNXBIT822Jr+T4fNo1PgsnbKC34n6SSIMxnOqw==", + "version": "0.60.0", + "resolved": "https://registry.npmjs.org/@typespec/compiler/-/compiler-0.60.0.tgz", + "integrity": "sha512-qAS99tJv6RvxSescfxRVal4QWSfdf3BzIOgE8+Az6emL68aTE/W8zQ0Ijpgmhax7sC2AnLTxCK1tM9kj1YguRw==", "dev": true, "dependencies": { "@babel/code-frame": "~7.24.7", @@ -253,21 +253,21 @@ } }, "node_modules/@typespec/http": { - "version": "0.59.0", - "resolved": "https://registry.npmjs.org/@typespec/http/-/http-0.59.0.tgz", - "integrity": "sha512-P8kJBHmkqYHhojO97Tnj8FH+UInWzGBl2I9Z6ZX6sVUVW9/87hoovgCcVmvU1xMUD/xvKzX3m70fbRXhkocsGQ==", + "version": "0.60.0", + "resolved": "https://registry.npmjs.org/@typespec/http/-/http-0.60.0.tgz", + "integrity": "sha512-ktfS9vpHfltyeAaQLNAZdqrn6Per3vmB/HDH/iyudYLA5wWblT1siKvpFCMWq53CJorRO7yeOKv+Q/M26zwEtg==", "dev": true, "engines": { "node": ">=18.0.0" }, "peerDependencies": { - "@typespec/compiler": "~0.59.0" + "@typespec/compiler": "~0.60.0" } }, "node_modules/@typespec/http-client-csharp": { - "version": "0.1.9-alpha.20240906.1", - "resolved": "https://registry.npmjs.org/@typespec/http-client-csharp/-/http-client-csharp-0.1.9-alpha.20240906.1.tgz", - "integrity": "sha512-TijY0F6v+EWz1VCYCA3SRkvuio4h0oiRkn91nLtx6viCygGAk4isrjU0RLVnHHlbOl+GzEln8EtS/zlfnSIBEQ==", + "version": "0.1.9-alpha.20240917.1", + "resolved": "https://registry.npmjs.org/@typespec/http-client-csharp/-/http-client-csharp-0.1.9-alpha.20240917.1.tgz", + "integrity": "sha512-93rZYmQQvwXeYL/6lGcgnToAKMyzx2S9GsZDq7VQneSF2N4dVWWVklAvpE8LZbUQVTTDIY+Cl360rTxk8rq+bw==", "dependencies": { "json-serialize-refs": "0.1.0-0" }, @@ -282,53 +282,53 @@ } }, "node_modules/@typespec/openapi": { - "version": "0.59.0", - "resolved": "https://registry.npmjs.org/@typespec/openapi/-/openapi-0.59.0.tgz", - "integrity": "sha512-do1Dm5w0MuK3994gYTBg6qMfgeIxmmsDqnz3zimYKMPpbnUBi4F6/o4iCfn0Fn9kaNl+H6UlOzZpsZW9xHui1Q==", + "version": "0.60.0", + "resolved": "https://registry.npmjs.org/@typespec/openapi/-/openapi-0.60.0.tgz", + "integrity": "sha512-YVwLppgHY8r/MudHNSLSUXzdw+CIpjmb31gI2a0KDGnI6sWDwY7LSWfjGU4TY/ubt0+X0Tjoy330mTvw71YBTg==", "dev": true, "engines": { "node": ">=18.0.0" }, "peerDependencies": { - "@typespec/compiler": "~0.59.0", - "@typespec/http": "~0.59.0" + "@typespec/compiler": "~0.60.0", + "@typespec/http": "~0.60.0" } }, "node_modules/@typespec/rest": { - "version": "0.59.0", - "resolved": "https://registry.npmjs.org/@typespec/rest/-/rest-0.59.0.tgz", - "integrity": "sha512-wGrmjRDUMgMn9fqusRhu36hC2GOvirz5O01VSrmAEOH6k1L2GX0Mq70gOdZa4kkkWyHYDKb7GdjfaLe8v+OH6w==", + "version": "0.60.0", + "resolved": "https://registry.npmjs.org/@typespec/rest/-/rest-0.60.0.tgz", + "integrity": "sha512-mHYubyuBvwdV2xkHrJfPwV7b/Ksyb9lA1Q/AQwpVFa7Qu1X075TBVALmH+hK3V0EdUG1CGJZ5Sw4BWgl8ZS0BA==", "dev": true, "engines": { "node": ">=18.0.0" }, "peerDependencies": { - "@typespec/compiler": "~0.59.0", - "@typespec/http": "~0.59.0" + "@typespec/compiler": "~0.60.0", + "@typespec/http": "~0.60.0" } }, "node_modules/@typespec/versioning": { - "version": "0.59.0", - "resolved": "https://registry.npmjs.org/@typespec/versioning/-/versioning-0.59.0.tgz", - "integrity": "sha512-aihO/ux0lLmsuYAdGVkiBflSudcZokYG42SELk1FtMFo609G3Pd7ep7hau6unBnMIceQZejB0ow5UGRupK4X5A==", + "version": "0.60.0", + "resolved": "https://registry.npmjs.org/@typespec/versioning/-/versioning-0.60.0.tgz", + "integrity": "sha512-SqxCQ9qMw5fdR7WP6/GFLzwcFwxhv+uHlzJGVcTd1GtIAu5qj2X4VmzFuNQyu+QenI+5uOSrEEywEXn0YRTZSg==", "dev": true, "engines": { "node": ">=18.0.0" }, "peerDependencies": { - "@typespec/compiler": "~0.59.0" + "@typespec/compiler": "~0.60.0" } }, "node_modules/@typespec/xml": { - "version": "0.59.0", - "resolved": "https://registry.npmjs.org/@typespec/xml/-/xml-0.59.0.tgz", - "integrity": "sha512-UoSsEmm7SXEtL9OXsqotu1TjruJSobqZMhUKAAlC9EP2WfQIHLRfBu7xaZB0sgwq7CM6zy/Hq1RZfQyL1KqEvg==", + "version": "0.60.0", + "resolved": "https://registry.npmjs.org/@typespec/xml/-/xml-0.60.0.tgz", + "integrity": "sha512-Cr1Vih4ovB1OKHJNrXf23Bq4IiVNGlf7F6kN5Yfc7UDqxy+hiCfuwXfjlu3ida/bYTalGPd4/KL9EAx+m41Bxw==", "dev": true, "engines": { "node": ">=18.0.0" }, "peerDependencies": { - "@typespec/compiler": "~0.59.0" + "@typespec/compiler": "~0.60.0" } }, "node_modules/ajv": { diff --git a/eng/emitter-package.json b/eng/emitter-package.json index ed553c400f18..4a11293a988f 100644 --- a/eng/emitter-package.json +++ b/eng/emitter-package.json @@ -1,19 +1,19 @@ { "main": "dist/src/index.js", "dependencies": { - "@azure-tools/typespec-csharp": "0.2.0-beta.20240914.1" + "@azure-tools/typespec-csharp": "0.2.0-beta.20240920.1" }, "devDependencies": { - "@azure-tools/typespec-autorest": "0.45.0", - "@azure-tools/typespec-azure-core": "0.45.0", - "@azure-tools/typespec-azure-resource-manager": "0.45.0", - "@azure-tools/typespec-azure-rulesets": "0.45.0", - "@azure-tools/typespec-client-generator-core": "0.45.3", - "@typespec/compiler": "0.59.0", - "@typespec/http": "0.59.0", - "@typespec/openapi": "0.59.0", - "@typespec/rest": "0.59.0", - "@typespec/versioning": "0.59.0", - "@typespec/xml": "0.59.0" + "@azure-tools/typespec-autorest": "0.46.0", + "@azure-tools/typespec-azure-core": "0.46.0", + "@azure-tools/typespec-azure-resource-manager": "0.46.0", + "@azure-tools/typespec-azure-rulesets": "0.46.0", + "@azure-tools/typespec-client-generator-core": "0.46.0", + "@typespec/compiler": "0.60.0", + "@typespec/http": "0.60.0", + "@typespec/openapi": "0.60.0", + "@typespec/rest": "0.60.0", + "@typespec/versioning": "0.60.0", + "@typespec/xml": "0.60.0" } } diff --git a/sdk/ai/Azure.AI.Inference/src/Generated/Docs/ChatCompletionsClient.xml b/sdk/ai/Azure.AI.Inference/src/Generated/Docs/ChatCompletionsClient.xml index d6b0c4cb0c02..572d47b762f2 100644 --- a/sdk/ai/Azure.AI.Inference/src/Generated/Docs/ChatCompletionsClient.xml +++ b/sdk/ai/Azure.AI.Inference/src/Generated/Docs/ChatCompletionsClient.xml @@ -5,15 +5,15 @@ This sample shows how to call GetModelInfoAsync. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ChatCompletionsClient client = new ChatCompletionsClient(endpoint, credential); Response response = await client.GetModelInfoAsync(); ]]> -This sample shows how to call GetModelInfoAsync with all parameters. +This sample shows how to call GetModelInfoAsync. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ChatCompletionsClient client = new ChatCompletionsClient(endpoint, credential); @@ -24,15 +24,15 @@ Response response = await client.GetModelInfoAsync(); This sample shows how to call GetModelInfo. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ChatCompletionsClient client = new ChatCompletionsClient(endpoint, credential); Response response = client.GetModelInfo(); ]]> -This sample shows how to call GetModelInfo with all parameters. +This sample shows how to call GetModelInfo. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ChatCompletionsClient client = new ChatCompletionsClient(endpoint, credential); @@ -43,7 +43,7 @@ Response response = client.GetModelInfo(); This sample shows how to call GetModelInfoAsync and parse the result. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ChatCompletionsClient client = new ChatCompletionsClient(endpoint, credential); @@ -54,9 +54,9 @@ Console.WriteLine(result.GetProperty("model_name").ToString()); Console.WriteLine(result.GetProperty("model_type").ToString()); Console.WriteLine(result.GetProperty("model_provider_name").ToString()); ]]> -This sample shows how to call GetModelInfoAsync with all parameters and parse the result. +This sample shows how to call GetModelInfoAsync and parse the result. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ChatCompletionsClient client = new ChatCompletionsClient(endpoint, credential); @@ -72,7 +72,7 @@ Console.WriteLine(result.GetProperty("model_provider_name").ToString()); This sample shows how to call GetModelInfo and parse the result. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ChatCompletionsClient client = new ChatCompletionsClient(endpoint, credential); @@ -83,9 +83,9 @@ Console.WriteLine(result.GetProperty("model_name").ToString()); Console.WriteLine(result.GetProperty("model_type").ToString()); Console.WriteLine(result.GetProperty("model_provider_name").ToString()); ]]> -This sample shows how to call GetModelInfo with all parameters and parse the result. +This sample shows how to call GetModelInfo and parse the result. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ChatCompletionsClient client = new ChatCompletionsClient(endpoint, credential); diff --git a/sdk/ai/Azure.AI.Inference/tests/Generated/Samples/Samples_ChatCompletionsClient.cs b/sdk/ai/Azure.AI.Inference/tests/Generated/Samples/Samples_ChatCompletionsClient.cs index 7e09babb3d87..b52f3fc3727f 100644 --- a/sdk/ai/Azure.AI.Inference/tests/Generated/Samples/Samples_ChatCompletionsClient.cs +++ b/sdk/ai/Azure.AI.Inference/tests/Generated/Samples/Samples_ChatCompletionsClient.cs @@ -17,9 +17,9 @@ public partial class Samples_ChatCompletionsClient { [Test] [Ignore("Only validating compilation of examples")] - public void Example_Client1_GetModelInfo_ShortVersion() + public void Example_Client1_GetModelInfo_MaximumSetModelInformation() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ChatCompletionsClient client = new ChatCompletionsClient(endpoint, credential); @@ -33,9 +33,9 @@ public void Example_Client1_GetModelInfo_ShortVersion() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Client1_GetModelInfo_ShortVersion_Async() + public async Task Example_Client1_GetModelInfo_MaximumSetModelInformation_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ChatCompletionsClient client = new ChatCompletionsClient(endpoint, credential); @@ -49,9 +49,9 @@ public async Task Example_Client1_GetModelInfo_ShortVersion_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Client1_GetModelInfo_ShortVersion_Convenience() + public void Example_Client1_GetModelInfo_MaximumSetModelInformation_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ChatCompletionsClient client = new ChatCompletionsClient(endpoint, credential); @@ -60,9 +60,9 @@ public void Example_Client1_GetModelInfo_ShortVersion_Convenience() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Client1_GetModelInfo_ShortVersion_Convenience_Async() + public async Task Example_Client1_GetModelInfo_MaximumSetModelInformation_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ChatCompletionsClient client = new ChatCompletionsClient(endpoint, credential); @@ -71,9 +71,9 @@ public async Task Example_Client1_GetModelInfo_ShortVersion_Convenience_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Client1_GetModelInfo_AllParameters() + public void Example_Client1_GetModelInfo_MinimumSetModelInformation() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ChatCompletionsClient client = new ChatCompletionsClient(endpoint, credential); @@ -87,9 +87,9 @@ public void Example_Client1_GetModelInfo_AllParameters() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Client1_GetModelInfo_AllParameters_Async() + public async Task Example_Client1_GetModelInfo_MinimumSetModelInformation_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ChatCompletionsClient client = new ChatCompletionsClient(endpoint, credential); @@ -103,9 +103,9 @@ public async Task Example_Client1_GetModelInfo_AllParameters_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Client1_GetModelInfo_AllParameters_Convenience() + public void Example_Client1_GetModelInfo_MinimumSetModelInformation_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ChatCompletionsClient client = new ChatCompletionsClient(endpoint, credential); @@ -114,9 +114,9 @@ public void Example_Client1_GetModelInfo_AllParameters_Convenience() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Client1_GetModelInfo_AllParameters_Convenience_Async() + public async Task Example_Client1_GetModelInfo_MinimumSetModelInformation_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ChatCompletionsClient client = new ChatCompletionsClient(endpoint, credential); diff --git a/sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/Docs/Multivariate.xml b/sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/Docs/Multivariate.xml index 9396c9f62ec3..e6b90304283c 100644 --- a/sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/Docs/Multivariate.xml +++ b/sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/Docs/Multivariate.xml @@ -5,49 +5,33 @@ 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. "); -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. -"); +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")); ]]> This sample shows how to call GetMultivariateBatchDetectionResultAsync 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()); @@ -56,49 +40,17 @@ Console.WriteLine(result.GetProperty("summary").GetProperty("setupInfo").GetProp 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. -"); -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()); ]]> This sample shows how to call GetMultivariateBatchDetectionResult 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()); @@ -107,67 +59,26 @@ Console.WriteLine(result.GetProperty("summary").GetProperty("setupInfo").GetProp 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. -"); -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()); ]]> This sample shows how to call TrainMultivariateModelAsync. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); - -ModelInfo modelInfo = new ModelInfo(new Uri("http://localhost:3000"), 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(new Uri("http://localhost:3000"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")) +ModelInfo modelInfo = new ModelInfo(new Uri("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, + AlignMode = AlignMode.Outer, + FillNAMethod = FillNAMethod.Linear, + PaddingValue = 0, }, }; Response response = await client.TrainMultivariateModelAsync(modelInfo); @@ -177,29 +88,20 @@ Response response = await client.TrainMultivariateModelAs This sample shows how to call TrainMultivariateModel. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); -ModelInfo modelInfo = new ModelInfo(new Uri("http://localhost:3000"), 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. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); - -ModelInfo modelInfo = new ModelInfo(new Uri("http://localhost:3000"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")) +ModelInfo modelInfo = new ModelInfo(new Uri("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, + AlignMode = AlignMode.Outer, + FillNAMethod = FillNAMethod.Linear, + PaddingValue = 0, }, }; Response response = client.TrainMultivariateModel(modelInfo); @@ -209,43 +111,24 @@ Response response = client.TrainMultivariateModel(modelIn This sample shows how to call TrainMultivariateModelAsync 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", - 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. -"); +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", - 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, + 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); @@ -253,70 +136,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. "); +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", - 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. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); - -using RequestContent content = RequestContent.Create(new -{ - dataSource = "http://localhost:3000", - 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, + 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); @@ -324,48 +167,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); ]]> @@ -374,21 +186,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); ]]> @@ -397,267 +199,128 @@ 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. "); -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. -"); +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"); ]]> This sample shows how to call GetMultivariateModelAsync 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()); -]]> -This sample shows how to call GetMultivariateModelAsync with all parameters 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()); -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"), 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"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")) +MultivariateBatchDetectionOptions options = new MultivariateBatchDetectionOptions(new Uri("https://multiadsample.blob.core.windows.net/data/sample_data_2_1000.csv"), DateTimeOffset.Parse("2019-04-01T00:15:00Z"), DateTimeOffset.Parse("2019-04-01T00:40:00Z")) { - TopContributorCount = 1234, + TopContributorCount = 10, }; -Response response = await client.DetectMultivariateBatchAnomalyAsync("", options); +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"), 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"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")) +MultivariateBatchDetectionOptions options = new MultivariateBatchDetectionOptions(new Uri("https://multiadsample.blob.core.windows.net/data/sample_data_2_1000.csv"), DateTimeOffset.Parse("2019-04-01T00:15:00Z"), DateTimeOffset.Parse("2019-04-01T00:40:00Z")) { - TopContributorCount = 1234, + TopContributorCount = 10, }; -Response response = client.DetectMultivariateBatchAnomaly("", options); +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", - 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("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. "); +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", - 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()); @@ -666,112 +329,53 @@ Console.WriteLine(result.GetProperty("summary").GetProperty("setupInfo").GetProp 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. -"); -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()); ]]> This sample shows how to call DetectMultivariateLastAnomalyAsync. "); +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}) -}); -Response response = await client.DetectMultivariateLastAnomalyAsync("", options); -]]> -This sample shows how to call DetectMultivariateLastAnomalyAsync 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}) + 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}) }) { - TopContributorCount = 1234, + TopContributorCount = 10, }; -Response response = await client.DetectMultivariateLastAnomalyAsync("", options); +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}) -}); -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}) + 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}) }) { - TopContributorCount = 1234, + TopContributorCount = 10, }; -Response response = client.DetectMultivariateLastAnomaly("", options); +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(); @@ -781,72 +385,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 }, - } - }, -}); -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 = "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[] { - 123.45F + 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_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[] + { + 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(); @@ -856,162 +616,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 }, - } - }, -}); -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 = "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[] { - 123.45F + 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_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[] + { + 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()); } ]]> @@ -1019,51 +880,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/sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/Docs/Univariate.xml b/sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/Docs/Univariate.xml index e8ca671555b3..974f79ca9b40 100644 --- a/sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/Docs/Univariate.xml +++ b/sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/Docs/Univariate.xml @@ -5,7 +5,7 @@ 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(); @@ -15,44 +15,249 @@ 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 = "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, + maxAnomalyRatio = 0.25, + sensitivity = 95, + granularity = "monthly", imputeMode = "auto", - imputeFixedValue = 123.45F, }); Response response = await client.DetectUnivariateEntireSeriesAsync(content); @@ -64,14 +269,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()); -Console.WriteLine(result.GetProperty("severity")[0].ToString()); ]]> 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(); @@ -81,44 +285,249 @@ using RequestContent content = RequestContent.Create(new { new { - value = 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()); -]]> -This sample shows how to call DetectUnivariateEntireSeries 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 = "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 = "2022-05-10T18:57:31.2311892Z", - value = 123.45F, + 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); @@ -130,160 +539,439 @@ 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("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("2022-05-10T18:57:31.2311892Z"), + 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); +Response response = await client.DetectUnivariateLastPointAsync(options); ]]> - + -This sample shows how to call DetectUnivariateLastPointAsync 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"), }, -}); -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(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, - 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()); + 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.Fixed, + ImputeFixedValue = 800, +}; +Response response = client.DetectUnivariateLastPoint(options); ]]> - + -This sample shows how to call DetectUnivariateLastPoint and parse the result. +This sample shows how to call DetectUnivariateLastPointAsync and parse the result. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Univariate client = new AnomalyDetectorClient(endpoint, credential).GetUnivariateClient(); @@ -293,25 +981,269 @@ using RequestContent content = RequestContent.Create(new { new { - value = 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()); -]]> -This sample shows how to call DetectUnivariateLastPoint with all request content and parse the result. + 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 = 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 DetectUnivariateLastPoint and parse the result. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Univariate client = new AnomalyDetectorClient(endpoint, credential).GetUnivariateClient(); @@ -321,17 +1253,250 @@ 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, - imputeMode = "auto", - imputeFixedValue = 123.45F, + maxAnomalyRatio = 0.25, + sensitivity = 95, + granularity = "monthly", + imputeMode = "fixed", + imputeFixedValue = 800, }); Response response = client.DetectUnivariateLastPoint(content); @@ -344,187 +1509,4722 @@ 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. "); +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 = 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(1639196) { - 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("2017-01-01T06:45:00Z"), + }, + new TimeSeriesPoint(1639290) { - Timestamp = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), - } -}, TimeGranularity.Yearly) -{ - CustomInterval = 1234, - Period = 1234, - StableTrendWindow = 1234, - Threshold = 123.45F, -}; -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[] + Timestamp = DateTimeOffset.Parse("2017-01-01T06:50:00Z"), + }, + new TimeSeriesPoint(1667293) { - new + 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 { - value = 123.45F, - } - }, - 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[] - { + timestamp = "2017-01-01T19:20:00Z", + value = 1842444, + }, new { - timestamp = "2022-05-10T18:57:31.2311892Z", - value = 123.45F, - } - }, - 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[] - { + timestamp = "2017-01-01T19:25:00Z", + value = 1839891, + }, new { - value = 123.45F, - } - }, - 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(); - -using RequestContent content = RequestContent.Create(new -{ - series = new object[] - { + 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 = 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()); +Console.WriteLine(result.ToString()); ]]> diff --git a/sdk/anomalydetector/Azure.AI.AnomalyDetector/tests/Generated/Samples/Samples_Multivariate.cs b/sdk/anomalydetector/Azure.AI.AnomalyDetector/tests/Generated/Samples/Samples_Multivariate.cs index 3620ab2c4bfa..0a303b937eed 100644 --- a/sdk/anomalydetector/Azure.AI.AnomalyDetector/tests/Generated/Samples/Samples_Multivariate.cs +++ b/sdk/anomalydetector/Azure.AI.AnomalyDetector/tests/Generated/Samples/Samples_Multivariate.cs @@ -18,13 +18,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()); @@ -37,13 +37,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()); @@ -56,208 +56,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 = "http://localhost:3000", - 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(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); - - using RequestContent content = RequestContent.Create(new - { - dataSource = "http://localhost:3000", - 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(new Uri("http://localhost:3000"), 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(new Uri("http://localhost:3000"), 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(""); + 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", - 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, + 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); @@ -265,51 +105,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 = "http://localhost:3000", - 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, + 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); @@ -317,47 +136,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(new Uri("http://localhost:3000"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")) + ModelInfo modelInfo = new ModelInfo(new Uri("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, + AlignMode = AlignMode.Outer, + FillNAMethod = FillNAMethod.Linear, + PaddingValue = 0, }, }; Response response = client.TrainMultivariateModel(modelInfo); @@ -365,22 +163,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(new Uri("http://localhost:3000"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")) + ModelInfo modelInfo = new ModelInfo(new Uri("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, + AlignMode = AlignMode.Outer, + FillNAMethod = FillNAMethod.Linear, + PaddingValue = 0, }, }; Response response = await client.TrainMultivariateModelAsync(modelInfo); @@ -388,65 +186,39 @@ 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() + 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 = 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()); @@ -456,13 +228,13 @@ public void Example_Multivariate_GetMultivariateModel_ShortVersion() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Multivariate_GetMultivariateModel_ShortVersion_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()); @@ -472,162 +244,42 @@ public async Task Example_Multivariate_GetMultivariateModel_ShortVersion_Async() [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() - { - 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); - - 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() - { - 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()); - 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() - { - 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_AllParameters_Convenience_Async() + 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 = await client.GetMultivariateModelAsync(""); + Response response = client.GetMultivariateModel("45aad126-aafd-11ea-b8fb-d89ef3400c5f"); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Multivariate_DetectMultivariateBatchAnomaly_ShortVersion() + 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(); - using RequestContent content = RequestContent.Create(new - { - dataSource = "http://localhost:3000", - 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("startTime").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("setupInfo").GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("results")[0].GetProperty("timestamp").ToString()); + Response response = await client.GetMultivariateModelAsync("45aad126-aafd-11ea-b8fb-d89ef3400c5f"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Multivariate_DetectMultivariateBatchAnomaly_ShortVersion_Async() + 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", - 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 = client.DetectMultivariateBatchAnomaly("45aad126-aafd-11ea-b8fb-d89ef3400c5f", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("resultId").ToString()); @@ -640,147 +292,65 @@ public async Task Example_Multivariate_DetectMultivariateBatchAnomaly_ShortVersi [Test] [Ignore("Only validating compilation of examples")] - public void Example_Multivariate_DetectMultivariateBatchAnomaly_ShortVersion_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"), 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_ShortVersion_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"), 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_DetectMultivariateBatchAnomaly_AllParameters() + 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 = client.DetectMultivariateBatchAnomaly("", 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()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Multivariate_DetectMultivariateBatchAnomaly_AllParameters_Async() + 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(); - using RequestContent content = RequestContent.Create(new + MultivariateBatchDetectionOptions options = new MultivariateBatchDetectionOptions(new Uri("https://multiadsample.blob.core.windows.net/data/sample_data_2_1000.csv"), DateTimeOffset.Parse("2019-04-01T00:15:00Z"), DateTimeOffset.Parse("2019-04-01T00:40:00Z")) { - 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"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")) - { - TopContributorCount = 1234, + TopContributorCount = 10, }; - Response response = client.DetectMultivariateBatchAnomaly("", options); + Response response = client.DetectMultivariateBatchAnomaly("45aad126-aafd-11ea-b8fb-d89ef3400c5f", options); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Multivariate_DetectMultivariateBatchAnomaly_AllParameters_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"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")) + MultivariateBatchDetectionOptions options = new MultivariateBatchDetectionOptions(new Uri("https://multiadsample.blob.core.windows.net/data/sample_data_2_1000.csv"), DateTimeOffset.Parse("2019-04-01T00:15:00Z"), DateTimeOffset.Parse("2019-04-01T00:40:00Z")) { - TopContributorCount = 1234, + TopContributorCount = 10, }; - Response response = await client.DetectMultivariateBatchAnomalyAsync("", options); + Response response = await client.DetectMultivariateBatchAnomalyAsync("45aad126-aafd-11ea-b8fb-d89ef3400c5f", options); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Multivariate_DetectMultivariateLastAnomaly_ShortVersion() + public void Example_Multivariate_DetectMultivariateLastAnomaly_DetectMultivariateLastAnomaly() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); @@ -790,51 +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 +}, }, -} - }, - }); - 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_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[] { -123.45F +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_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[] +{ +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, }); - 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()); @@ -842,39 +579,9 @@ public async Task Example_Multivariate_DetectMultivariateLastAnomaly_ShortVersio [Test] [Ignore("Only validating compilation of examples")] - public void Example_Multivariate_DetectMultivariateLastAnomaly_ShortVersion_Convenience() - { - 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}) - }); - 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}) - }); - Response response = await client.DetectMultivariateLastAnomalyAsync("", options); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Multivariate_DetectMultivariateLastAnomaly_AllParameters() + public async Task Example_Multivariate_DetectMultivariateLastAnomaly_DetectMultivariateLastAnomaly_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); @@ -884,129 +591,272 @@ 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}) +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}) }) { - TopContributorCount = 1234, + TopContributorCount = 10, }; - Response response = client.DetectMultivariateLastAnomaly("", options); + 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}) +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}) }) { - TopContributorCount = 1234, + TopContributorCount = 10, }; - Response response = await client.DetectMultivariateLastAnomalyAsync("", options); + 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()); @@ -1017,13 +867,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()); @@ -1034,9 +884,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(); @@ -1047,9 +897,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(); @@ -1057,107 +907,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/sdk/anomalydetector/Azure.AI.AnomalyDetector/tests/Generated/Samples/Samples_Univariate.cs b/sdk/anomalydetector/Azure.AI.AnomalyDetector/tests/Generated/Samples/Samples_Univariate.cs index 7ecbc6e6c189..8f987e2fe829 100644 --- a/sdk/anomalydetector/Azure.AI.AnomalyDetector/tests/Generated/Samples/Samples_Univariate.cs +++ b/sdk/anomalydetector/Azure.AI.AnomalyDetector/tests/Generated/Samples/Samples_Univariate.cs @@ -18,9 +18,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(); @@ -30,77 +30,249 @@ public void Example_Univariate_DetectUnivariateEntireSeries_ShortVersion() { new { -value = 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()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Univariate_DetectUnivariateEntireSeries_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 = "1972-01-01T00:00:00Z", +value = 826, +}, 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()); - } - - [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[] - { +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 = "2022-05-10T18:57:31.2311892Z", -value = 123.45F, +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); @@ -112,14 +284,13 @@ public void Example_Univariate_DetectUnivariateEntireSeries_AllParameters() 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() + 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(); @@ -129,17 +300,249 @@ public async Task Example_Univariate_DetectUnivariateEntireSeries_AllParameters_ { 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 = await client.DetectUnivariateEntireSeriesAsync(content); @@ -151,14 +554,13 @@ public async Task Example_Univariate_DetectUnivariateEntireSeries_AllParameters_ 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_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(); @@ -168,109 +570,250 @@ public void Example_Univariate_DetectUnivariateLastPoint_ShortVersion() { new { -value = 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()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Univariate_DetectUnivariateLastPoint_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 = "1972-01-01T00:00:00Z", +value = 826, +}, 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-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 = "2022-05-10T18:57:31.2311892Z", -value = 123.45F, +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, - imputeMode = "auto", - imputeFixedValue = 123.45F, + maxAnomalyRatio = 0.25, + sensitivity = 95, + granularity = "monthly", + imputeMode = "fixed", + imputeFixedValue = 800, }); Response response = client.DetectUnivariateLastPoint(content); @@ -283,14 +826,13 @@ public void Example_Univariate_DetectUnivariateLastPoint_AllParameters() 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() + 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(); @@ -300,17 +842,250 @@ public async Task Example_Univariate_DetectUnivariateLastPoint_AllParameters_Asy { 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, - imputeMode = "auto", - imputeFixedValue = 123.45F, + maxAnomalyRatio = 0.25, + sensitivity = 95, + granularity = "monthly", + imputeMode = "fixed", + imputeFixedValue = 800, }); Response response = await client.DetectUnivariateLastPointAsync(content); @@ -323,148 +1098,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("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); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Univariate_DetectUnivariateLastPoint_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-01-01T00:00:00Z"), +}, +new TimeSeriesPoint(799) { -Timestamp = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), -} +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.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); + Response response = client.DetectUnivariateLastPoint(options); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Univariate_DetectUnivariateChangePoint_ShortVersion() + 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(); - using RequestContent content = RequestContent.Create(new - { - series = new object[] + UnivariateDetectionOptions options = new UnivariateDetectionOptions(new TimeSeriesPoint[] { -new +new TimeSeriesPoint(826) { -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[] - { -new +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) { -value = 123.45F, +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 = "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(); - - UnivariateChangePointDetectionOptions options = new UnivariateChangePointDetectionOptions(new TimeSeriesPoint[] + }) { -new TimeSeriesPoint(123.45F) - }, TimeGranularity.Yearly); - Response response = await client.DetectUnivariateChangePointAsync(options); + 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_AllParameters() + 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(); @@ -474,100 +1540,4704 @@ 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 = "2022-05-10T18:57:31.2311892Z", -value = 123.45F, -} - }, - 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()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Univariate_DetectUnivariateChangePoint_AllParameters_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) +timestamp = "2017-01-01T06:50:00Z", +value = 1639290, +}, +new { -Timestamp = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), -} - }, TimeGranularity.Yearly) - { - CustomInterval = 1234, - Period = 1234, - StableTrendWindow = 1234, - Threshold = 123.45F, - }; - Response response = client.DetectUnivariateChangePoint(options); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Univariate_DetectUnivariateChangePoint_AllParameters_Convenience_Async() - { - 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) +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()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Univariate_DetectUnivariateChangePoint_UnivariateDetectionOfAChangePoint_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 = "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()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Univariate_DetectUnivariateChangePoint_UnivariateDetectionOfAChangePoint_Convenience() + { + Uri endpoint = new Uri(""); + 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); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Univariate_DetectUnivariateChangePoint_UnivariateDetectionOfAChangePoint_Convenience_Async() + { + Uri endpoint = new Uri(""); + 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("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/sdk/batch/Azure.Compute.Batch/src/Generated/Docs/BatchClient.xml b/sdk/batch/Azure.Compute.Batch/src/Generated/Docs/BatchClient.xml index d20603580874..105b11993153 100644 --- a/sdk/batch/Azure.Compute.Batch/src/Generated/Docs/BatchClient.xml +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/Docs/BatchClient.xml @@ -5,62 +5,33 @@ This sample shows how to call GetApplicationAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -Response response = await client.GetApplicationAsync(""); -]]> -This sample shows how to call GetApplicationAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -Response response = await client.GetApplicationAsync("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +Response response = await client.GetApplicationAsync("my_application_id"); ]]> This sample shows how to call GetApplication. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -Response response = client.GetApplication(""); -]]> -This sample shows how to call GetApplication with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -Response response = client.GetApplication("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +Response response = client.GetApplication("my_application_id"); ]]> This sample shows how to call GetApplicationAsync and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -Response response = await client.GetApplicationAsync("", null, null, null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("versions")[0].ToString()); -]]> -This sample shows how to call GetApplicationAsync with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -Response response = await client.GetApplicationAsync("", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), null); +Response response = await client.GetApplicationAsync("my_application_id", null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); @@ -72,24 +43,11 @@ Console.WriteLine(result.GetProperty("versions")[0].ToString()); This sample shows how to call GetApplication and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -Response response = client.GetApplication("", null, null, null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("versions")[0].ToString()); -]]> -This sample shows how to call GetApplication with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -Response response = client.GetApplication("", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), null); +Response response = client.GetApplication("my_application_id", null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); @@ -101,791 +59,954 @@ Console.WriteLine(result.GetProperty("versions")[0].ToString()); This sample shows how to call CreatePoolAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -BatchPoolCreateContent pool = new BatchPoolCreateContent("", ""); +BatchPoolCreateContent pool = new BatchPoolCreateContent("mypool01", "Standard_D1_v2") +{ + VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference + { + Publisher = "MicrosoftWindowsServer", + Offer = "WindowsServer", + Sku = "2016-datacenter-smalldisk", + Version = "latest", + }, "batch.node.windows amd64"), + TargetDedicatedNodes = 2, + NetworkConfiguration = new NetworkConfiguration + { + EnableAcceleratedNetworking = true, + }, +}; Response response = await client.CreatePoolAsync(pool); ]]> -This sample shows how to call CreatePoolAsync with all parameters. +This sample shows how to call CreatePoolAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -BatchPoolCreateContent pool = new BatchPoolCreateContent("", "") +BatchPoolCreateContent pool = new BatchPoolCreateContent("pool2", "standard_a1") { - DisplayName = "", VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference { - Publisher = "", - Offer = "", - Sku = "", - Version = "", - VirtualMachineImageId = "", - }, "") + Publisher = "Canonical", + Offer = "UbuntuServer", + Sku = "20_04-lts", + }, "batch.node.ubuntu 20.04"), + ResizeTimeout = XmlConvert.ToTimeSpan("PT15M"), + TargetDedicatedNodes = 5, + TargetLowPriorityNodes = 0, + EnableAutoScale = false, + TaskSlotsPerNode = 3, + TaskSchedulingPolicy = new BatchTaskSchedulingPolicy(BatchNodeFillType.Spread), + MountConfiguration = {new MountConfiguration { - WindowsConfiguration = new WindowsConfiguration + AzureBlobFileSystemConfiguration = new AzureBlobFileSystemConfiguration("accountName", "blobContainerName", "bfusepath") { - EnableAutomaticUpdates = true, + AccountKey = "accountKey", }, - DataDisks = {new DataDisk(1234, 1234) - { - Caching = CachingType.None, - StorageAccountType = StorageAccountType.StandardLRS, - }}, - LicenseType = "", - ContainerConfiguration = new ContainerConfiguration(ContainerType.DockerCompatible) + }, new MountConfiguration + { + AzureFileShareConfiguration = new AzureFileShareConfiguration("accountName", "https://myaccount.file.core.windows.net/fileshare", "accountKey", "filesharepath") { - ContainerImageNames = { "" }, - ContainerRegistries = {new ContainerRegistryReference - { - Username = "", - Password = "", - RegistryServer = "", - IdentityReference = new BatchNodeIdentityReference - { - ResourceId = "", - }, - }}, + MountOptions = "mount options ver=1.0", }, - DiskEncryptionConfiguration = new DiskEncryptionConfiguration + }, new MountConfiguration + { + NfsMountConfiguration = new NfsMountConfiguration("somesource nfs url", "mountpath") { - Targets = { DiskEncryptionTarget.OsDisk }, + MountOptions = "mount options ver=1.0", }, - NodePlacementConfiguration = new BatchNodePlacementConfiguration + }, new MountConfiguration + { + CifsMountConfiguration = new CifsMountConfiguration("accountName", "//myaccount.file.core.windows.net/file", "mountpath", "password") { - Policy = BatchNodePlacementPolicyType.Regional, + MountOptions = "mount options ver=1.0", }, - Extensions = {new VMExtension("", "", "") - { - TypeHandlerVersion = "", - AutoUpgradeMinorVersion = true, - EnableAutomaticUpgrade = true, - Settings = - { - ["key"] = "" - }, - ProtectedSettings = - { - ["key"] = "" - }, - ProvisionAfterExtensions = {""}, - }}, + }}, +}; +Response response = await client.CreatePoolAsync(pool); +]]> +This sample shows how to call CreatePoolAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchPoolCreateContent pool = new BatchPoolCreateContent("mypool001", "standard_d2s_v3") +{ + VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference + { + Publisher = "Canonical", + Offer = "0001-com-ubuntu-server-focal", + Sku = "20_04-lts", + }, "batch.node.ubuntu 20.04") + { OsDisk = new OSDisk { EphemeralOSDiskSettings = new DiffDiskSettings { Placement = DiffDiskPlacement.CacheDisk, }, - Caching = CachingType.None, - DiskSizeGB = 1234, - ManagedDisk = new ManagedDisk(StorageAccountType.StandardLRS), - WriteAcceleratorEnabled = true, + Caching = CachingType.ReadWrite, + DiskSizeGB = 100, + ManagedDisk = new ManagedDisk(StorageAccountType.StandardSSDLRS), }, - SecurityProfile = new SecurityProfile(true, SecurityTypes.TrustedLaunch, new UefiSettings - { - SecureBootEnabled = true, - VTpmEnabled = true, - }), - ServiceArtifactReference = new ServiceArtifactReference(""), }, - ResizeTimeout = XmlConvert.ToTimeSpan("PT1H23M45S"), + ResizeTimeout = XmlConvert.ToTimeSpan("PT15M"), + TargetDedicatedNodes = 1, + TargetLowPriorityNodes = 0, + EnableAutoScale = false, + TaskSlotsPerNode = 1, +}; +Response response = await client.CreatePoolAsync(pool); +]]> +This sample shows how to call CreatePoolAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchPoolCreateContent pool = new BatchPoolCreateContent("mypool001", "STANDARD_DC2s_V2") +{ + VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference + { + Publisher = "Canonical", + Offer = "UbuntuServer", + Sku = "18_04-lts-gen2", + Version = "latest", + }, "batch.node.ubuntu 18.04"), ResourceTags = { - ["key"] = "" + ["TagName1"] = "TagValue1", + ["TagName2"] = "TagValue2" }, - TargetDedicatedNodes = 1234, - TargetLowPriorityNodes = 1234, - EnableAutoScale = true, - AutoScaleFormula = "", - AutoScaleEvaluationInterval = XmlConvert.ToTimeSpan("PT1H23M45S"), - EnableInterNodeCommunication = true, - NetworkConfiguration = new NetworkConfiguration + TargetDedicatedNodes = 1, +}; +Response response = await client.CreatePoolAsync(pool); +]]> +This sample shows how to call CreatePoolAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchPoolCreateContent pool = new BatchPoolCreateContent("mypool001", "STANDARD_DC2s_V2") +{ + VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference { - SubnetId = "", - DynamicVNetAssignmentScope = DynamicVNetAssignmentScope.None, - EndpointConfiguration = new BatchPoolEndpointConfiguration(new InboundNatPool[] + Publisher = "Canonical", + Offer = "UbuntuServer", + Sku = "18_04-lts-gen2", + Version = "latest", + }, "batch.node.ubuntu 18.04") + { + SecurityProfile = new SecurityProfile(true, SecurityTypes.TrustedLaunch, new UefiSettings { - new InboundNatPool("", InboundEndpointProtocol.Tcp, 1234, 1234, 1234) - { - NetworkSecurityGroupRules = {new NetworkSecurityGroupRule(1234, NetworkSecurityGroupRuleAccess.Allow, "") - { - SourcePortRanges = {""}, - }}, - } + SecureBootEnabled = false, }), - PublicIpAddressConfiguration = new PublicIpAddressConfiguration - { - IpAddressProvisioningType = IpAddressProvisioningType.BatchManaged, - IpAddressIds = { "" }, - }, - EnableAcceleratedNetworking = true, }, - StartTask = new BatchStartTask("") + TargetDedicatedNodes = 1, +}; +Response response = await client.CreatePoolAsync(pool); +]]> +This sample shows how to call CreatePoolAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchPoolCreateContent pool = new BatchPoolCreateContent("pool2", "standard_a1") +{ + VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference + { + Publisher = "Canonical", + Offer = "0001-com-ubuntu-server-focal", + Sku = "20_04-lts", + }, "batch.node.ubuntu 20.04"), + ResizeTimeout = XmlConvert.ToTimeSpan("PT15M"), + TargetDedicatedNodes = 5, + TargetLowPriorityNodes = 0, + EnableAutoScale = false, + EnableInterNodeCommunication = true, + TaskSlotsPerNode = 3, + TaskSchedulingPolicy = new BatchTaskSchedulingPolicy(BatchNodeFillType.Spread), + Metadata = { new MetadataItem("myproperty", "myvalue") }, +}; +Response response = await client.CreatePoolAsync(pool); +]]> +This sample shows how to call CreatePoolAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchPoolCreateContent pool = new BatchPoolCreateContent("pool2", "standard_a1") +{ + VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference { - ContainerSettings = new BatchTaskContainerSettings("") + Publisher = "Canonical", + Offer = "0001-com-ubuntu-server-focal", + Sku = "120_04-lts", + }, "batch.node.ubuntu 20.04") + { + ContainerConfiguration = new ContainerConfiguration(ContainerType.DockerCompatible) { - ContainerRunOptions = "", - Registry = default, - WorkingDirectory = ContainerWorkingDirectory.TaskWorkingDirectory, + ContainerImageNames = { "busybox" }, }, - ResourceFiles = {new ResourceFile - { - AutoStorageContainerName = "", - StorageContainerUrl = "", - HttpUrl = "", - BlobPrefix = "", - FilePath = "", - FileMode = "", - IdentityReference = default, - }}, - EnvironmentSettings = {new EnvironmentSetting("") - { - Value = "", - }}, - UserIdentity = new UserIdentity + }, + ResizeTimeout = XmlConvert.ToTimeSpan("PT15M"), + TargetDedicatedNodes = 5, + TargetLowPriorityNodes = 0, + EnableAutoScale = false, + TaskSlotsPerNode = 3, + TaskSchedulingPolicy = new BatchTaskSchedulingPolicy(BatchNodeFillType.Spread), +}; +Response response = await client.CreatePoolAsync(pool); +]]> +This sample shows how to call CreatePoolAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchPoolCreateContent pool = new BatchPoolCreateContent("pool2", "standard_a1") +{ + VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference + { + Publisher = "Canonical", + Offer = "0001-com-ubuntu-server-focal", + Sku = "20_04-lts", + }, "batch.node.ubuntu 20.04") + { + Extensions = {new VMExtension("batchextension1", "Microsoft.Azure.KeyVault", "KeyVaultForLinux") { - Username = "", - AutoUser = new AutoUserSpecification + TypeHandlerVersion = "2.0", + AutoUpgradeMinorVersion = true, + EnableAutomaticUpgrade = true, + Settings = { - Scope = AutoUserScope.Task, - ElevationLevel = ElevationLevel.NonAdmin, + ["secretsManagementSettingsKey"] = "secretsManagementSettingsValue", + ["authenticationSettingsKey"] = "authenticationSettingsValue" }, - }, - MaxTaskRetryCount = 1234, - WaitForSuccess = true, + }}, }, - ApplicationPackageReferences = {new BatchApplicationPackageReference("") - { - Version = "", - }}, - TaskSlotsPerNode = 1234, + ResizeTimeout = XmlConvert.ToTimeSpan("PT15M"), + TargetDedicatedNodes = 5, + TargetLowPriorityNodes = 0, + EnableAutoScale = false, + EnableInterNodeCommunication = true, + TaskSlotsPerNode = 3, TaskSchedulingPolicy = new BatchTaskSchedulingPolicy(BatchNodeFillType.Spread), - UserAccounts = {new UserAccount("", "") - { - ElevationLevel = ElevationLevel.NonAdmin, - LinuxUserConfiguration = new LinuxUserConfiguration - { - Uid = 1234, - Gid = 1234, - SshPrivateKey = "", - }, - WindowsUserConfiguration = new WindowsUserConfiguration - { - LoginMode = LoginMode.Batch, - }, - }}, - Metadata = { new MetadataItem("", "") }, - MountConfiguration = {new MountConfiguration + Metadata = { new MetadataItem("myproperty", "myvalue") }, + TargetNodeCommunicationMode = BatchNodeCommunicationMode.Simplified, +}; +Response response = await client.CreatePoolAsync(pool); +]]> +This sample shows how to call CreatePoolAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchPoolCreateContent pool = new BatchPoolCreateContent("mypool002", "Standard_A1_v2") +{ + VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference { - AzureBlobFileSystemConfiguration = new AzureBlobFileSystemConfiguration("", "", "") - { - AccountKey = "", - SasKey = "", - BlobfuseOptions = "", - IdentityReference = default, - }, - NfsMountConfiguration = new NfsMountConfiguration("", "") - { - MountOptions = "", - }, - CifsMountConfiguration = new CifsMountConfiguration("", "", "", "") - { - MountOptions = "", - }, - AzureFileShareConfiguration = new AzureFileShareConfiguration("", "", "", "") - { - MountOptions = "", - }, - }}, - TargetNodeCommunicationMode = BatchNodeCommunicationMode.Default, - UpgradePolicy = new UpgradePolicy(UpgradeMode.Automatic) + Publisher = "MicrosoftWindowsServer", + Offer = "WindowsServer", + Sku = "2016-datacenter-smalldisk", + Version = "latest", + }, "batch.node.windows amd64") { - AutomaticOsUpgradePolicy = new AutomaticOsUpgradePolicy - { - DisableAutomaticRollback = true, - EnableAutomaticOsUpgrade = true, - UseRollingUpgradePolicy = true, - OsRollingUpgradeDeferral = true, - }, - RollingUpgradePolicy = new RollingUpgradePolicy + WindowsConfiguration = new WindowsConfiguration { - EnableCrossZoneUpgrade = true, - MaxBatchInstancePercent = 1234, - MaxUnhealthyInstancePercent = 1234, - MaxUnhealthyUpgradedInstancePercent = 1234, - PauseTimeBetweenBatches = XmlConvert.ToTimeSpan("PT1H23M45S"), - PrioritizeUnhealthyInstances = true, - RollbackFailedInstancesOnPolicyBreach = true, + EnableAutomaticUpdates = false, }, + ServiceArtifactReference = new ServiceArtifactReference("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Compute/galleries/myGallery/serviceArtifacts/myServiceArtifact/vmArtifactsProfiles/vmArtifactsProfile"), }, + TargetDedicatedNodes = 2, }; -Response response = await client.CreatePoolAsync(pool, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +Response response = await client.CreatePoolAsync(pool); ]]> This sample shows how to call CreatePool. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -BatchPoolCreateContent pool = new BatchPoolCreateContent("", ""); +BatchPoolCreateContent pool = new BatchPoolCreateContent("mypool01", "Standard_D1_v2") +{ + VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference + { + Publisher = "MicrosoftWindowsServer", + Offer = "WindowsServer", + Sku = "2016-datacenter-smalldisk", + Version = "latest", + }, "batch.node.windows amd64"), + TargetDedicatedNodes = 2, + NetworkConfiguration = new NetworkConfiguration + { + EnableAcceleratedNetworking = true, + }, +}; Response response = client.CreatePool(pool); ]]> -This sample shows how to call CreatePool with all parameters. +This sample shows how to call CreatePool. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -BatchPoolCreateContent pool = new BatchPoolCreateContent("", "") +BatchPoolCreateContent pool = new BatchPoolCreateContent("pool2", "standard_a1") { - DisplayName = "", VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference { - Publisher = "", - Offer = "", - Sku = "", - Version = "", - VirtualMachineImageId = "", - }, "") + Publisher = "Canonical", + Offer = "UbuntuServer", + Sku = "20_04-lts", + }, "batch.node.ubuntu 20.04"), + ResizeTimeout = XmlConvert.ToTimeSpan("PT15M"), + TargetDedicatedNodes = 5, + TargetLowPriorityNodes = 0, + EnableAutoScale = false, + TaskSlotsPerNode = 3, + TaskSchedulingPolicy = new BatchTaskSchedulingPolicy(BatchNodeFillType.Spread), + MountConfiguration = {new MountConfiguration { - WindowsConfiguration = new WindowsConfiguration + AzureBlobFileSystemConfiguration = new AzureBlobFileSystemConfiguration("accountName", "blobContainerName", "bfusepath") { - EnableAutomaticUpdates = true, + AccountKey = "accountKey", }, - DataDisks = {new DataDisk(1234, 1234) - { - Caching = CachingType.None, - StorageAccountType = StorageAccountType.StandardLRS, - }}, - LicenseType = "", - ContainerConfiguration = new ContainerConfiguration(ContainerType.DockerCompatible) + }, new MountConfiguration + { + AzureFileShareConfiguration = new AzureFileShareConfiguration("accountName", "https://myaccount.file.core.windows.net/fileshare", "accountKey", "filesharepath") { - ContainerImageNames = { "" }, - ContainerRegistries = {new ContainerRegistryReference - { - Username = "", - Password = "", - RegistryServer = "", - IdentityReference = new BatchNodeIdentityReference - { - ResourceId = "", - }, - }}, + MountOptions = "mount options ver=1.0", }, - DiskEncryptionConfiguration = new DiskEncryptionConfiguration + }, new MountConfiguration + { + NfsMountConfiguration = new NfsMountConfiguration("somesource nfs url", "mountpath") { - Targets = { DiskEncryptionTarget.OsDisk }, + MountOptions = "mount options ver=1.0", }, - NodePlacementConfiguration = new BatchNodePlacementConfiguration + }, new MountConfiguration + { + CifsMountConfiguration = new CifsMountConfiguration("accountName", "//myaccount.file.core.windows.net/file", "mountpath", "password") { - Policy = BatchNodePlacementPolicyType.Regional, + MountOptions = "mount options ver=1.0", }, - Extensions = {new VMExtension("", "", "") - { - TypeHandlerVersion = "", - AutoUpgradeMinorVersion = true, - EnableAutomaticUpgrade = true, - Settings = - { - ["key"] = "" - }, - ProtectedSettings = - { - ["key"] = "" - }, - ProvisionAfterExtensions = {""}, - }}, + }}, +}; +Response response = client.CreatePool(pool); +]]> +This sample shows how to call CreatePool. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchPoolCreateContent pool = new BatchPoolCreateContent("mypool001", "standard_d2s_v3") +{ + VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference + { + Publisher = "Canonical", + Offer = "0001-com-ubuntu-server-focal", + Sku = "20_04-lts", + }, "batch.node.ubuntu 20.04") + { OsDisk = new OSDisk { EphemeralOSDiskSettings = new DiffDiskSettings { Placement = DiffDiskPlacement.CacheDisk, }, - Caching = CachingType.None, - DiskSizeGB = 1234, - ManagedDisk = new ManagedDisk(StorageAccountType.StandardLRS), - WriteAcceleratorEnabled = true, + Caching = CachingType.ReadWrite, + DiskSizeGB = 100, + ManagedDisk = new ManagedDisk(StorageAccountType.StandardSSDLRS), }, - SecurityProfile = new SecurityProfile(true, SecurityTypes.TrustedLaunch, new UefiSettings - { - SecureBootEnabled = true, - VTpmEnabled = true, - }), - ServiceArtifactReference = new ServiceArtifactReference(""), }, - ResizeTimeout = XmlConvert.ToTimeSpan("PT1H23M45S"), + ResizeTimeout = XmlConvert.ToTimeSpan("PT15M"), + TargetDedicatedNodes = 1, + TargetLowPriorityNodes = 0, + EnableAutoScale = false, + TaskSlotsPerNode = 1, +}; +Response response = client.CreatePool(pool); +]]> +This sample shows how to call CreatePool. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchPoolCreateContent pool = new BatchPoolCreateContent("mypool001", "STANDARD_DC2s_V2") +{ + VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference + { + Publisher = "Canonical", + Offer = "UbuntuServer", + Sku = "18_04-lts-gen2", + Version = "latest", + }, "batch.node.ubuntu 18.04"), ResourceTags = { - ["key"] = "" + ["TagName1"] = "TagValue1", + ["TagName2"] = "TagValue2" }, - TargetDedicatedNodes = 1234, - TargetLowPriorityNodes = 1234, - EnableAutoScale = true, - AutoScaleFormula = "", - AutoScaleEvaluationInterval = XmlConvert.ToTimeSpan("PT1H23M45S"), - EnableInterNodeCommunication = true, - NetworkConfiguration = new NetworkConfiguration - { - SubnetId = "", - DynamicVNetAssignmentScope = DynamicVNetAssignmentScope.None, - EndpointConfiguration = new BatchPoolEndpointConfiguration(new InboundNatPool[] + TargetDedicatedNodes = 1, +}; +Response response = client.CreatePool(pool); +]]> +This sample shows how to call CreatePool. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchPoolCreateContent pool = new BatchPoolCreateContent("mypool001", "STANDARD_DC2s_V2") +{ + VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference + { + Publisher = "Canonical", + Offer = "UbuntuServer", + Sku = "18_04-lts-gen2", + Version = "latest", + }, "batch.node.ubuntu 18.04") + { + SecurityProfile = new SecurityProfile(true, SecurityTypes.TrustedLaunch, new UefiSettings { - new InboundNatPool("", InboundEndpointProtocol.Tcp, 1234, 1234, 1234) - { - NetworkSecurityGroupRules = {new NetworkSecurityGroupRule(1234, NetworkSecurityGroupRuleAccess.Allow, "") - { - SourcePortRanges = {""}, - }}, - } + SecureBootEnabled = false, }), - PublicIpAddressConfiguration = new PublicIpAddressConfiguration - { - IpAddressProvisioningType = IpAddressProvisioningType.BatchManaged, - IpAddressIds = { "" }, - }, - EnableAcceleratedNetworking = true, }, - StartTask = new BatchStartTask("") + TargetDedicatedNodes = 1, +}; +Response response = client.CreatePool(pool); +]]> +This sample shows how to call CreatePool. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchPoolCreateContent pool = new BatchPoolCreateContent("pool2", "standard_a1") +{ + VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference + { + Publisher = "Canonical", + Offer = "0001-com-ubuntu-server-focal", + Sku = "20_04-lts", + }, "batch.node.ubuntu 20.04"), + ResizeTimeout = XmlConvert.ToTimeSpan("PT15M"), + TargetDedicatedNodes = 5, + TargetLowPriorityNodes = 0, + EnableAutoScale = false, + EnableInterNodeCommunication = true, + TaskSlotsPerNode = 3, + TaskSchedulingPolicy = new BatchTaskSchedulingPolicy(BatchNodeFillType.Spread), + Metadata = { new MetadataItem("myproperty", "myvalue") }, +}; +Response response = client.CreatePool(pool); +]]> +This sample shows how to call CreatePool. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchPoolCreateContent pool = new BatchPoolCreateContent("pool2", "standard_a1") +{ + VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference + { + Publisher = "Canonical", + Offer = "0001-com-ubuntu-server-focal", + Sku = "120_04-lts", + }, "batch.node.ubuntu 20.04") { - ContainerSettings = new BatchTaskContainerSettings("") + ContainerConfiguration = new ContainerConfiguration(ContainerType.DockerCompatible) { - ContainerRunOptions = "", - Registry = default, - WorkingDirectory = ContainerWorkingDirectory.TaskWorkingDirectory, + ContainerImageNames = { "busybox" }, }, - ResourceFiles = {new ResourceFile - { - AutoStorageContainerName = "", - StorageContainerUrl = "", - HttpUrl = "", - BlobPrefix = "", - FilePath = "", - FileMode = "", - IdentityReference = default, - }}, - EnvironmentSettings = {new EnvironmentSetting("") - { - Value = "", - }}, - UserIdentity = new UserIdentity + }, + ResizeTimeout = XmlConvert.ToTimeSpan("PT15M"), + TargetDedicatedNodes = 5, + TargetLowPriorityNodes = 0, + EnableAutoScale = false, + TaskSlotsPerNode = 3, + TaskSchedulingPolicy = new BatchTaskSchedulingPolicy(BatchNodeFillType.Spread), +}; +Response response = client.CreatePool(pool); +]]> +This sample shows how to call CreatePool. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchPoolCreateContent pool = new BatchPoolCreateContent("pool2", "standard_a1") +{ + VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference + { + Publisher = "Canonical", + Offer = "0001-com-ubuntu-server-focal", + Sku = "20_04-lts", + }, "batch.node.ubuntu 20.04") + { + Extensions = {new VMExtension("batchextension1", "Microsoft.Azure.KeyVault", "KeyVaultForLinux") { - Username = "", - AutoUser = new AutoUserSpecification + TypeHandlerVersion = "2.0", + AutoUpgradeMinorVersion = true, + EnableAutomaticUpgrade = true, + Settings = { - Scope = AutoUserScope.Task, - ElevationLevel = ElevationLevel.NonAdmin, + ["secretsManagementSettingsKey"] = "secretsManagementSettingsValue", + ["authenticationSettingsKey"] = "authenticationSettingsValue" }, - }, - MaxTaskRetryCount = 1234, - WaitForSuccess = true, + }}, }, - ApplicationPackageReferences = {new BatchApplicationPackageReference("") - { - Version = "", - }}, - TaskSlotsPerNode = 1234, + ResizeTimeout = XmlConvert.ToTimeSpan("PT15M"), + TargetDedicatedNodes = 5, + TargetLowPriorityNodes = 0, + EnableAutoScale = false, + EnableInterNodeCommunication = true, + TaskSlotsPerNode = 3, TaskSchedulingPolicy = new BatchTaskSchedulingPolicy(BatchNodeFillType.Spread), - UserAccounts = {new UserAccount("", "") - { - ElevationLevel = ElevationLevel.NonAdmin, - LinuxUserConfiguration = new LinuxUserConfiguration - { - Uid = 1234, - Gid = 1234, - SshPrivateKey = "", - }, - WindowsUserConfiguration = new WindowsUserConfiguration - { - LoginMode = LoginMode.Batch, - }, - }}, - Metadata = { new MetadataItem("", "") }, - MountConfiguration = {new MountConfiguration + Metadata = { new MetadataItem("myproperty", "myvalue") }, + TargetNodeCommunicationMode = BatchNodeCommunicationMode.Simplified, +}; +Response response = client.CreatePool(pool); +]]> +This sample shows how to call CreatePool. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchPoolCreateContent pool = new BatchPoolCreateContent("mypool002", "Standard_A1_v2") +{ + VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference { - AzureBlobFileSystemConfiguration = new AzureBlobFileSystemConfiguration("", "", "") - { - AccountKey = "", - SasKey = "", - BlobfuseOptions = "", - IdentityReference = default, - }, - NfsMountConfiguration = new NfsMountConfiguration("", "") - { - MountOptions = "", - }, - CifsMountConfiguration = new CifsMountConfiguration("", "", "", "") - { - MountOptions = "", - }, - AzureFileShareConfiguration = new AzureFileShareConfiguration("", "", "", "") - { - MountOptions = "", - }, - }}, - TargetNodeCommunicationMode = BatchNodeCommunicationMode.Default, - UpgradePolicy = new UpgradePolicy(UpgradeMode.Automatic) + Publisher = "MicrosoftWindowsServer", + Offer = "WindowsServer", + Sku = "2016-datacenter-smalldisk", + Version = "latest", + }, "batch.node.windows amd64") { - AutomaticOsUpgradePolicy = new AutomaticOsUpgradePolicy - { - DisableAutomaticRollback = true, - EnableAutomaticOsUpgrade = true, - UseRollingUpgradePolicy = true, - OsRollingUpgradeDeferral = true, - }, - RollingUpgradePolicy = new RollingUpgradePolicy + WindowsConfiguration = new WindowsConfiguration { - EnableCrossZoneUpgrade = true, - MaxBatchInstancePercent = 1234, - MaxUnhealthyInstancePercent = 1234, - MaxUnhealthyUpgradedInstancePercent = 1234, - PauseTimeBetweenBatches = XmlConvert.ToTimeSpan("PT1H23M45S"), - PrioritizeUnhealthyInstances = true, - RollbackFailedInstancesOnPolicyBreach = true, + EnableAutomaticUpdates = false, }, + ServiceArtifactReference = new ServiceArtifactReference("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Compute/galleries/myGallery/serviceArtifacts/myServiceArtifact/vmArtifactsProfiles/vmArtifactsProfile"), }, + TargetDedicatedNodes = 2, }; -Response response = client.CreatePool(pool, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +Response response = client.CreatePool(pool); ]]> This sample shows how to call CreatePoolAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - id = "", - vmSize = "", + id = "mypool01", + vmSize = "Standard_D1_v2", + virtualMachineConfiguration = new + { + imageReference = new + { + publisher = "MicrosoftWindowsServer", + offer = "WindowsServer", + sku = "2016-datacenter-smalldisk", + version = "latest", + }, + nodeAgentSKUId = "batch.node.windows amd64", + }, + targetDedicatedNodes = 2, + networkConfiguration = new + { + enableAcceleratedNetworking = true, + }, }); Response response = await client.CreatePoolAsync(content); Console.WriteLine(response.Status); ]]> -This sample shows how to call CreatePoolAsync with all parameters and request content. +This sample shows how to call CreatePoolAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - id = "", - displayName = "", - vmSize = "", + id = "pool2", + vmSize = "standard_a1", virtualMachineConfiguration = new { imageReference = new { - publisher = "", - offer = "", - sku = "", - version = "", - virtualMachineImageId = "", - }, - nodeAgentSKUId = "", - windowsConfiguration = new - { - enableAutomaticUpdates = true, + publisher = "Canonical", + offer = "UbuntuServer", + sku = "20_04-lts", }, - dataDisks = new object[] + nodeAgentSKUId = "batch.node.ubuntu 20.04", + }, + mountConfiguration = new object[] + { + new { - new + azureBlobFileSystemConfiguration = new { - lun = 1234, - caching = "none", - diskSizeGB = 1234, - storageAccountType = "standard_lrs", - } + accountName = "accountName", + containerName = "blobContainerName", + accountKey = "accountKey", + relativeMountPath = "bfusepath", + }, }, - licenseType = "", - containerConfiguration = new + new { - type = "dockerCompatible", - containerImageNames = new object[] - { - "" - }, - containerRegistries = new object[] + azureFileShareConfiguration = new { - new - { - username = "", - password = "", - registryServer = "", - identityReference = new - { - resourceId = "", - }, - } + accountName = "accountName", + azureFileUrl = "https://myaccount.file.core.windows.net/fileshare", + accountKey = "accountKey", + relativeMountPath = "filesharepath", + mountOptions = "mount options ver=1.0", }, }, - diskEncryptionConfiguration = new + new { - targets = new object[] + nfsMountConfiguration = new { - "osdisk" + source = "somesource nfs url", + relativeMountPath = "mountpath", + mountOptions = "mount options ver=1.0", }, }, - nodePlacementConfiguration = new - { - policy = "regional", - }, - extensions = new object[] + new { - new + cifsMountConfiguration = new { - name = "", - publisher = "", - type = "", - typeHandlerVersion = "", - autoUpgradeMinorVersion = true, - enableAutomaticUpgrade = true, - settings = new - { - key = "", - }, - protectedSettings = new - { - key = "", - }, - provisionAfterExtensions = new object[] - { - "" - }, - } + username = "accountName", + password = "password", + source = "//myaccount.file.core.windows.net/file", + relativeMountPath = "mountpath", + mountOptions = "mount options ver=1.0", + }, + } + }, + resizeTimeout = "PT15M", + targetDedicatedNodes = 5, + targetLowPriorityNodes = 0, + taskSlotsPerNode = 3, + taskSchedulingPolicy = new + { + nodeFillType = "spread", + }, + enableAutoScale = false, +}); +Response response = await client.CreatePoolAsync(content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call CreatePoolAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + id = "mypool001", + vmSize = "standard_d2s_v3", + virtualMachineConfiguration = new + { + imageReference = new + { + publisher = "Canonical", + offer = "0001-com-ubuntu-server-focal", + sku = "20_04-lts", }, osDisk = new { - ephemeralOSDiskSettings = new - { - placement = "cachedisk", - }, - caching = "none", - diskSizeGB = 1234, + diskSizeGB = 100, managedDisk = new { - storageAccountType = "standard_lrs", + storageAccountType = "standardssd_lrs", }, - writeAcceleratorEnabled = true, - }, - securityProfile = new - { - encryptionAtHost = true, - securityType = "trustedLaunch", - uefiSettings = new + caching = "readwrite", + ephemeralOSDiskSettings = new { - secureBootEnabled = true, - vTpmEnabled = true, + placement = "cachedisk", }, }, - serviceArtifactReference = new + nodeAgentSKUId = "batch.node.ubuntu 20.04", + }, + resizeTimeout = "PT15M", + targetDedicatedNodes = 1, + targetLowPriorityNodes = 0, + taskSlotsPerNode = 1, + enableAutoScale = false, +}); +Response response = await client.CreatePoolAsync(content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call CreatePoolAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + id = "mypool001", + vmSize = "STANDARD_DC2s_V2", + virtualMachineConfiguration = new + { + imageReference = new { - id = "", + publisher = "Canonical", + offer = "UbuntuServer", + sku = "18_04-lts-gen2", + version = "latest", }, + nodeAgentSKUId = "batch.node.ubuntu 18.04", }, - resizeTimeout = "PT1H23M45S", + targetDedicatedNodes = 1, resourceTags = new { - key = "", + TagName1 = "TagValue1", + TagName2 = "TagValue2", }, - targetDedicatedNodes = 1234, - targetLowPriorityNodes = 1234, - enableAutoScale = true, - autoScaleFormula = "", - autoScaleEvaluationInterval = "PT1H23M45S", - enableInterNodeCommunication = true, - networkConfiguration = new +}); +Response response = await client.CreatePoolAsync(content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call CreatePoolAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + id = "mypool001", + vmSize = "STANDARD_DC2s_V2", + virtualMachineConfiguration = new { - subnetId = "", - dynamicVNetAssignmentScope = "none", - endpointConfiguration = new + imageReference = new { - inboundNATPools = new object[] - { - new - { - name = "", - protocol = "tcp", - backendPort = 1234, - frontendPortRangeStart = 1234, - frontendPortRangeEnd = 1234, - networkSecurityGroupRules = new object[] - { - new - { - priority = 1234, - access = "allow", - sourceAddressPrefix = "", - sourcePortRanges = new object[] - { - "" - }, - } - }, - } - }, + publisher = "Canonical", + offer = "UbuntuServer", + sku = "18_04-lts-gen2", + version = "latest", }, - publicIPAddressConfiguration = new + nodeAgentSKUId = "batch.node.ubuntu 18.04", + securityProfile = new { - provision = "batchmanaged", - ipAddressIds = new object[] + securityType = "trustedLaunch", + encryptionAtHost = true, + uefiSettings = new { - "" + secureBootEnabled = false, }, }, - enableAcceleratedNetworking = true, }, - startTask = new - { - commandLine = "", - containerSettings = new - { - containerRunOptions = "", - imageName = "", - workingDirectory = "taskWorkingDirectory", - }, - resourceFiles = new object[] - { - new - { - autoStorageContainerName = "", - storageContainerUrl = "", - httpUrl = "", - blobPrefix = "", - filePath = "", - fileMode = "", - } - }, - environmentSettings = new object[] - { - new - { - name = "", - value = "", - } - }, - userIdentity = new + targetDedicatedNodes = 1, +}); +Response response = await client.CreatePoolAsync(content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call CreatePoolAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + id = "pool2", + vmSize = "standard_a1", + virtualMachineConfiguration = new + { + imageReference = new { - username = "", - autoUser = new - { - scope = "task", - elevationLevel = "nonadmin", - }, + publisher = "Canonical", + offer = "0001-com-ubuntu-server-focal", + sku = "20_04-lts", }, - maxTaskRetryCount = 1234, - waitForSuccess = true, + nodeAgentSKUId = "batch.node.ubuntu 20.04", + }, + resizeTimeout = "PT15M", + targetDedicatedNodes = 5, + targetLowPriorityNodes = 0, + taskSlotsPerNode = 3, + taskSchedulingPolicy = new + { + nodeFillType = "spread", }, - applicationPackageReferences = new object[] + enableAutoScale = false, + enableInterNodeCommunication = true, + metadata = new object[] { new { - applicationId = "", - version = "", + name = "myproperty", + value = "myvalue", } }, - taskSlotsPerNode = 1234, +}); +Response response = await client.CreatePoolAsync(content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call CreatePoolAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + id = "pool2", + vmSize = "standard_a1", + virtualMachineConfiguration = new + { + imageReference = new + { + publisher = "Canonical", + offer = "0001-com-ubuntu-server-focal", + sku = "120_04-lts", + }, + nodeAgentSKUId = "batch.node.ubuntu 20.04", + containerConfiguration = new + { + type = "dockerCompatible", + containerImageNames = new object[] + { + "busybox" + }, + }, + }, + resizeTimeout = "PT15M", + targetDedicatedNodes = 5, + targetLowPriorityNodes = 0, + taskSlotsPerNode = 3, taskSchedulingPolicy = new { nodeFillType = "spread", }, - userAccounts = new object[] + enableAutoScale = false, +}); +Response response = await client.CreatePoolAsync(content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call CreatePoolAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + id = "pool2", + vmSize = "standard_a1", + virtualMachineConfiguration = new { - new + imageReference = new { - name = "", - password = "", - elevationLevel = "nonadmin", - linuxUserConfiguration = new - { - uid = 1234, - gid = 1234, - sshPrivateKey = "", - }, - windowsUserConfiguration = new + publisher = "Canonical", + offer = "0001-com-ubuntu-server-focal", + sku = "20_04-lts", + }, + nodeAgentSKUId = "batch.node.ubuntu 20.04", + extensions = new object[] + { + new { - loginMode = "batch", - }, - } + name = "batchextension1", + type = "KeyVaultForLinux", + publisher = "Microsoft.Azure.KeyVault", + typeHandlerVersion = "2.0", + autoUpgradeMinorVersion = true, + enableAutomaticUpgrade = true, + settings = new + { + secretsManagementSettingsKey = "secretsManagementSettingsValue", + authenticationSettingsKey = "authenticationSettingsValue", + }, + } + }, }, - metadata = new object[] + resizeTimeout = "PT15M", + targetDedicatedNodes = 5, + targetLowPriorityNodes = 0, + taskSlotsPerNode = 3, + taskSchedulingPolicy = new { - new - { - name = "", - value = "", - } + nodeFillType = "spread", }, - mountConfiguration = new object[] + enableAutoScale = false, + enableInterNodeCommunication = true, + metadata = new object[] { new { - azureBlobFileSystemConfiguration = new - { - accountName = "", - containerName = "", - accountKey = "", - sasKey = "", - blobfuseOptions = "", - relativeMountPath = "", - }, - nfsMountConfiguration = new - { - source = "", - relativeMountPath = "", - mountOptions = "", - }, - cifsMountConfiguration = new - { - username = "", - source = "", - relativeMountPath = "", - mountOptions = "", - password = "", - }, - azureFileShareConfiguration = new - { - accountName = "", - azureFileUrl = "", - accountKey = "", - relativeMountPath = "", - mountOptions = "", - }, + name = "myproperty", + value = "myvalue", } }, - targetNodeCommunicationMode = "default", - upgradePolicy = new + targetNodeCommunicationMode = "simplified", +}); +Response response = await client.CreatePoolAsync(content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call CreatePoolAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + id = "mypool002", + vmSize = "Standard_A1_v2", + virtualMachineConfiguration = new { - mode = "automatic", - automaticOSUpgradePolicy = new + imageReference = new { - disableAutomaticRollback = true, - enableAutomaticOSUpgrade = true, - useRollingUpgradePolicy = true, - osRollingUpgradeDeferral = true, + publisher = "MicrosoftWindowsServer", + offer = "WindowsServer", + sku = "2016-datacenter-smalldisk", + version = "latest", }, - rollingUpgradePolicy = new + windowsConfiguration = new + { + enableAutomaticUpdates = false, + }, + serviceArtifactReference = new { - enableCrossZoneUpgrade = true, - maxBatchInstancePercent = 1234, - maxUnhealthyInstancePercent = 1234, - maxUnhealthyUpgradedInstancePercent = 1234, - pauseTimeBetweenBatches = "PT1H23M45S", - prioritizeUnhealthyInstances = true, - rollbackFailedInstancesOnPolicyBreach = true, + id = "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Compute/galleries/myGallery/serviceArtifacts/myServiceArtifact/vmArtifactsProfiles/vmArtifactsProfile", }, + nodeAgentSKUId = "batch.node.windows amd64", }, + targetDedicatedNodes = 2, }); -Response response = await client.CreatePoolAsync(content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +Response response = await client.CreatePoolAsync(content); Console.WriteLine(response.Status); ]]> @@ -894,335 +1015,402 @@ Console.WriteLine(response.Status); This sample shows how to call CreatePool. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - id = "", - vmSize = "", + id = "mypool01", + vmSize = "Standard_D1_v2", + virtualMachineConfiguration = new + { + imageReference = new + { + publisher = "MicrosoftWindowsServer", + offer = "WindowsServer", + sku = "2016-datacenter-smalldisk", + version = "latest", + }, + nodeAgentSKUId = "batch.node.windows amd64", + }, + targetDedicatedNodes = 2, + networkConfiguration = new + { + enableAcceleratedNetworking = true, + }, }); Response response = client.CreatePool(content); Console.WriteLine(response.Status); ]]> -This sample shows how to call CreatePool with all parameters and request content. +This sample shows how to call CreatePool. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - id = "", - displayName = "", - vmSize = "", + id = "pool2", + vmSize = "standard_a1", virtualMachineConfiguration = new { imageReference = new { - publisher = "", - offer = "", - sku = "", - version = "", - virtualMachineImageId = "", + publisher = "Canonical", + offer = "UbuntuServer", + sku = "20_04-lts", }, - nodeAgentSKUId = "", - windowsConfiguration = new - { - enableAutomaticUpdates = true, - }, - dataDisks = new object[] + nodeAgentSKUId = "batch.node.ubuntu 20.04", + }, + mountConfiguration = new object[] + { + new { - new + azureBlobFileSystemConfiguration = new { - lun = 1234, - caching = "none", - diskSizeGB = 1234, - storageAccountType = "standard_lrs", - } + accountName = "accountName", + containerName = "blobContainerName", + accountKey = "accountKey", + relativeMountPath = "bfusepath", + }, }, - licenseType = "", - containerConfiguration = new + new { - type = "dockerCompatible", - containerImageNames = new object[] - { - "" - }, - containerRegistries = new object[] + azureFileShareConfiguration = new { - new - { - username = "", - password = "", - registryServer = "", - identityReference = new - { - resourceId = "", - }, - } + accountName = "accountName", + azureFileUrl = "https://myaccount.file.core.windows.net/fileshare", + accountKey = "accountKey", + relativeMountPath = "filesharepath", + mountOptions = "mount options ver=1.0", }, }, - diskEncryptionConfiguration = new + new { - targets = new object[] + nfsMountConfiguration = new { - "osdisk" + source = "somesource nfs url", + relativeMountPath = "mountpath", + mountOptions = "mount options ver=1.0", }, }, - nodePlacementConfiguration = new - { - policy = "regional", - }, - extensions = new object[] + new { - new + cifsMountConfiguration = new { - name = "", - publisher = "", - type = "", - typeHandlerVersion = "", - autoUpgradeMinorVersion = true, - enableAutomaticUpgrade = true, - settings = new - { - key = "", - }, - protectedSettings = new - { - key = "", - }, - provisionAfterExtensions = new object[] - { - "" - }, - } + username = "accountName", + password = "password", + source = "//myaccount.file.core.windows.net/file", + relativeMountPath = "mountpath", + mountOptions = "mount options ver=1.0", + }, + } + }, + resizeTimeout = "PT15M", + targetDedicatedNodes = 5, + targetLowPriorityNodes = 0, + taskSlotsPerNode = 3, + taskSchedulingPolicy = new + { + nodeFillType = "spread", + }, + enableAutoScale = false, +}); +Response response = client.CreatePool(content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call CreatePool. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + id = "mypool001", + vmSize = "standard_d2s_v3", + virtualMachineConfiguration = new + { + imageReference = new + { + publisher = "Canonical", + offer = "0001-com-ubuntu-server-focal", + sku = "20_04-lts", }, osDisk = new { - ephemeralOSDiskSettings = new - { - placement = "cachedisk", - }, - caching = "none", - diskSizeGB = 1234, + diskSizeGB = 100, managedDisk = new { - storageAccountType = "standard_lrs", + storageAccountType = "standardssd_lrs", }, - writeAcceleratorEnabled = true, - }, - securityProfile = new - { - encryptionAtHost = true, - securityType = "trustedLaunch", - uefiSettings = new + caching = "readwrite", + ephemeralOSDiskSettings = new { - secureBootEnabled = true, - vTpmEnabled = true, + placement = "cachedisk", }, }, - serviceArtifactReference = new + nodeAgentSKUId = "batch.node.ubuntu 20.04", + }, + resizeTimeout = "PT15M", + targetDedicatedNodes = 1, + targetLowPriorityNodes = 0, + taskSlotsPerNode = 1, + enableAutoScale = false, +}); +Response response = client.CreatePool(content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call CreatePool. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + id = "mypool001", + vmSize = "STANDARD_DC2s_V2", + virtualMachineConfiguration = new + { + imageReference = new { - id = "", + publisher = "Canonical", + offer = "UbuntuServer", + sku = "18_04-lts-gen2", + version = "latest", }, + nodeAgentSKUId = "batch.node.ubuntu 18.04", }, - resizeTimeout = "PT1H23M45S", + targetDedicatedNodes = 1, resourceTags = new { - key = "", + TagName1 = "TagValue1", + TagName2 = "TagValue2", }, - targetDedicatedNodes = 1234, - targetLowPriorityNodes = 1234, - enableAutoScale = true, - autoScaleFormula = "", - autoScaleEvaluationInterval = "PT1H23M45S", - enableInterNodeCommunication = true, - networkConfiguration = new +}); +Response response = client.CreatePool(content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call CreatePool. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + id = "mypool001", + vmSize = "STANDARD_DC2s_V2", + virtualMachineConfiguration = new { - subnetId = "", - dynamicVNetAssignmentScope = "none", - endpointConfiguration = new + imageReference = new + { + publisher = "Canonical", + offer = "UbuntuServer", + sku = "18_04-lts-gen2", + version = "latest", + }, + nodeAgentSKUId = "batch.node.ubuntu 18.04", + securityProfile = new { - inboundNATPools = new object[] + securityType = "trustedLaunch", + encryptionAtHost = true, + uefiSettings = new { - new - { - name = "", - protocol = "tcp", - backendPort = 1234, - frontendPortRangeStart = 1234, - frontendPortRangeEnd = 1234, - networkSecurityGroupRules = new object[] - { - new - { - priority = 1234, - access = "allow", - sourceAddressPrefix = "", - sourcePortRanges = new object[] - { - "" - }, - } - }, - } - }, - }, - publicIPAddressConfiguration = new - { - provision = "batchmanaged", - ipAddressIds = new object[] - { - "" + secureBootEnabled = false, }, }, - enableAcceleratedNetworking = true, }, - startTask = new + targetDedicatedNodes = 1, +}); +Response response = client.CreatePool(content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call CreatePool. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + id = "pool2", + vmSize = "standard_a1", + virtualMachineConfiguration = new { - commandLine = "", - containerSettings = new + imageReference = new { - containerRunOptions = "", - imageName = "", - workingDirectory = "taskWorkingDirectory", + publisher = "Canonical", + offer = "0001-com-ubuntu-server-focal", + sku = "20_04-lts", }, - resourceFiles = new object[] + nodeAgentSKUId = "batch.node.ubuntu 20.04", + }, + resizeTimeout = "PT15M", + targetDedicatedNodes = 5, + targetLowPriorityNodes = 0, + taskSlotsPerNode = 3, + taskSchedulingPolicy = new + { + nodeFillType = "spread", + }, + enableAutoScale = false, + enableInterNodeCommunication = true, + metadata = new object[] + { + new { - new - { - autoStorageContainerName = "", - storageContainerUrl = "", - httpUrl = "", - blobPrefix = "", - filePath = "", - fileMode = "", - } - }, - environmentSettings = new object[] + name = "myproperty", + value = "myvalue", + } + }, +}); +Response response = client.CreatePool(content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call CreatePool. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + id = "pool2", + vmSize = "standard_a1", + virtualMachineConfiguration = new + { + imageReference = new { - new - { - name = "", - value = "", - } + publisher = "Canonical", + offer = "0001-com-ubuntu-server-focal", + sku = "120_04-lts", }, - userIdentity = new + nodeAgentSKUId = "batch.node.ubuntu 20.04", + containerConfiguration = new { - username = "", - autoUser = new + type = "dockerCompatible", + containerImageNames = new object[] { - scope = "task", - elevationLevel = "nonadmin", + "busybox" }, }, - maxTaskRetryCount = 1234, - waitForSuccess = true, - }, - applicationPackageReferences = new object[] - { - new - { - applicationId = "", - version = "", - } }, - taskSlotsPerNode = 1234, + resizeTimeout = "PT15M", + targetDedicatedNodes = 5, + targetLowPriorityNodes = 0, + taskSlotsPerNode = 3, taskSchedulingPolicy = new { nodeFillType = "spread", }, - userAccounts = new object[] + enableAutoScale = false, +}); +Response response = client.CreatePool(content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call CreatePool. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + id = "pool2", + vmSize = "standard_a1", + virtualMachineConfiguration = new { - new + imageReference = new { - name = "", - password = "", - elevationLevel = "nonadmin", - linuxUserConfiguration = new - { - uid = 1234, - gid = 1234, - sshPrivateKey = "", - }, - windowsUserConfiguration = new + publisher = "Canonical", + offer = "0001-com-ubuntu-server-focal", + sku = "20_04-lts", + }, + nodeAgentSKUId = "batch.node.ubuntu 20.04", + extensions = new object[] + { + new { - loginMode = "batch", - }, - } + name = "batchextension1", + type = "KeyVaultForLinux", + publisher = "Microsoft.Azure.KeyVault", + typeHandlerVersion = "2.0", + autoUpgradeMinorVersion = true, + enableAutomaticUpgrade = true, + settings = new + { + secretsManagementSettingsKey = "secretsManagementSettingsValue", + authenticationSettingsKey = "authenticationSettingsValue", + }, + } + }, }, - metadata = new object[] + resizeTimeout = "PT15M", + targetDedicatedNodes = 5, + targetLowPriorityNodes = 0, + taskSlotsPerNode = 3, + taskSchedulingPolicy = new { - new - { - name = "", - value = "", - } + nodeFillType = "spread", }, - mountConfiguration = new object[] + enableAutoScale = false, + enableInterNodeCommunication = true, + metadata = new object[] { new { - azureBlobFileSystemConfiguration = new - { - accountName = "", - containerName = "", - accountKey = "", - sasKey = "", - blobfuseOptions = "", - relativeMountPath = "", - }, - nfsMountConfiguration = new - { - source = "", - relativeMountPath = "", - mountOptions = "", - }, - cifsMountConfiguration = new - { - username = "", - source = "", - relativeMountPath = "", - mountOptions = "", - password = "", - }, - azureFileShareConfiguration = new - { - accountName = "", - azureFileUrl = "", - accountKey = "", - relativeMountPath = "", - mountOptions = "", - }, + name = "myproperty", + value = "myvalue", } }, - targetNodeCommunicationMode = "default", - upgradePolicy = new + targetNodeCommunicationMode = "simplified", +}); +Response response = client.CreatePool(content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call CreatePool. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + id = "mypool002", + vmSize = "Standard_A1_v2", + virtualMachineConfiguration = new { - mode = "automatic", - automaticOSUpgradePolicy = new + imageReference = new + { + publisher = "MicrosoftWindowsServer", + offer = "WindowsServer", + sku = "2016-datacenter-smalldisk", + version = "latest", + }, + windowsConfiguration = new { - disableAutomaticRollback = true, - enableAutomaticOSUpgrade = true, - useRollingUpgradePolicy = true, - osRollingUpgradeDeferral = true, + enableAutomaticUpdates = false, }, - rollingUpgradePolicy = new + serviceArtifactReference = new { - enableCrossZoneUpgrade = true, - maxBatchInstancePercent = 1234, - maxUnhealthyInstancePercent = 1234, - maxUnhealthyUpgradedInstancePercent = 1234, - pauseTimeBetweenBatches = "PT1H23M45S", - prioritizeUnhealthyInstances = true, - rollbackFailedInstancesOnPolicyBreach = true, + id = "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Compute/galleries/myGallery/serviceArtifacts/myServiceArtifact/vmArtifactsProfiles/vmArtifactsProfile", }, + nodeAgentSKUId = "batch.node.windows amd64", }, + targetDedicatedNodes = 2, }); -Response response = client.CreatePool(content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +Response response = client.CreatePool(content); Console.WriteLine(response.Status); ]]> @@ -1231,599 +1419,273 @@ Console.WriteLine(response.Status); This sample shows how to call DeletePoolAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -Response response = await client.DeletePoolAsync(""); +Response response = await client.DeletePoolAsync("poolId"); Console.WriteLine(response.Status); -]]> -This sample shows how to call DeletePoolAsync with all parameters. +]]> + + + +This sample shows how to call DeletePool. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -Response response = await client.DeletePoolAsync("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); +Response response = client.DeletePool("poolId"); Console.WriteLine(response.Status); ]]> - + -This sample shows how to call DeletePool. +This sample shows how to call GetPoolAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -Response response = client.DeletePool(""); +Response response = await client.GetPoolAsync("pool"); +]]> +This sample shows how to call GetPoolAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); -Console.WriteLine(response.Status); +Response response = await client.GetPoolAsync("pool"); ]]> -This sample shows how to call DeletePool with all parameters. +This sample shows how to call GetPoolAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -Response response = client.DeletePool("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); +Response response = await client.GetPoolAsync("mypool001"); +]]> +This sample shows how to call GetPoolAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); -Console.WriteLine(response.Status); -]]> - - - +Response response = await client.GetPoolAsync("pool"); +]]> This sample shows how to call GetPoolAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -Response response = await client.GetPoolAsync(""); +Response response = await client.GetPoolAsync("mypool001"); ]]> -This sample shows how to call GetPoolAsync with all parameters. +This sample shows how to call GetPoolAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -Response response = await client.GetPoolAsync("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), select: new string[] { "" }, expand: new string[] { "" }, requestConditions: null); +Response response = client.GetPool("pool"); ]]> This sample shows how to call GetPoolAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -Response response = await client.GetPoolAsync("", null, null, null, null, null, null); +Response response = await client.GetPoolAsync("pool", null, DateTimeOffset.Parse("Fri, 28 Apr 2023 02:43:01 GMT"), null, null, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call GetPoolAsync with all parameters and parse the result. +This sample shows how to call GetPoolAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -Response response = await client.GetPoolAsync("", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), new string[] { "" }, new string[] { "" }, null, null); +Response response = client.GetPool("pool", null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null, null, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("url").ToString()); -Console.WriteLine(result.GetProperty("eTag").ToString()); -Console.WriteLine(result.GetProperty("lastModified").ToString()); -Console.WriteLine(result.GetProperty("creationTime").ToString()); -Console.WriteLine(result.GetProperty("state").ToString()); -Console.WriteLine(result.GetProperty("stateTransitionTime").ToString()); -Console.WriteLine(result.GetProperty("allocationState").ToString()); -Console.WriteLine(result.GetProperty("allocationStateTransitionTime").ToString()); -Console.WriteLine(result.GetProperty("vmSize").ToString()); -Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("publisher").ToString()); -Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("offer").ToString()); -Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("sku").ToString()); -Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("virtualMachineImageId").ToString()); -Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("exactVersion").ToString()); -Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("nodeAgentSKUId").ToString()); -Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("windowsConfiguration").GetProperty("enableAutomaticUpdates").ToString()); -Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("lun").ToString()); -Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("caching").ToString()); -Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("diskSizeGB").ToString()); -Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("storageAccountType").ToString()); -Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("licenseType").ToString()); -Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerImageNames")[0].ToString()); -Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("username").ToString()); -Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("password").ToString()); -Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("registryServer").ToString()); -Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); -Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("diskEncryptionConfiguration").GetProperty("targets")[0].ToString()); -Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("nodePlacementConfiguration").GetProperty("policy").ToString()); -Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("publisher").ToString()); -Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("typeHandlerVersion").ToString()); -Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("autoUpgradeMinorVersion").ToString()); -Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("enableAutomaticUpgrade").ToString()); -Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("settings").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("protectedSettings").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("provisionAfterExtensions")[0].ToString()); -Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("ephemeralOSDiskSettings").GetProperty("placement").ToString()); -Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("caching").ToString()); -Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); -Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("managedDisk").GetProperty("storageAccountType").ToString()); -Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("writeAcceleratorEnabled").ToString()); -Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("encryptionAtHost").ToString()); -Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("securityType").ToString()); -Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("uefiSettings").GetProperty("secureBootEnabled").ToString()); -Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("uefiSettings").GetProperty("vTpmEnabled").ToString()); -Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("serviceArtifactReference").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("resizeTimeout").ToString()); -Console.WriteLine(result.GetProperty("resizeErrors")[0].GetProperty("code").ToString()); -Console.WriteLine(result.GetProperty("resizeErrors")[0].GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("resizeErrors")[0].GetProperty("values")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("resizeErrors")[0].GetProperty("values")[0].GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("resourceTags").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("currentDedicatedNodes").ToString()); -Console.WriteLine(result.GetProperty("currentLowPriorityNodes").ToString()); -Console.WriteLine(result.GetProperty("targetDedicatedNodes").ToString()); -Console.WriteLine(result.GetProperty("targetLowPriorityNodes").ToString()); -Console.WriteLine(result.GetProperty("enableAutoScale").ToString()); -Console.WriteLine(result.GetProperty("autoScaleFormula").ToString()); -Console.WriteLine(result.GetProperty("autoScaleEvaluationInterval").ToString()); -Console.WriteLine(result.GetProperty("autoScaleRun").GetProperty("timestamp").ToString()); -Console.WriteLine(result.GetProperty("autoScaleRun").GetProperty("results").ToString()); -Console.WriteLine(result.GetProperty("autoScaleRun").GetProperty("error").GetProperty("code").ToString()); -Console.WriteLine(result.GetProperty("autoScaleRun").GetProperty("error").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("autoScaleRun").GetProperty("error").GetProperty("values")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("autoScaleRun").GetProperty("error").GetProperty("values")[0].GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("enableInterNodeCommunication").ToString()); -Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("subnetId").ToString()); -Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("dynamicVNetAssignmentScope").ToString()); -Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("protocol").ToString()); -Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("backendPort").ToString()); -Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("frontendPortRangeStart").ToString()); -Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("frontendPortRangeEnd").ToString()); -Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("priority").ToString()); -Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("access").ToString()); -Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("sourceAddressPrefix").ToString()); -Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("sourcePortRanges")[0].ToString()); -Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("publicIPAddressConfiguration").GetProperty("provision").ToString()); -Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("publicIPAddressConfiguration").GetProperty("ipAddressIds")[0].ToString()); -Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("enableAcceleratedNetworking").ToString()); -Console.WriteLine(result.GetProperty("startTask").GetProperty("commandLine").ToString()); -Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); -Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); -Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); -Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); -Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); -Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); -Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); -Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); -Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); -Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); -Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); -Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); -Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); -Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); -Console.WriteLine(result.GetProperty("startTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("startTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("startTask").GetProperty("userIdentity").GetProperty("username").ToString()); -Console.WriteLine(result.GetProperty("startTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); -Console.WriteLine(result.GetProperty("startTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); -Console.WriteLine(result.GetProperty("startTask").GetProperty("maxTaskRetryCount").ToString()); -Console.WriteLine(result.GetProperty("startTask").GetProperty("waitForSuccess").ToString()); -Console.WriteLine(result.GetProperty("applicationPackageReferences")[0].GetProperty("applicationId").ToString()); -Console.WriteLine(result.GetProperty("applicationPackageReferences")[0].GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("taskSlotsPerNode").ToString()); -Console.WriteLine(result.GetProperty("taskSchedulingPolicy").GetProperty("nodeFillType").ToString()); -Console.WriteLine(result.GetProperty("userAccounts")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("userAccounts")[0].GetProperty("password").ToString()); -Console.WriteLine(result.GetProperty("userAccounts")[0].GetProperty("elevationLevel").ToString()); -Console.WriteLine(result.GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("uid").ToString()); -Console.WriteLine(result.GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("gid").ToString()); -Console.WriteLine(result.GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("sshPrivateKey").ToString()); -Console.WriteLine(result.GetProperty("userAccounts")[0].GetProperty("windowsUserConfiguration").GetProperty("loginMode").ToString()); -Console.WriteLine(result.GetProperty("metadata")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("metadata")[0].GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("stats").GetProperty("url").ToString()); -Console.WriteLine(result.GetProperty("stats").GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("stats").GetProperty("lastUpdateTime").ToString()); -Console.WriteLine(result.GetProperty("stats").GetProperty("usageStats").GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("stats").GetProperty("usageStats").GetProperty("lastUpdateTime").ToString()); -Console.WriteLine(result.GetProperty("stats").GetProperty("usageStats").GetProperty("dedicatedCoreTime").ToString()); -Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("lastUpdateTime").ToString()); -Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("avgCPUPercentage").ToString()); -Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("avgMemoryGiB").ToString()); -Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("peakMemoryGiB").ToString()); -Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("avgDiskGiB").ToString()); -Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("peakDiskGiB").ToString()); -Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("diskReadIOps").ToString()); -Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("diskWriteIOps").ToString()); -Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("diskReadGiB").ToString()); -Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("diskWriteGiB").ToString()); -Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("networkReadGiB").ToString()); -Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("networkWriteGiB").ToString()); -Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("accountName").ToString()); -Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("containerName").ToString()); -Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("accountKey").ToString()); -Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("sasKey").ToString()); -Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("blobfuseOptions").ToString()); -Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("relativeMountPath").ToString()); -Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("identityReference").GetProperty("resourceId").ToString()); -Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("relativeMountPath").ToString()); -Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("mountOptions").ToString()); -Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("username").ToString()); -Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("relativeMountPath").ToString()); -Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("mountOptions").ToString()); -Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("password").ToString()); -Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("accountName").ToString()); -Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("azureFileUrl").ToString()); -Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("accountKey").ToString()); -Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("relativeMountPath").ToString()); -Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("mountOptions").ToString()); -Console.WriteLine(result.GetProperty("identity").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("identity").GetProperty("userAssignedIdentities")[0].GetProperty("resourceId").ToString()); -Console.WriteLine(result.GetProperty("identity").GetProperty("userAssignedIdentities")[0].GetProperty("clientId").ToString()); -Console.WriteLine(result.GetProperty("identity").GetProperty("userAssignedIdentities")[0].GetProperty("principalId").ToString()); -Console.WriteLine(result.GetProperty("targetNodeCommunicationMode").ToString()); -Console.WriteLine(result.GetProperty("currentNodeCommunicationMode").ToString()); -Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("mode").ToString()); -Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("disableAutomaticRollback").ToString()); -Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("enableAutomaticOSUpgrade").ToString()); -Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("useRollingUpgradePolicy").ToString()); -Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("osRollingUpgradeDeferral").ToString()); -Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("enableCrossZoneUpgrade").ToString()); -Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxBatchInstancePercent").ToString()); -Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxUnhealthyInstancePercent").ToString()); -Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxUnhealthyUpgradedInstancePercent").ToString()); -Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("pauseTimeBetweenBatches").ToString()); -Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("prioritizeUnhealthyInstances").ToString()); -Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("rollbackFailedInstancesOnPolicyBreach").ToString()); -]]> - - - -This sample shows how to call UpdatePoolAsync. +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetPool and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -using RequestContent content = RequestContent.Create(new object()); -Response response = await client.UpdatePoolAsync("", content); +Response response = client.GetPool("mypool001", null, DateTimeOffset.Parse("Wed, 14 Jun 2023 06:39:01 GMT"), null, null, null, null); -Console.WriteLine(response.Status); +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); ]]> -This sample shows how to call UpdatePoolAsync with all parameters and request content. +This sample shows how to call GetPool and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -using RequestContent content = RequestContent.Create(new -{ - startTask = new - { - commandLine = "", - containerSettings = new - { - containerRunOptions = "", - imageName = "", - registry = new - { - username = "", - password = "", - registryServer = "", - identityReference = new - { - resourceId = "", - }, - }, - workingDirectory = "taskWorkingDirectory", - }, - resourceFiles = new object[] - { - new - { - autoStorageContainerName = "", - storageContainerUrl = "", - httpUrl = "", - blobPrefix = "", - filePath = "", - fileMode = "", - } - }, - environmentSettings = new object[] - { - new - { - name = "", - value = "", - } - }, - userIdentity = new - { - username = "", - autoUser = new - { - scope = "task", - elevationLevel = "nonadmin", - }, - }, - maxTaskRetryCount = 1234, - waitForSuccess = true, - }, - applicationPackageReferences = new object[] - { - new - { - applicationId = "", - version = "", - } - }, - metadata = new object[] - { - new - { - name = "", - value = "", - } - }, - targetNodeCommunicationMode = "default", -}); -Response response = await client.UpdatePoolAsync("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); +Response response = client.GetPool("pool", null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null, null, null, null); -Console.WriteLine(response.Status); -]]> - - - -This sample shows how to call UpdatePool. +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetPool and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -using RequestContent content = RequestContent.Create(new object()); -Response response = client.UpdatePool("", content); +Response response = client.GetPool("mypool001", null, DateTimeOffset.Parse("Wed, 23 Aug 2023 08:42:01 GMT"), null, null, null, null); -Console.WriteLine(response.Status); +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); ]]> -This sample shows how to call UpdatePool with all parameters and request content. +This sample shows how to call GetPool and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = client.GetPool("pool", null, DateTimeOffset.Parse("Thu, 11 May 2023 08:08:01 GMT"), null, null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> + + + +This sample shows how to call UpdatePoolAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); @@ -1831,97 +1693,43 @@ using RequestContent content = RequestContent.Create(new { startTask = new { - commandLine = "", - containerSettings = new - { - containerRunOptions = "", - imageName = "", - registry = new - { - username = "", - password = "", - registryServer = "", - identityReference = new - { - resourceId = "", - }, - }, - workingDirectory = "taskWorkingDirectory", - }, - resourceFiles = new object[] - { - new - { - autoStorageContainerName = "", - storageContainerUrl = "", - httpUrl = "", - blobPrefix = "", - filePath = "", - fileMode = "", - } - }, - environmentSettings = new object[] - { - new - { - name = "", - value = "", - } - }, - userIdentity = new - { - username = "", - autoUser = new - { - scope = "task", - elevationLevel = "nonadmin", - }, - }, - maxTaskRetryCount = 1234, - waitForSuccess = true, - }, - applicationPackageReferences = new object[] - { - new - { - applicationId = "", - version = "", - } - }, - metadata = new object[] - { - new - { - name = "", - value = "", - } + commandLine = "/bin/bash -c 'echo start task'", }, - targetNodeCommunicationMode = "default", }); -Response response = client.UpdatePool("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); +Response response = await client.UpdatePoolAsync("poolId", content); Console.WriteLine(response.Status); ]]> - + -This sample shows how to call DisablePoolAutoScaleAsync. +This sample shows how to call UpdatePool. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -Response response = await client.DisablePoolAutoScaleAsync(""); +using RequestContent content = RequestContent.Create(new +{ + startTask = new + { + commandLine = "/bin/bash -c 'echo start task'", + }, +}); +Response response = client.UpdatePool("poolId", content); Console.WriteLine(response.Status); -]]> -This sample shows how to call DisablePoolAutoScaleAsync with all parameters. +]]> + + + +This sample shows how to call DisablePoolAutoScaleAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -Response response = await client.DisablePoolAutoScaleAsync("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +Response response = await client.DisablePoolAutoScaleAsync("poolId"); Console.WriteLine(response.Status); ]]> @@ -1930,21 +1738,11 @@ Console.WriteLine(response.Status); This sample shows how to call DisablePoolAutoScale. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -Response response = client.DisablePoolAutoScale(""); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call DisablePoolAutoScale with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -Response response = client.DisablePoolAutoScale("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +Response response = client.DisablePoolAutoScale("poolId"); Console.WriteLine(response.Status); ]]> @@ -1953,77 +1751,48 @@ Console.WriteLine(response.Status); This sample shows how to call EnablePoolAutoScaleAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -BatchPoolEnableAutoScaleContent content = new BatchPoolEnableAutoScaleContent(); -Response response = await client.EnablePoolAutoScaleAsync("", content); -]]> -This sample shows how to call EnablePoolAutoScaleAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); BatchPoolEnableAutoScaleContent content = new BatchPoolEnableAutoScaleContent { - AutoScaleFormula = "", - AutoScaleEvaluationInterval = XmlConvert.ToTimeSpan("PT1H23M45S"), + AutoScaleFormula = "$TargetDedicated=0", + AutoScaleEvaluationInterval = XmlConvert.ToTimeSpan("PT8M"), }; -Response response = await client.EnablePoolAutoScaleAsync("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); +Response response = await client.EnablePoolAutoScaleAsync("poolId", content); ]]> This sample shows how to call EnablePoolAutoScale. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -BatchPoolEnableAutoScaleContent content = new BatchPoolEnableAutoScaleContent(); -Response response = client.EnablePoolAutoScale("", content); -]]> -This sample shows how to call EnablePoolAutoScale with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); BatchPoolEnableAutoScaleContent content = new BatchPoolEnableAutoScaleContent { - AutoScaleFormula = "", - AutoScaleEvaluationInterval = XmlConvert.ToTimeSpan("PT1H23M45S"), + AutoScaleFormula = "$TargetDedicated=0", + AutoScaleEvaluationInterval = XmlConvert.ToTimeSpan("PT8M"), }; -Response response = client.EnablePoolAutoScale("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); +Response response = client.EnablePoolAutoScale("poolId", content); ]]> This sample shows how to call EnablePoolAutoScaleAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new object()); -Response response = await client.EnablePoolAutoScaleAsync("", content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call EnablePoolAutoScaleAsync with all parameters and request content. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - autoScaleFormula = "", - autoScaleEvaluationInterval = "PT1H23M45S", + autoScaleFormula = "$TargetDedicated=0", + autoScaleEvaluationInterval = "PT8M", }); -Response response = await client.EnablePoolAutoScaleAsync("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); +Response response = await client.EnablePoolAutoScaleAsync("poolId", content); Console.WriteLine(response.Status); ]]> @@ -2032,27 +1801,16 @@ Console.WriteLine(response.Status); This sample shows how to call EnablePoolAutoScale. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new object()); -Response response = client.EnablePoolAutoScale("", content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call EnablePoolAutoScale with all parameters and request content. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - autoScaleFormula = "", - autoScaleEvaluationInterval = "PT1H23M45S", + autoScaleFormula = "$TargetDedicated=0", + autoScaleEvaluationInterval = "PT8M", }); -Response response = client.EnablePoolAutoScale("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); +Response response = client.EnablePoolAutoScale("poolId", content); Console.WriteLine(response.Status); ]]> @@ -2061,201 +1819,108 @@ Console.WriteLine(response.Status); This sample shows how to call EvaluatePoolAutoScaleAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -BatchPoolEvaluateAutoScaleContent content = new BatchPoolEvaluateAutoScaleContent(""); -Response response = await client.EvaluatePoolAutoScaleAsync("", content); -]]> -This sample shows how to call EvaluatePoolAutoScaleAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -BatchPoolEvaluateAutoScaleContent content = new BatchPoolEvaluateAutoScaleContent(""); -Response response = await client.EvaluatePoolAutoScaleAsync("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +BatchPoolEvaluateAutoScaleContent content = new BatchPoolEvaluateAutoScaleContent("$TargetDedicated=1"); +Response response = await client.EvaluatePoolAutoScaleAsync("poolId", content); ]]> This sample shows how to call EvaluatePoolAutoScale. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -BatchPoolEvaluateAutoScaleContent content = new BatchPoolEvaluateAutoScaleContent(""); -Response response = client.EvaluatePoolAutoScale("", content); -]]> -This sample shows how to call EvaluatePoolAutoScale with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -BatchPoolEvaluateAutoScaleContent content = new BatchPoolEvaluateAutoScaleContent(""); -Response response = client.EvaluatePoolAutoScale("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +BatchPoolEvaluateAutoScaleContent content = new BatchPoolEvaluateAutoScaleContent("$TargetDedicated=1"); +Response response = client.EvaluatePoolAutoScale("poolId", content); ]]> This sample shows how to call EvaluatePoolAutoScaleAsync and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - autoScaleFormula = "", -}); -Response response = await client.EvaluatePoolAutoScaleAsync("", content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("timestamp").ToString()); -]]> -This sample shows how to call EvaluatePoolAutoScaleAsync with all parameters and request content and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - autoScaleFormula = "", + autoScaleFormula = "$TargetDedicated=1", }); -Response response = await client.EvaluatePoolAutoScaleAsync("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +Response response = await client.EvaluatePoolAutoScaleAsync("poolId", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("timestamp").ToString()); -Console.WriteLine(result.GetProperty("results").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("values")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("values")[0].GetProperty("value").ToString()); ]]> This sample shows how to call EvaluatePoolAutoScale and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - autoScaleFormula = "", -}); -Response response = client.EvaluatePoolAutoScale("", content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("timestamp").ToString()); -]]> -This sample shows how to call EvaluatePoolAutoScale with all parameters and request content and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - autoScaleFormula = "", + autoScaleFormula = "$TargetDedicated=1", }); -Response response = client.EvaluatePoolAutoScale("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +Response response = client.EvaluatePoolAutoScale("poolId", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("timestamp").ToString()); -Console.WriteLine(result.GetProperty("results").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("values")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("values")[0].GetProperty("value").ToString()); ]]> This sample shows how to call ResizePoolAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -BatchPoolResizeContent content = new BatchPoolResizeContent(); -Response response = await client.ResizePoolAsync("", content); -]]> -This sample shows how to call ResizePoolAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); BatchPoolResizeContent content = new BatchPoolResizeContent { - TargetDedicatedNodes = 1234, - TargetLowPriorityNodes = 1234, - ResizeTimeout = XmlConvert.ToTimeSpan("PT1H23M45S"), - NodeDeallocationOption = BatchNodeDeallocationOption.Requeue, + TargetDedicatedNodes = 1, + TargetLowPriorityNodes = 0, }; -Response response = await client.ResizePoolAsync("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); +Response response = await client.ResizePoolAsync("resizePool", content); ]]> This sample shows how to call ResizePool. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -BatchPoolResizeContent content = new BatchPoolResizeContent(); -Response response = client.ResizePool("", content); -]]> -This sample shows how to call ResizePool with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); BatchPoolResizeContent content = new BatchPoolResizeContent { - TargetDedicatedNodes = 1234, - TargetLowPriorityNodes = 1234, - ResizeTimeout = XmlConvert.ToTimeSpan("PT1H23M45S"), - NodeDeallocationOption = BatchNodeDeallocationOption.Requeue, + TargetDedicatedNodes = 1, + TargetLowPriorityNodes = 0, }; -Response response = client.ResizePool("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); +Response response = client.ResizePool("resizePool", content); ]]> This sample shows how to call ResizePoolAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new object()); -Response response = await client.ResizePoolAsync("", content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call ResizePoolAsync with all parameters and request content. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - targetDedicatedNodes = 1234, - targetLowPriorityNodes = 1234, - resizeTimeout = "PT1H23M45S", - nodeDeallocationOption = "requeue", + targetDedicatedNodes = 1, + targetLowPriorityNodes = 0, }); -Response response = await client.ResizePoolAsync("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); +Response response = await client.ResizePoolAsync("resizePool", content); Console.WriteLine(response.Status); ]]> @@ -2264,29 +1929,16 @@ Console.WriteLine(response.Status); This sample shows how to call ResizePool. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new object()); -Response response = client.ResizePool("", content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call ResizePool with all parameters and request content. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - targetDedicatedNodes = 1234, - targetLowPriorityNodes = 1234, - resizeTimeout = "PT1H23M45S", - nodeDeallocationOption = "requeue", + targetDedicatedNodes = 1, + targetLowPriorityNodes = 0, }); -Response response = client.ResizePool("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); +Response response = client.ResizePool("resizePool", content); Console.WriteLine(response.Status); ]]> @@ -2295,21 +1947,11 @@ Console.WriteLine(response.Status); This sample shows how to call StopPoolResizeAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -Response response = await client.StopPoolResizeAsync(""); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call StopPoolResizeAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -Response response = await client.StopPoolResizeAsync("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); +Response response = await client.StopPoolResizeAsync("poolId"); Console.WriteLine(response.Status); ]]> @@ -2318,21 +1960,11 @@ Console.WriteLine(response.Status); This sample shows how to call StopPoolResize. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -Response response = client.StopPoolResize(""); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call StopPoolResize with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -Response response = client.StopPoolResize("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); +Response response = client.StopPoolResize("poolId"); Console.WriteLine(response.Status); ]]> @@ -2341,274 +1973,50 @@ Console.WriteLine(response.Status); This sample shows how to call ReplacePoolPropertiesAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -BatchPoolReplaceContent pool = new BatchPoolReplaceContent(new BatchApplicationPackageReference[] +BatchPoolReplaceContent pool = new BatchPoolReplaceContent(Array.Empty(), Array.Empty()) { - new BatchApplicationPackageReference("") -}, new MetadataItem[] -{ - new MetadataItem("", "") -}); -Response response = await client.ReplacePoolPropertiesAsync("", pool); -]]> -This sample shows how to call ReplacePoolPropertiesAsync with all parameters. + StartTask = new BatchStartTask("/bin/bash -c 'echo start task'"), +}; +Response response = await client.ReplacePoolPropertiesAsync("poolId", pool); +]]> + + + +This sample shows how to call ReplacePoolProperties. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -BatchPoolReplaceContent pool = new BatchPoolReplaceContent(new BatchApplicationPackageReference[] -{ - new BatchApplicationPackageReference("") - { - Version = "", - } -}, new MetadataItem[] -{ - new MetadataItem("", "") -}) +BatchPoolReplaceContent pool = new BatchPoolReplaceContent(Array.Empty(), Array.Empty()) { - StartTask = new BatchStartTask("") - { - ContainerSettings = new BatchTaskContainerSettings("") - { - ContainerRunOptions = "", - Registry = new ContainerRegistryReference - { - Username = "", - Password = "", - RegistryServer = "", - IdentityReference = new BatchNodeIdentityReference - { - ResourceId = "", - }, - }, - WorkingDirectory = ContainerWorkingDirectory.TaskWorkingDirectory, - }, - ResourceFiles = {new ResourceFile - { - AutoStorageContainerName = "", - StorageContainerUrl = "", - HttpUrl = "", - BlobPrefix = "", - FilePath = "", - FileMode = "", - IdentityReference = default, - }}, - EnvironmentSettings = {new EnvironmentSetting("") - { - Value = "", - }}, - UserIdentity = new UserIdentity - { - Username = "", - AutoUser = new AutoUserSpecification - { - Scope = AutoUserScope.Task, - ElevationLevel = ElevationLevel.NonAdmin, - }, - }, - MaxTaskRetryCount = 1234, - WaitForSuccess = true, - }, - TargetNodeCommunicationMode = BatchNodeCommunicationMode.Default, + StartTask = new BatchStartTask("/bin/bash -c 'echo start task'"), }; -Response response = await client.ReplacePoolPropertiesAsync("", pool, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +Response response = client.ReplacePoolProperties("poolId", pool); ]]> - + -This sample shows how to call ReplacePoolProperties. +This sample shows how to call ReplacePoolPropertiesAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -BatchPoolReplaceContent pool = new BatchPoolReplaceContent(new BatchApplicationPackageReference[] -{ - new BatchApplicationPackageReference("") -}, new MetadataItem[] -{ - new MetadataItem("", "") -}); -Response response = client.ReplacePoolProperties("", pool); -]]> -This sample shows how to call ReplacePoolProperties with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -BatchPoolReplaceContent pool = new BatchPoolReplaceContent(new BatchApplicationPackageReference[] -{ - new BatchApplicationPackageReference("") - { - Version = "", - } -}, new MetadataItem[] -{ - new MetadataItem("", "") -}) -{ - StartTask = new BatchStartTask("") - { - ContainerSettings = new BatchTaskContainerSettings("") - { - ContainerRunOptions = "", - Registry = new ContainerRegistryReference - { - Username = "", - Password = "", - RegistryServer = "", - IdentityReference = new BatchNodeIdentityReference - { - ResourceId = "", - }, - }, - WorkingDirectory = ContainerWorkingDirectory.TaskWorkingDirectory, - }, - ResourceFiles = {new ResourceFile - { - AutoStorageContainerName = "", - StorageContainerUrl = "", - HttpUrl = "", - BlobPrefix = "", - FilePath = "", - FileMode = "", - IdentityReference = default, - }}, - EnvironmentSettings = {new EnvironmentSetting("") - { - Value = "", - }}, - UserIdentity = new UserIdentity - { - Username = "", - AutoUser = new AutoUserSpecification - { - Scope = AutoUserScope.Task, - ElevationLevel = ElevationLevel.NonAdmin, - }, - }, - MaxTaskRetryCount = 1234, - WaitForSuccess = true, - }, - TargetNodeCommunicationMode = BatchNodeCommunicationMode.Default, -}; -Response response = client.ReplacePoolProperties("", pool, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); -]]> - - - -This sample shows how to call ReplacePoolPropertiesAsync. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - applicationPackageReferences = new object[] - { - new - { - applicationId = "", - } - }, - metadata = new object[] - { - new - { - name = "", - value = "", - } - }, -}); -Response response = await client.ReplacePoolPropertiesAsync("", content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call ReplacePoolPropertiesAsync with all parameters and request content. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { startTask = new { - commandLine = "", - containerSettings = new - { - containerRunOptions = "", - imageName = "", - registry = new - { - username = "", - password = "", - registryServer = "", - identityReference = new - { - resourceId = "", - }, - }, - workingDirectory = "taskWorkingDirectory", - }, - resourceFiles = new object[] - { - new - { - autoStorageContainerName = "", - storageContainerUrl = "", - httpUrl = "", - blobPrefix = "", - filePath = "", - fileMode = "", - } - }, - environmentSettings = new object[] - { - new - { - name = "", - value = "", - } - }, - userIdentity = new - { - username = "", - autoUser = new - { - scope = "task", - elevationLevel = "nonadmin", - }, - }, - maxTaskRetryCount = 1234, - waitForSuccess = true, - }, - applicationPackageReferences = new object[] - { - new - { - applicationId = "", - version = "", - } - }, - metadata = new object[] - { - new - { - name = "", - value = "", - } + commandLine = "/bin/bash -c 'echo start task'", }, - targetNodeCommunicationMode = "default", + applicationPackageReferences = Array.Empty(), + metadata = Array.Empty(), }); -Response response = await client.ReplacePoolPropertiesAsync("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +Response response = await client.ReplacePoolPropertiesAsync("poolId", content); Console.WriteLine(response.Status); ]]> @@ -2617,35 +2025,7 @@ Console.WriteLine(response.Status); This sample shows how to call ReplacePoolProperties. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - applicationPackageReferences = new object[] - { - new - { - applicationId = "", - } - }, - metadata = new object[] - { - new - { - name = "", - value = "", - } - }, -}); -Response response = client.ReplacePoolProperties("", content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call ReplacePoolProperties with all parameters and request content. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); @@ -2653,74 +2033,12 @@ using RequestContent content = RequestContent.Create(new { startTask = new { - commandLine = "", - containerSettings = new - { - containerRunOptions = "", - imageName = "", - registry = new - { - username = "", - password = "", - registryServer = "", - identityReference = new - { - resourceId = "", - }, - }, - workingDirectory = "taskWorkingDirectory", - }, - resourceFiles = new object[] - { - new - { - autoStorageContainerName = "", - storageContainerUrl = "", - httpUrl = "", - blobPrefix = "", - filePath = "", - fileMode = "", - } - }, - environmentSettings = new object[] - { - new - { - name = "", - value = "", - } - }, - userIdentity = new - { - username = "", - autoUser = new - { - scope = "task", - elevationLevel = "nonadmin", - }, - }, - maxTaskRetryCount = 1234, - waitForSuccess = true, - }, - applicationPackageReferences = new object[] - { - new - { - applicationId = "", - version = "", - } - }, - metadata = new object[] - { - new - { - name = "", - value = "", - } + commandLine = "/bin/bash -c 'echo start task'", }, - targetNodeCommunicationMode = "default", + applicationPackageReferences = Array.Empty(), + metadata = Array.Empty(), }); -Response response = client.ReplacePoolProperties("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +Response response = client.ReplacePoolProperties("poolId", content); Console.WriteLine(response.Status); ]]> @@ -2729,74 +2047,31 @@ Console.WriteLine(response.Status); This sample shows how to call RemoveNodesAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -BatchNodeRemoveContent content = new BatchNodeRemoveContent(new string[] { "" }); -Response response = await client.RemoveNodesAsync("", content); -]]> -This sample shows how to call RemoveNodesAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -BatchNodeRemoveContent content = new BatchNodeRemoveContent(new string[] { "" }) -{ - ResizeTimeout = XmlConvert.ToTimeSpan("PT1H23M45S"), - NodeDeallocationOption = BatchNodeDeallocationOption.Requeue, -}; -Response response = await client.RemoveNodesAsync("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); +BatchNodeRemoveContent content = new BatchNodeRemoveContent(new string[] { "tvm-1695681911_1-20161122t224741z", "tvm-1695681911_2-20161122t224741z" }); +Response response = await client.RemoveNodesAsync("poolId", content); ]]> This sample shows how to call RemoveNodes. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -BatchNodeRemoveContent content = new BatchNodeRemoveContent(new string[] { "" }); -Response response = client.RemoveNodes("", content); -]]> -This sample shows how to call RemoveNodes with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -BatchNodeRemoveContent content = new BatchNodeRemoveContent(new string[] { "" }) -{ - ResizeTimeout = XmlConvert.ToTimeSpan("PT1H23M45S"), - NodeDeallocationOption = BatchNodeDeallocationOption.Requeue, -}; -Response response = client.RemoveNodes("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); +BatchNodeRemoveContent content = new BatchNodeRemoveContent(new string[] { "tvm-1695681911_1-20161122t224741z", "tvm-1695681911_2-20161122t224741z" }); +Response response = client.RemoveNodes("poolId", content); ]]> This sample shows how to call RemoveNodesAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - nodeList = new object[] - { - "" - }, -}); -Response response = await client.RemoveNodesAsync("", content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call RemoveNodesAsync with all parameters and request content. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); @@ -2804,12 +2079,11 @@ using RequestContent content = RequestContent.Create(new { nodeList = new object[] { - "" + "tvm-1695681911_1-20161122t224741z", + "tvm-1695681911_2-20161122t224741z" }, - resizeTimeout = "PT1H23M45S", - nodeDeallocationOption = "requeue", }); -Response response = await client.RemoveNodesAsync("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); +Response response = await client.RemoveNodesAsync("poolId", content); Console.WriteLine(response.Status); ]]> @@ -2818,24 +2092,7 @@ Console.WriteLine(response.Status); This sample shows how to call RemoveNodes. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - nodeList = new object[] - { - "" - }, -}); -Response response = client.RemoveNodes("", content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call RemoveNodes with all parameters and request content. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); @@ -2843,12 +2100,11 @@ using RequestContent content = RequestContent.Create(new { nodeList = new object[] { - "" + "tvm-1695681911_1-20161122t224741z", + "tvm-1695681911_2-20161122t224741z" }, - resizeTimeout = "PT1H23M45S", - nodeDeallocationOption = "requeue", }); -Response response = client.RemoveNodes("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); +Response response = client.RemoveNodes("poolId", content); Console.WriteLine(response.Status); ]]> @@ -2857,21 +2113,11 @@ Console.WriteLine(response.Status); This sample shows how to call DeleteJobAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -Response response = await client.DeleteJobAsync(""); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call DeleteJobAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -Response response = await client.DeleteJobAsync("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); +Response response = await client.DeleteJobAsync("jobId"); Console.WriteLine(response.Status); ]]> @@ -2880,21 +2126,11 @@ Console.WriteLine(response.Status); This sample shows how to call DeleteJob. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -Response response = client.DeleteJob(""); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call DeleteJob with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -Response response = client.DeleteJob("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); +Response response = client.DeleteJob("jobId"); Console.WriteLine(response.Status); ]]> @@ -2903,7789 +2139,1299 @@ Console.WriteLine(response.Status); This sample shows how to call GetJobAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -Response response = await client.GetJobAsync(""); -]]> -This sample shows how to call GetJobAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -Response response = await client.GetJobAsync("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), select: new string[] { "" }, expand: new string[] { "" }, requestConditions: null); +Response response = client.GetJob("jobId"); ]]> This sample shows how to call GetJobAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -Response response = await client.GetJobAsync("", null, null, null, null, null, null); +Response response = await client.GetJobAsync("jobId", null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null, null, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("poolInfo").ToString()); -]]> -This sample shows how to call GetJobAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -Response response = await client.GetJobAsync("", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), new string[] { "" }, new string[] { "" }, null, null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("usesTaskDependencies").ToString()); -Console.WriteLine(result.GetProperty("url").ToString()); -Console.WriteLine(result.GetProperty("eTag").ToString()); -Console.WriteLine(result.GetProperty("lastModified").ToString()); -Console.WriteLine(result.GetProperty("creationTime").ToString()); -Console.WriteLine(result.GetProperty("state").ToString()); -Console.WriteLine(result.GetProperty("stateTransitionTime").ToString()); -Console.WriteLine(result.GetProperty("previousState").ToString()); -Console.WriteLine(result.GetProperty("previousStateTransitionTime").ToString()); -Console.WriteLine(result.GetProperty("priority").ToString()); -Console.WriteLine(result.GetProperty("allowTaskPreemption").ToString()); -Console.WriteLine(result.GetProperty("maxParallelTasks").ToString()); -Console.WriteLine(result.GetProperty("constraints").GetProperty("maxWallClockTime").ToString()); -Console.WriteLine(result.GetProperty("constraints").GetProperty("maxTaskRetryCount").ToString()); -Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("commandLine").ToString()); -Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); -Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); -Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); -Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); -Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); -Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); -Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); -Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); -Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); -Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); -Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); -Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); -Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); -Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); -Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("filePattern").ToString()); -Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("path").ToString()); -Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("containerUrl").ToString()); -Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("identityReference").GetProperty("resourceId").ToString()); -Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("uploadHeaders")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("uploadHeaders")[0].GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("uploadOptions").GetProperty("uploadCondition").ToString()); -Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("constraints").GetProperty("maxWallClockTime").ToString()); -Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("constraints").GetProperty("retentionTime").ToString()); -Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("constraints").GetProperty("maxTaskRetryCount").ToString()); -Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("requiredSlots").ToString()); -Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("killJobOnCompletion").ToString()); -Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("userIdentity").GetProperty("username").ToString()); -Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); -Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); -Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("runExclusive").ToString()); -Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("applicationPackageReferences")[0].GetProperty("applicationId").ToString()); -Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("applicationPackageReferences")[0].GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("authenticationTokenSettings").GetProperty("access")[0].ToString()); -Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("allowLowPriorityNode").ToString()); -Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("commandLine").ToString()); -Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); -Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); -Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); -Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); -Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); -Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); -Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); -Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); -Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); -Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); -Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); -Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); -Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); -Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); -Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("constraints").GetProperty("maxWallClockTime").ToString()); -Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("constraints").GetProperty("retentionTime").ToString()); -Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("constraints").GetProperty("maxTaskRetryCount").ToString()); -Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("waitForSuccess").ToString()); -Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("userIdentity").GetProperty("username").ToString()); -Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); -Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); -Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("rerunOnNodeRebootAfterSuccess").ToString()); -Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("commandLine").ToString()); -Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); -Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); -Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); -Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); -Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); -Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); -Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); -Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); -Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); -Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); -Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); -Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); -Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); -Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); -Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("maxWallClockTime").ToString()); -Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("retentionTime").ToString()); -Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("userIdentity").GetProperty("username").ToString()); -Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); -Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); -Console.WriteLine(result.GetProperty("commonEnvironmentSettings")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("commonEnvironmentSettings")[0].GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("poolId").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("autoPoolIdPrefix").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("poolLifetimeOption").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("keepAlive").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("vmSize").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("publisher").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("offer").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("sku").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("virtualMachineImageId").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("exactVersion").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("nodeAgentSKUId").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("windowsConfiguration").GetProperty("enableAutomaticUpdates").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("lun").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("caching").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("diskSizeGB").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("storageAccountType").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("licenseType").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerImageNames")[0].ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("username").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("password").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("registryServer").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("diskEncryptionConfiguration").GetProperty("targets")[0].ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("nodePlacementConfiguration").GetProperty("policy").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("publisher").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("typeHandlerVersion").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("autoUpgradeMinorVersion").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("enableAutomaticUpgrade").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("settings").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("protectedSettings").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("provisionAfterExtensions")[0].ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("ephemeralOSDiskSettings").GetProperty("placement").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("caching").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("managedDisk").GetProperty("storageAccountType").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("writeAcceleratorEnabled").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("encryptionAtHost").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("securityType").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("uefiSettings").GetProperty("secureBootEnabled").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("uefiSettings").GetProperty("vTpmEnabled").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("serviceArtifactReference").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("taskSlotsPerNode").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("taskSchedulingPolicy").GetProperty("nodeFillType").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("resizeTimeout").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("resourceTags").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("targetDedicatedNodes").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("targetLowPriorityNodes").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("enableAutoScale").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("autoScaleFormula").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("autoScaleEvaluationInterval").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("enableInterNodeCommunication").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("subnetId").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("dynamicVNetAssignmentScope").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("protocol").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("backendPort").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("frontendPortRangeStart").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("frontendPortRangeEnd").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("priority").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("access").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("sourceAddressPrefix").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("sourcePortRanges")[0].ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("publicIPAddressConfiguration").GetProperty("provision").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("publicIPAddressConfiguration").GetProperty("ipAddressIds")[0].ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("enableAcceleratedNetworking").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("commandLine").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("userIdentity").GetProperty("username").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("maxTaskRetryCount").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("waitForSuccess").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("applicationPackageReferences")[0].GetProperty("applicationId").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("applicationPackageReferences")[0].GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("password").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("elevationLevel").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("uid").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("gid").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("sshPrivateKey").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("windowsUserConfiguration").GetProperty("loginMode").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("metadata")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("metadata")[0].GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("accountName").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("containerName").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("accountKey").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("sasKey").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("blobfuseOptions").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("relativeMountPath").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("identityReference").GetProperty("resourceId").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("relativeMountPath").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("mountOptions").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("username").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("relativeMountPath").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("mountOptions").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("password").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("accountName").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("azureFileUrl").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("accountKey").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("relativeMountPath").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("mountOptions").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("targetNodeCommunicationMode").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("mode").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("disableAutomaticRollback").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("enableAutomaticOSUpgrade").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("useRollingUpgradePolicy").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("osRollingUpgradeDeferral").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("enableCrossZoneUpgrade").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxBatchInstancePercent").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxUnhealthyInstancePercent").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxUnhealthyUpgradedInstancePercent").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("pauseTimeBetweenBatches").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("prioritizeUnhealthyInstances").ToString()); -Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("rollbackFailedInstancesOnPolicyBreach").ToString()); -Console.WriteLine(result.GetProperty("onAllTasksComplete").ToString()); -Console.WriteLine(result.GetProperty("onTaskFailure").ToString()); -Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("subnetId").ToString()); -Console.WriteLine(result.GetProperty("metadata")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("metadata")[0].GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("executionInfo").GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("executionInfo").GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("executionInfo").GetProperty("poolId").ToString()); -Console.WriteLine(result.GetProperty("executionInfo").GetProperty("schedulingError").GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("executionInfo").GetProperty("schedulingError").GetProperty("code").ToString()); -Console.WriteLine(result.GetProperty("executionInfo").GetProperty("schedulingError").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("executionInfo").GetProperty("schedulingError").GetProperty("details")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("executionInfo").GetProperty("schedulingError").GetProperty("details")[0].GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("executionInfo").GetProperty("terminateReason").ToString()); -Console.WriteLine(result.GetProperty("stats").GetProperty("url").ToString()); -Console.WriteLine(result.GetProperty("stats").GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("stats").GetProperty("lastUpdateTime").ToString()); -Console.WriteLine(result.GetProperty("stats").GetProperty("userCPUTime").ToString()); -Console.WriteLine(result.GetProperty("stats").GetProperty("kernelCPUTime").ToString()); -Console.WriteLine(result.GetProperty("stats").GetProperty("wallClockTime").ToString()); -Console.WriteLine(result.GetProperty("stats").GetProperty("readIOps").ToString()); -Console.WriteLine(result.GetProperty("stats").GetProperty("writeIOps").ToString()); -Console.WriteLine(result.GetProperty("stats").GetProperty("readIOGiB").ToString()); -Console.WriteLine(result.GetProperty("stats").GetProperty("writeIOGiB").ToString()); -Console.WriteLine(result.GetProperty("stats").GetProperty("numSucceededTasks").ToString()); -Console.WriteLine(result.GetProperty("stats").GetProperty("numFailedTasks").ToString()); -Console.WriteLine(result.GetProperty("stats").GetProperty("numTaskRetries").ToString()); -Console.WriteLine(result.GetProperty("stats").GetProperty("waitTime").ToString()); ]]> This sample shows how to call UpdateJobAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -using RequestContent content = RequestContent.Create(new object()); -Response response = await client.UpdateJobAsync("", content); +using RequestContent content = RequestContent.Create(new +{ + priority = 100, + constraints = new + { + maxWallClockTime = "PT1H", + maxTaskRetryCount = -1, + }, + poolInfo = new + { + poolId = "poolId", + }, +}); +Response response = await client.UpdateJobAsync("jobId", content); Console.WriteLine(response.Status); -]]> -This sample shows how to call UpdateJobAsync with all parameters and request content. +]]> + + + +This sample shows how to call UpdateJob. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - priority = 1234, - allowTaskPreemption = true, - maxParallelTasks = 1234, + priority = 100, constraints = new { - maxWallClockTime = "PT1H23M45S", - maxTaskRetryCount = 1234, + maxWallClockTime = "PT1H", + maxTaskRetryCount = -1, }, poolInfo = new { - poolId = "", - autoPoolSpecification = new - { - autoPoolIdPrefix = "", - poolLifetimeOption = "jobschedule", - keepAlive = true, - pool = new - { - displayName = "", - vmSize = "", - virtualMachineConfiguration = new - { - imageReference = new - { - publisher = "", - offer = "", - sku = "", - version = "", - virtualMachineImageId = "", - }, - nodeAgentSKUId = "", - windowsConfiguration = new - { - enableAutomaticUpdates = true, - }, - dataDisks = new object[] - { - new - { - lun = 1234, - caching = "none", - diskSizeGB = 1234, - storageAccountType = "standard_lrs", - } - }, - licenseType = "", - containerConfiguration = new - { - type = "dockerCompatible", - containerImageNames = new object[] - { - "" - }, - containerRegistries = new object[] - { - new - { - username = "", - password = "", - registryServer = "", - identityReference = new - { - resourceId = "", - }, - } - }, - }, - diskEncryptionConfiguration = new - { - targets = new object[] - { - "osdisk" - }, - }, - nodePlacementConfiguration = new - { - policy = "regional", - }, - extensions = new object[] - { - new - { - name = "", - publisher = "", - type = "", - typeHandlerVersion = "", - autoUpgradeMinorVersion = true, - enableAutomaticUpgrade = true, - settings = new - { - key = "", - }, - protectedSettings = new - { - key = "", - }, - provisionAfterExtensions = new object[] - { - "" - }, - } - }, - osDisk = new - { - ephemeralOSDiskSettings = new - { - placement = "cachedisk", - }, - caching = "none", - diskSizeGB = 1234, - managedDisk = new - { - storageAccountType = "standard_lrs", - }, - writeAcceleratorEnabled = true, - }, - securityProfile = new - { - encryptionAtHost = true, - securityType = "trustedLaunch", - uefiSettings = new - { - secureBootEnabled = true, - vTpmEnabled = true, - }, - }, - serviceArtifactReference = new - { - id = "", - }, - }, - taskSlotsPerNode = 1234, - taskSchedulingPolicy = new - { - nodeFillType = "spread", - }, - resizeTimeout = "PT1H23M45S", - resourceTags = "", - targetDedicatedNodes = 1234, - targetLowPriorityNodes = 1234, - enableAutoScale = true, - autoScaleFormula = "", - autoScaleEvaluationInterval = "PT1H23M45S", - enableInterNodeCommunication = true, - networkConfiguration = new - { - subnetId = "", - dynamicVNetAssignmentScope = "none", - endpointConfiguration = new - { - inboundNATPools = new object[] - { - new - { - name = "", - protocol = "tcp", - backendPort = 1234, - frontendPortRangeStart = 1234, - frontendPortRangeEnd = 1234, - networkSecurityGroupRules = new object[] - { - new - { - priority = 1234, - access = "allow", - sourceAddressPrefix = "", - sourcePortRanges = new object[] - { - "" - }, - } - }, - } - }, - }, - publicIPAddressConfiguration = new - { - provision = "batchmanaged", - ipAddressIds = new object[] - { - "" - }, - }, - enableAcceleratedNetworking = true, - }, - startTask = new - { - commandLine = "", - containerSettings = new - { - containerRunOptions = "", - imageName = "", - workingDirectory = "taskWorkingDirectory", - }, - resourceFiles = new object[] - { - new - { - autoStorageContainerName = "", - storageContainerUrl = "", - httpUrl = "", - blobPrefix = "", - filePath = "", - fileMode = "", - } - }, - environmentSettings = new object[] - { - new - { - name = "", - value = "", - } - }, - userIdentity = new - { - username = "", - autoUser = new - { - scope = "task", - elevationLevel = "nonadmin", - }, - }, - maxTaskRetryCount = 1234, - waitForSuccess = true, - }, - applicationPackageReferences = new object[] - { - new - { - applicationId = "", - version = "", - } - }, - userAccounts = new object[] - { - new - { - name = "", - password = "", - elevationLevel = "nonadmin", - linuxUserConfiguration = new - { - uid = 1234, - gid = 1234, - sshPrivateKey = "", - }, - windowsUserConfiguration = new - { - loginMode = "batch", - }, - } - }, - metadata = new object[] - { - new - { - name = "", - value = "", - } - }, - mountConfiguration = new object[] - { - new - { - azureBlobFileSystemConfiguration = new - { - accountName = "", - containerName = "", - accountKey = "", - sasKey = "", - blobfuseOptions = "", - relativeMountPath = "", - }, - nfsMountConfiguration = new - { - source = "", - relativeMountPath = "", - mountOptions = "", - }, - cifsMountConfiguration = new - { - username = "", - source = "", - relativeMountPath = "", - mountOptions = "", - password = "", - }, - azureFileShareConfiguration = new - { - accountName = "", - azureFileUrl = "", - accountKey = "", - relativeMountPath = "", - mountOptions = "", - }, - } - }, - targetNodeCommunicationMode = "default", - upgradePolicy = new - { - mode = "automatic", - automaticOSUpgradePolicy = new - { - disableAutomaticRollback = true, - enableAutomaticOSUpgrade = true, - useRollingUpgradePolicy = true, - osRollingUpgradeDeferral = true, - }, - rollingUpgradePolicy = new - { - enableCrossZoneUpgrade = true, - maxBatchInstancePercent = 1234, - maxUnhealthyInstancePercent = 1234, - maxUnhealthyUpgradedInstancePercent = 1234, - pauseTimeBetweenBatches = "PT1H23M45S", - prioritizeUnhealthyInstances = true, - rollbackFailedInstancesOnPolicyBreach = true, - }, - }, - }, - }, - }, - onAllTasksComplete = "noaction", - metadata = new object[] - { - null + poolId = "poolId", }, }); -Response response = await client.UpdateJobAsync("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); +Response response = client.UpdateJob("jobId", content); Console.WriteLine(response.Status); ]]> - + -This sample shows how to call UpdateJob. +This sample shows how to call ReplaceJobAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchJob job = new BatchJob(new BatchPoolInfo +{ + PoolId = "poolId", +}) +{ + Priority = 100, + Constraints = new BatchJobConstraints + { + MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H"), + MaxTaskRetryCount = -1, + }, +}; +Response response = await client.ReplaceJobAsync("jobId", job); +]]> + + + +This sample shows how to call ReplaceJob. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchJob job = new BatchJob(new BatchPoolInfo +{ + PoolId = "poolId", +}) +{ + Priority = 100, + Constraints = new BatchJobConstraints + { + MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H"), + MaxTaskRetryCount = -1, + }, +}; +Response response = client.ReplaceJob("jobId", job); +]]> + + + +This sample shows how to call ReplaceJobAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -using RequestContent content = RequestContent.Create(new object()); -Response response = client.UpdateJob("", content); +using RequestContent content = RequestContent.Create(new +{ + priority = 100, + constraints = new + { + maxWallClockTime = "PT1H", + maxTaskRetryCount = -1, + }, + poolInfo = new + { + poolId = "poolId", + }, +}); +Response response = await client.ReplaceJobAsync("jobId", content); Console.WriteLine(response.Status); -]]> -This sample shows how to call UpdateJob with all parameters and request content. +]]> + + + +This sample shows how to call ReplaceJob. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - priority = 1234, - allowTaskPreemption = true, - maxParallelTasks = 1234, + priority = 100, constraints = new { - maxWallClockTime = "PT1H23M45S", - maxTaskRetryCount = 1234, + maxWallClockTime = "PT1H", + maxTaskRetryCount = -1, }, poolInfo = new { - poolId = "", - autoPoolSpecification = new - { - autoPoolIdPrefix = "", - poolLifetimeOption = "jobschedule", - keepAlive = true, - pool = new - { - displayName = "", - vmSize = "", - virtualMachineConfiguration = new - { - imageReference = new - { - publisher = "", - offer = "", - sku = "", - version = "", - virtualMachineImageId = "", - }, - nodeAgentSKUId = "", - windowsConfiguration = new - { - enableAutomaticUpdates = true, - }, - dataDisks = new object[] - { - new - { - lun = 1234, - caching = "none", - diskSizeGB = 1234, - storageAccountType = "standard_lrs", - } - }, - licenseType = "", - containerConfiguration = new - { - type = "dockerCompatible", - containerImageNames = new object[] - { - "" - }, - containerRegistries = new object[] - { - new - { - username = "", - password = "", - registryServer = "", - identityReference = new - { - resourceId = "", - }, - } - }, - }, - diskEncryptionConfiguration = new - { - targets = new object[] - { - "osdisk" - }, - }, - nodePlacementConfiguration = new - { - policy = "regional", - }, - extensions = new object[] - { - new - { - name = "", - publisher = "", - type = "", - typeHandlerVersion = "", - autoUpgradeMinorVersion = true, - enableAutomaticUpgrade = true, - settings = new - { - key = "", - }, - protectedSettings = new - { - key = "", - }, - provisionAfterExtensions = new object[] - { - "" - }, - } - }, - osDisk = new - { - ephemeralOSDiskSettings = new - { - placement = "cachedisk", - }, - caching = "none", - diskSizeGB = 1234, - managedDisk = new - { - storageAccountType = "standard_lrs", - }, - writeAcceleratorEnabled = true, - }, - securityProfile = new - { - encryptionAtHost = true, - securityType = "trustedLaunch", - uefiSettings = new - { - secureBootEnabled = true, - vTpmEnabled = true, - }, - }, - serviceArtifactReference = new - { - id = "", - }, - }, - taskSlotsPerNode = 1234, - taskSchedulingPolicy = new - { - nodeFillType = "spread", - }, - resizeTimeout = "PT1H23M45S", - resourceTags = "", - targetDedicatedNodes = 1234, - targetLowPriorityNodes = 1234, - enableAutoScale = true, - autoScaleFormula = "", - autoScaleEvaluationInterval = "PT1H23M45S", - enableInterNodeCommunication = true, - networkConfiguration = new - { - subnetId = "", - dynamicVNetAssignmentScope = "none", - endpointConfiguration = new - { - inboundNATPools = new object[] - { - new - { - name = "", - protocol = "tcp", - backendPort = 1234, - frontendPortRangeStart = 1234, - frontendPortRangeEnd = 1234, - networkSecurityGroupRules = new object[] - { - new - { - priority = 1234, - access = "allow", - sourceAddressPrefix = "", - sourcePortRanges = new object[] - { - "" - }, - } - }, - } - }, - }, - publicIPAddressConfiguration = new - { - provision = "batchmanaged", - ipAddressIds = new object[] - { - "" - }, - }, - enableAcceleratedNetworking = true, - }, - startTask = new - { - commandLine = "", - containerSettings = new - { - containerRunOptions = "", - imageName = "", - workingDirectory = "taskWorkingDirectory", - }, - resourceFiles = new object[] - { - new - { - autoStorageContainerName = "", - storageContainerUrl = "", - httpUrl = "", - blobPrefix = "", - filePath = "", - fileMode = "", - } - }, - environmentSettings = new object[] - { - new - { - name = "", - value = "", - } - }, - userIdentity = new - { - username = "", - autoUser = new - { - scope = "task", - elevationLevel = "nonadmin", - }, - }, - maxTaskRetryCount = 1234, - waitForSuccess = true, - }, - applicationPackageReferences = new object[] - { - new - { - applicationId = "", - version = "", - } - }, - userAccounts = new object[] - { - new - { - name = "", - password = "", - elevationLevel = "nonadmin", - linuxUserConfiguration = new - { - uid = 1234, - gid = 1234, - sshPrivateKey = "", - }, - windowsUserConfiguration = new - { - loginMode = "batch", - }, - } - }, - metadata = new object[] - { - new - { - name = "", - value = "", - } - }, - mountConfiguration = new object[] - { - new - { - azureBlobFileSystemConfiguration = new - { - accountName = "", - containerName = "", - accountKey = "", - sasKey = "", - blobfuseOptions = "", - relativeMountPath = "", - }, - nfsMountConfiguration = new - { - source = "", - relativeMountPath = "", - mountOptions = "", - }, - cifsMountConfiguration = new - { - username = "", - source = "", - relativeMountPath = "", - mountOptions = "", - password = "", - }, - azureFileShareConfiguration = new - { - accountName = "", - azureFileUrl = "", - accountKey = "", - relativeMountPath = "", - mountOptions = "", - }, - } - }, - targetNodeCommunicationMode = "default", - upgradePolicy = new - { - mode = "automatic", - automaticOSUpgradePolicy = new - { - disableAutomaticRollback = true, - enableAutomaticOSUpgrade = true, - useRollingUpgradePolicy = true, - osRollingUpgradeDeferral = true, - }, - rollingUpgradePolicy = new - { - enableCrossZoneUpgrade = true, - maxBatchInstancePercent = 1234, - maxUnhealthyInstancePercent = 1234, - maxUnhealthyUpgradedInstancePercent = 1234, - pauseTimeBetweenBatches = "PT1H23M45S", - prioritizeUnhealthyInstances = true, - rollbackFailedInstancesOnPolicyBreach = true, - }, - }, - }, - }, - }, - onAllTasksComplete = "noaction", - metadata = new object[] - { - null + poolId = "poolId", }, }); -Response response = client.UpdateJob("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); +Response response = client.ReplaceJob("jobId", content); Console.WriteLine(response.Status); ]]> - + -This sample shows how to call ReplaceJobAsync. +This sample shows how to call DisableJobAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchJobDisableContent content = new BatchJobDisableContent(DisableBatchJobOption.Terminate); +Response response = await client.DisableJobAsync("jobId", content); +]]> + + + +This sample shows how to call DisableJob. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchJobDisableContent content = new BatchJobDisableContent(DisableBatchJobOption.Terminate); +Response response = client.DisableJob("jobId", content); +]]> + + + +This sample shows how to call DisableJobAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + disableTasks = "terminate", +}); +Response response = await client.DisableJobAsync("jobId", content); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call DisableJob. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + disableTasks = "terminate", +}); +Response response = client.DisableJob("jobId", content); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call EnableJobAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.EnableJobAsync("jobId"); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call EnableJob. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = client.EnableJob("jobId"); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call TerminateJobAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.TerminateJobAsync("jobId"); +]]> + + + +This sample shows how to call TerminateJob. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = client.TerminateJob("jobId"); +]]> + + + +This sample shows how to call TerminateJobAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = null; +Response response = await client.TerminateJobAsync("jobId", content); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call TerminateJob. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = null; +Response response = client.TerminateJob("jobId", content); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call CreateJobAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -BatchJob job = new BatchJob(new BatchPoolInfo()); -Response response = await client.ReplaceJobAsync("", job); +BatchJobCreateContent job = new BatchJobCreateContent("jobId", new BatchPoolInfo +{ + PoolId = "poolId", +}) +{ + Priority = 0, +}; +Response response = await client.CreateJobAsync(job); ]]> -This sample shows how to call ReplaceJobAsync with all parameters. +This sample shows how to call CreateJobAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -BatchJob job = new BatchJob(new BatchPoolInfo +BatchJobCreateContent job = new BatchJobCreateContent("jobId", new BatchPoolInfo { - PoolId = "", - AutoPoolSpecification = new BatchAutoPoolSpecification(BatchPoolLifetimeOption.JobSchedule) + AutoPoolSpecification = new BatchAutoPoolSpecification(BatchPoolLifetimeOption.Job) { - AutoPoolIdPrefix = "", - KeepAlive = true, - Pool = new BatchPoolSpecification("") + AutoPoolIdPrefix = "mypool", + Pool = new BatchPoolSpecification("Standard_D1_v2") { - DisplayName = "", VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference { - Publisher = "", - Offer = "", - Sku = "", - Version = "", - VirtualMachineImageId = "", - }, "") - { - WindowsConfiguration = new WindowsConfiguration - { - EnableAutomaticUpdates = true, - }, - DataDisks = {new DataDisk(1234, 1234) - { - Caching = CachingType.None, - StorageAccountType = StorageAccountType.StandardLRS, - }}, - LicenseType = "", - ContainerConfiguration = new ContainerConfiguration(ContainerType.DockerCompatible) - { - ContainerImageNames = { "" }, - ContainerRegistries = {new ContainerRegistryReference - { - Username = "", - Password = "", - RegistryServer = "", - IdentityReference = new BatchNodeIdentityReference - { - ResourceId = "", - }, - }}, - }, - DiskEncryptionConfiguration = new DiskEncryptionConfiguration - { - Targets = { DiskEncryptionTarget.OsDisk }, - }, - NodePlacementConfiguration = new BatchNodePlacementConfiguration - { - Policy = BatchNodePlacementPolicyType.Regional, - }, - Extensions = {new VMExtension("", "", "") - { - TypeHandlerVersion = "", - AutoUpgradeMinorVersion = true, - EnableAutomaticUpgrade = true, - Settings = - { - ["key"] = "" - }, - ProtectedSettings = - { - ["key"] = "" - }, - ProvisionAfterExtensions = {""}, - }}, - OsDisk = new OSDisk - { - EphemeralOSDiskSettings = new DiffDiskSettings - { - Placement = DiffDiskPlacement.CacheDisk, - }, - Caching = CachingType.None, - DiskSizeGB = 1234, - ManagedDisk = new ManagedDisk(StorageAccountType.StandardLRS), - WriteAcceleratorEnabled = true, - }, - SecurityProfile = new SecurityProfile(true, SecurityTypes.TrustedLaunch, new UefiSettings - { - SecureBootEnabled = true, - VTpmEnabled = true, - }), - ServiceArtifactReference = new ServiceArtifactReference(""), - }, - TaskSlotsPerNode = 1234, + Publisher = "MicrosoftWindowsServer", + Offer = "WindowsServer", + Sku = "2016-datacenter-smalldisk", + Version = "latest", + }, "batch.node.windows amd64"), + TaskSlotsPerNode = 2, TaskSchedulingPolicy = new BatchTaskSchedulingPolicy(BatchNodeFillType.Spread), - ResizeTimeout = XmlConvert.ToTimeSpan("PT1H23M45S"), - ResourceTags = "", - TargetDedicatedNodes = 1234, - TargetLowPriorityNodes = 1234, - EnableAutoScale = true, - AutoScaleFormula = "", - AutoScaleEvaluationInterval = XmlConvert.ToTimeSpan("PT1H23M45S"), + ResizeTimeout = XmlConvert.ToTimeSpan("PT15M"), + TargetDedicatedNodes = 3, + TargetLowPriorityNodes = 0, + EnableAutoScale = false, EnableInterNodeCommunication = true, - NetworkConfiguration = new NetworkConfiguration - { - SubnetId = "", - DynamicVNetAssignmentScope = DynamicVNetAssignmentScope.None, - EndpointConfiguration = new BatchPoolEndpointConfiguration(new InboundNatPool[] - { - new InboundNatPool("", InboundEndpointProtocol.Tcp, 1234, 1234, 1234) - { - NetworkSecurityGroupRules = {new NetworkSecurityGroupRule(1234, NetworkSecurityGroupRuleAccess.Allow, "") - { - SourcePortRanges = {""}, - }}, - } - }), - PublicIpAddressConfiguration = new PublicIpAddressConfiguration - { - IpAddressProvisioningType = IpAddressProvisioningType.BatchManaged, - IpAddressIds = { "" }, - }, - EnableAcceleratedNetworking = true, - }, - StartTask = new BatchStartTask("") + StartTask = new BatchStartTask("myprogram2.exe") { - ContainerSettings = new BatchTaskContainerSettings("") - { - ContainerRunOptions = "", - Registry = default, - WorkingDirectory = ContainerWorkingDirectory.TaskWorkingDirectory, - }, ResourceFiles = {new ResourceFile { - AutoStorageContainerName = "", - StorageContainerUrl = "", - HttpUrl = "", - BlobPrefix = "", - FilePath = "", - FileMode = "", - IdentityReference = default, + HttpUrl = "http://mystorage1.blob.core.windows.net/scripts/myprogram2.exe?sas", + FilePath = "myprogram2.exe", }}, - EnvironmentSettings = {new EnvironmentSetting("") + EnvironmentSettings = {new EnvironmentSetting("myvariable") { - Value = "", + Value = "myvalue", }}, UserIdentity = new UserIdentity { - Username = "", AutoUser = new AutoUserSpecification { Scope = AutoUserScope.Task, - ElevationLevel = ElevationLevel.NonAdmin, + ElevationLevel = ElevationLevel.Admin, }, }, - MaxTaskRetryCount = 1234, + MaxTaskRetryCount = 2, WaitForSuccess = true, }, - ApplicationPackageReferences = {new BatchApplicationPackageReference("") - { - Version = "", - }}, - UserAccounts = {new UserAccount("", "") - { - ElevationLevel = ElevationLevel.NonAdmin, - LinuxUserConfiguration = new LinuxUserConfiguration - { - Uid = 1234, - Gid = 1234, - SshPrivateKey = "", - }, - WindowsUserConfiguration = new WindowsUserConfiguration - { - LoginMode = LoginMode.Batch, - }, - }}, - Metadata = { new MetadataItem("", "") }, - MountConfiguration = {new MountConfiguration - { - AzureBlobFileSystemConfiguration = new AzureBlobFileSystemConfiguration("", "", "") - { - AccountKey = "", - SasKey = "", - BlobfuseOptions = "", - IdentityReference = default, - }, - NfsMountConfiguration = new NfsMountConfiguration("", "") - { - MountOptions = "", - }, - CifsMountConfiguration = new CifsMountConfiguration("", "", "", "") - { - MountOptions = "", - }, - AzureFileShareConfiguration = new AzureFileShareConfiguration("", "", "", "") - { - MountOptions = "", - }, - }}, + Metadata = { new MetadataItem("myproperty", "myvalue") }, TargetNodeCommunicationMode = BatchNodeCommunicationMode.Default, - UpgradePolicy = new UpgradePolicy(UpgradeMode.Automatic) - { - AutomaticOsUpgradePolicy = new AutomaticOsUpgradePolicy - { - DisableAutomaticRollback = true, - EnableAutomaticOsUpgrade = true, - UseRollingUpgradePolicy = true, - OsRollingUpgradeDeferral = true, - }, - RollingUpgradePolicy = new RollingUpgradePolicy - { - EnableCrossZoneUpgrade = true, - MaxBatchInstancePercent = 1234, - MaxUnhealthyInstancePercent = 1234, - MaxUnhealthyUpgradedInstancePercent = 1234, - PauseTimeBetweenBatches = XmlConvert.ToTimeSpan("PT1H23M45S"), - PrioritizeUnhealthyInstances = true, - RollbackFailedInstancesOnPolicyBreach = true, - }, - }, }, }, }) { - Priority = 1234, - AllowTaskPreemption = true, - MaxParallelTasks = 1234, + Priority = 100, Constraints = new BatchJobConstraints { - MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - MaxTaskRetryCount = 1234, + MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H"), + MaxTaskRetryCount = -1, + }, + JobManagerTask = new BatchJobManagerTask("taskId", "myprogram.exe") + { + ResourceFiles = {new ResourceFile + { + HttpUrl = "http://mystorage1.blob.core.windows.net/scripts/myprogram.exe?sas", + FilePath = "myprogram.exe", + }, new ResourceFile + { + StorageContainerUrl = "http://mystorage1.blob.core.windows.net/data?sas", + FilePath = "datafolder", + }}, + EnvironmentSettings = {new EnvironmentSetting("myvariable") + { + Value = "myvalue", + }}, + Constraints = new BatchTaskConstraints + { + MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H"), + RetentionTime = XmlConvert.ToTimeSpan("PT1H"), + MaxTaskRetryCount = 0, + }, + RequiredSlots = 2, + KillJobOnCompletion = false, + UserIdentity = new UserIdentity + { + AutoUser = new AutoUserSpecification + { + Scope = AutoUserScope.Task, + ElevationLevel = ElevationLevel.Admin, + }, + }, + RunExclusive = true, }, - OnAllTasksComplete = OnAllBatchTasksComplete.NoAction, - Metadata = { default }, + Metadata = { new MetadataItem("myproperty", "myvalue") }, }; -Response response = await client.ReplaceJobAsync("", job, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); +Response response = await client.CreateJobAsync(job); ]]> - + -This sample shows how to call ReplaceJob. +This sample shows how to call CreateJob. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -BatchJob job = new BatchJob(new BatchPoolInfo()); -Response response = client.ReplaceJob("", job); +BatchJobCreateContent job = new BatchJobCreateContent("jobId", new BatchPoolInfo +{ + PoolId = "poolId", +}) +{ + Priority = 0, +}; +Response response = client.CreateJob(job); ]]> -This sample shows how to call ReplaceJob with all parameters. +This sample shows how to call CreateJob. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -BatchJob job = new BatchJob(new BatchPoolInfo +BatchJobCreateContent job = new BatchJobCreateContent("jobId", new BatchPoolInfo { - PoolId = "", - AutoPoolSpecification = new BatchAutoPoolSpecification(BatchPoolLifetimeOption.JobSchedule) + AutoPoolSpecification = new BatchAutoPoolSpecification(BatchPoolLifetimeOption.Job) { - AutoPoolIdPrefix = "", - KeepAlive = true, - Pool = new BatchPoolSpecification("") + AutoPoolIdPrefix = "mypool", + Pool = new BatchPoolSpecification("Standard_D1_v2") { - DisplayName = "", VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference { - Publisher = "", - Offer = "", - Sku = "", - Version = "", - VirtualMachineImageId = "", - }, "") - { - WindowsConfiguration = new WindowsConfiguration - { - EnableAutomaticUpdates = true, - }, - DataDisks = {new DataDisk(1234, 1234) - { - Caching = CachingType.None, - StorageAccountType = StorageAccountType.StandardLRS, - }}, - LicenseType = "", - ContainerConfiguration = new ContainerConfiguration(ContainerType.DockerCompatible) - { - ContainerImageNames = { "" }, - ContainerRegistries = {new ContainerRegistryReference - { - Username = "", - Password = "", - RegistryServer = "", - IdentityReference = new BatchNodeIdentityReference - { - ResourceId = "", - }, - }}, - }, - DiskEncryptionConfiguration = new DiskEncryptionConfiguration - { - Targets = { DiskEncryptionTarget.OsDisk }, - }, - NodePlacementConfiguration = new BatchNodePlacementConfiguration - { - Policy = BatchNodePlacementPolicyType.Regional, - }, - Extensions = {new VMExtension("", "", "") - { - TypeHandlerVersion = "", - AutoUpgradeMinorVersion = true, - EnableAutomaticUpgrade = true, - Settings = - { - ["key"] = "" - }, - ProtectedSettings = - { - ["key"] = "" - }, - ProvisionAfterExtensions = {""}, - }}, - OsDisk = new OSDisk - { - EphemeralOSDiskSettings = new DiffDiskSettings - { - Placement = DiffDiskPlacement.CacheDisk, - }, - Caching = CachingType.None, - DiskSizeGB = 1234, - ManagedDisk = new ManagedDisk(StorageAccountType.StandardLRS), - WriteAcceleratorEnabled = true, - }, - SecurityProfile = new SecurityProfile(true, SecurityTypes.TrustedLaunch, new UefiSettings - { - SecureBootEnabled = true, - VTpmEnabled = true, - }), - ServiceArtifactReference = new ServiceArtifactReference(""), - }, - TaskSlotsPerNode = 1234, + Publisher = "MicrosoftWindowsServer", + Offer = "WindowsServer", + Sku = "2016-datacenter-smalldisk", + Version = "latest", + }, "batch.node.windows amd64"), + TaskSlotsPerNode = 2, TaskSchedulingPolicy = new BatchTaskSchedulingPolicy(BatchNodeFillType.Spread), - ResizeTimeout = XmlConvert.ToTimeSpan("PT1H23M45S"), - ResourceTags = "", - TargetDedicatedNodes = 1234, - TargetLowPriorityNodes = 1234, - EnableAutoScale = true, - AutoScaleFormula = "", - AutoScaleEvaluationInterval = XmlConvert.ToTimeSpan("PT1H23M45S"), + ResizeTimeout = XmlConvert.ToTimeSpan("PT15M"), + TargetDedicatedNodes = 3, + TargetLowPriorityNodes = 0, + EnableAutoScale = false, EnableInterNodeCommunication = true, - NetworkConfiguration = new NetworkConfiguration - { - SubnetId = "", - DynamicVNetAssignmentScope = DynamicVNetAssignmentScope.None, - EndpointConfiguration = new BatchPoolEndpointConfiguration(new InboundNatPool[] - { - new InboundNatPool("", InboundEndpointProtocol.Tcp, 1234, 1234, 1234) - { - NetworkSecurityGroupRules = {new NetworkSecurityGroupRule(1234, NetworkSecurityGroupRuleAccess.Allow, "") - { - SourcePortRanges = {""}, - }}, - } - }), - PublicIpAddressConfiguration = new PublicIpAddressConfiguration - { - IpAddressProvisioningType = IpAddressProvisioningType.BatchManaged, - IpAddressIds = { "" }, - }, - EnableAcceleratedNetworking = true, - }, - StartTask = new BatchStartTask("") + StartTask = new BatchStartTask("myprogram2.exe") { - ContainerSettings = new BatchTaskContainerSettings("") - { - ContainerRunOptions = "", - Registry = default, - WorkingDirectory = ContainerWorkingDirectory.TaskWorkingDirectory, - }, ResourceFiles = {new ResourceFile { - AutoStorageContainerName = "", - StorageContainerUrl = "", - HttpUrl = "", - BlobPrefix = "", - FilePath = "", - FileMode = "", - IdentityReference = default, + HttpUrl = "http://mystorage1.blob.core.windows.net/scripts/myprogram2.exe?sas", + FilePath = "myprogram2.exe", }}, - EnvironmentSettings = {new EnvironmentSetting("") + EnvironmentSettings = {new EnvironmentSetting("myvariable") { - Value = "", + Value = "myvalue", }}, UserIdentity = new UserIdentity { - Username = "", AutoUser = new AutoUserSpecification { Scope = AutoUserScope.Task, - ElevationLevel = ElevationLevel.NonAdmin, + ElevationLevel = ElevationLevel.Admin, }, }, - MaxTaskRetryCount = 1234, + MaxTaskRetryCount = 2, WaitForSuccess = true, }, - ApplicationPackageReferences = {new BatchApplicationPackageReference("") - { - Version = "", - }}, - UserAccounts = {new UserAccount("", "") - { - ElevationLevel = ElevationLevel.NonAdmin, - LinuxUserConfiguration = new LinuxUserConfiguration - { - Uid = 1234, - Gid = 1234, - SshPrivateKey = "", - }, - WindowsUserConfiguration = new WindowsUserConfiguration - { - LoginMode = LoginMode.Batch, - }, - }}, - Metadata = { new MetadataItem("", "") }, - MountConfiguration = {new MountConfiguration - { - AzureBlobFileSystemConfiguration = new AzureBlobFileSystemConfiguration("", "", "") - { - AccountKey = "", - SasKey = "", - BlobfuseOptions = "", - IdentityReference = default, - }, - NfsMountConfiguration = new NfsMountConfiguration("", "") - { - MountOptions = "", - }, - CifsMountConfiguration = new CifsMountConfiguration("", "", "", "") - { - MountOptions = "", - }, - AzureFileShareConfiguration = new AzureFileShareConfiguration("", "", "", "") - { - MountOptions = "", - }, - }}, + Metadata = { new MetadataItem("myproperty", "myvalue") }, TargetNodeCommunicationMode = BatchNodeCommunicationMode.Default, - UpgradePolicy = new UpgradePolicy(UpgradeMode.Automatic) - { - AutomaticOsUpgradePolicy = new AutomaticOsUpgradePolicy - { - DisableAutomaticRollback = true, - EnableAutomaticOsUpgrade = true, - UseRollingUpgradePolicy = true, - OsRollingUpgradeDeferral = true, - }, - RollingUpgradePolicy = new RollingUpgradePolicy - { - EnableCrossZoneUpgrade = true, - MaxBatchInstancePercent = 1234, - MaxUnhealthyInstancePercent = 1234, - MaxUnhealthyUpgradedInstancePercent = 1234, - PauseTimeBetweenBatches = XmlConvert.ToTimeSpan("PT1H23M45S"), - PrioritizeUnhealthyInstances = true, - RollbackFailedInstancesOnPolicyBreach = true, - }, - }, }, }, }) { - Priority = 1234, - AllowTaskPreemption = true, - MaxParallelTasks = 1234, + Priority = 100, Constraints = new BatchJobConstraints { - MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - MaxTaskRetryCount = 1234, + MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H"), + MaxTaskRetryCount = -1, + }, + JobManagerTask = new BatchJobManagerTask("taskId", "myprogram.exe") + { + ResourceFiles = {new ResourceFile + { + HttpUrl = "http://mystorage1.blob.core.windows.net/scripts/myprogram.exe?sas", + FilePath = "myprogram.exe", + }, new ResourceFile + { + StorageContainerUrl = "http://mystorage1.blob.core.windows.net/data?sas", + FilePath = "datafolder", + }}, + EnvironmentSettings = {new EnvironmentSetting("myvariable") + { + Value = "myvalue", + }}, + Constraints = new BatchTaskConstraints + { + MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H"), + RetentionTime = XmlConvert.ToTimeSpan("PT1H"), + MaxTaskRetryCount = 0, + }, + RequiredSlots = 2, + KillJobOnCompletion = false, + UserIdentity = new UserIdentity + { + AutoUser = new AutoUserSpecification + { + Scope = AutoUserScope.Task, + ElevationLevel = ElevationLevel.Admin, + }, + }, + RunExclusive = true, }, - OnAllTasksComplete = OnAllBatchTasksComplete.NoAction, - Metadata = { default }, + Metadata = { new MetadataItem("myproperty", "myvalue") }, }; -Response response = client.ReplaceJob("", job, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); +Response response = client.CreateJob(job); ]]> - + -This sample shows how to call ReplaceJobAsync. +This sample shows how to call CreateJobAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - poolInfo = new object(), + id = "jobId", + priority = 0, + poolInfo = new + { + poolId = "poolId", + }, }); -Response response = await client.ReplaceJobAsync("", content); +Response response = await client.CreateJobAsync(content); Console.WriteLine(response.Status); ]]> -This sample shows how to call ReplaceJobAsync with all parameters and request content. +This sample shows how to call CreateJobAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - priority = 1234, - allowTaskPreemption = true, - maxParallelTasks = 1234, + id = "jobId", + priority = 100, constraints = new { - maxWallClockTime = "PT1H23M45S", - maxTaskRetryCount = 1234, + maxWallClockTime = "PT1H", + maxTaskRetryCount = -1, + }, + jobManagerTask = new + { + id = "taskId", + commandLine = "myprogram.exe", + resourceFiles = new object[] + { + new + { + httpUrl = "http://mystorage1.blob.core.windows.net/scripts/myprogram.exe?sas", + filePath = "myprogram.exe", + }, + new + { + storageContainerUrl = "http://mystorage1.blob.core.windows.net/data?sas", + filePath = "datafolder", + } + }, + environmentSettings = new object[] + { + new + { + name = "myvariable", + value = "myvalue", + } + }, + constraints = new + { + maxWallClockTime = "PT1H", + maxTaskRetryCount = 0, + retentionTime = "PT1H", + }, + requiredSlots = 2, + killJobOnCompletion = false, + userIdentity = new + { + autoUser = new + { + scope = "task", + elevationLevel = "admin", + }, + }, + runExclusive = true, }, poolInfo = new { - poolId = "", autoPoolSpecification = new { - autoPoolIdPrefix = "", - poolLifetimeOption = "jobschedule", - keepAlive = true, + autoPoolIdPrefix = "mypool", + poolLifetimeOption = "job", pool = new { - displayName = "", - vmSize = "", + vmSize = "Standard_D1_v2", virtualMachineConfiguration = new { imageReference = new { - publisher = "", - offer = "", - sku = "", - version = "", - virtualMachineImageId = "", - }, - nodeAgentSKUId = "", - windowsConfiguration = new - { - enableAutomaticUpdates = true, - }, - dataDisks = new object[] - { - new - { - lun = 1234, - caching = "none", - diskSizeGB = 1234, - storageAccountType = "standard_lrs", - } - }, - licenseType = "", - containerConfiguration = new - { - type = "dockerCompatible", - containerImageNames = new object[] - { - "" - }, - containerRegistries = new object[] - { - new - { - username = "", - password = "", - registryServer = "", - identityReference = new - { - resourceId = "", - }, - } - }, - }, - diskEncryptionConfiguration = new - { - targets = new object[] - { - "osdisk" - }, - }, - nodePlacementConfiguration = new - { - policy = "regional", - }, - extensions = new object[] - { - new - { - name = "", - publisher = "", - type = "", - typeHandlerVersion = "", - autoUpgradeMinorVersion = true, - enableAutomaticUpgrade = true, - settings = new - { - key = "", - }, - protectedSettings = new - { - key = "", - }, - provisionAfterExtensions = new object[] - { - "" - }, - } - }, - osDisk = new - { - ephemeralOSDiskSettings = new - { - placement = "cachedisk", - }, - caching = "none", - diskSizeGB = 1234, - managedDisk = new - { - storageAccountType = "standard_lrs", - }, - writeAcceleratorEnabled = true, - }, - securityProfile = new - { - encryptionAtHost = true, - securityType = "trustedLaunch", - uefiSettings = new - { - secureBootEnabled = true, - vTpmEnabled = true, - }, - }, - serviceArtifactReference = new - { - id = "", + publisher = "MicrosoftWindowsServer", + offer = "WindowsServer", + sku = "2016-datacenter-smalldisk", + version = "latest", }, + nodeAgentSKUId = "batch.node.windows amd64", }, - taskSlotsPerNode = 1234, + resizeTimeout = "PT15M", + targetDedicatedNodes = 3, + targetLowPriorityNodes = 0, + taskSlotsPerNode = 2, taskSchedulingPolicy = new { nodeFillType = "spread", }, - resizeTimeout = "PT1H23M45S", - resourceTags = "", - targetDedicatedNodes = 1234, - targetLowPriorityNodes = 1234, - enableAutoScale = true, - autoScaleFormula = "", - autoScaleEvaluationInterval = "PT1H23M45S", + enableAutoScale = false, enableInterNodeCommunication = true, - networkConfiguration = new - { - subnetId = "", - dynamicVNetAssignmentScope = "none", - endpointConfiguration = new - { - inboundNATPools = new object[] - { - new - { - name = "", - protocol = "tcp", - backendPort = 1234, - frontendPortRangeStart = 1234, - frontendPortRangeEnd = 1234, - networkSecurityGroupRules = new object[] - { - new - { - priority = 1234, - access = "allow", - sourceAddressPrefix = "", - sourcePortRanges = new object[] - { - "" - }, - } - }, - } - }, - }, - publicIPAddressConfiguration = new - { - provision = "batchmanaged", - ipAddressIds = new object[] - { - "" - }, - }, - enableAcceleratedNetworking = true, - }, startTask = new { - commandLine = "", - containerSettings = new - { - containerRunOptions = "", - imageName = "", - workingDirectory = "taskWorkingDirectory", - }, + commandLine = "myprogram2.exe", resourceFiles = new object[] { new { - autoStorageContainerName = "", - storageContainerUrl = "", - httpUrl = "", - blobPrefix = "", - filePath = "", - fileMode = "", + httpUrl = "http://mystorage1.blob.core.windows.net/scripts/myprogram2.exe?sas", + filePath = "myprogram2.exe", } }, environmentSettings = new object[] { new { - name = "", - value = "", + name = "myvariable", + value = "myvalue", } }, userIdentity = new { - username = "", autoUser = new { scope = "task", - elevationLevel = "nonadmin", + elevationLevel = "admin", }, }, - maxTaskRetryCount = 1234, + maxTaskRetryCount = 2, waitForSuccess = true, }, - applicationPackageReferences = new object[] - { - new - { - applicationId = "", - version = "", - } - }, - userAccounts = new object[] - { - new - { - name = "", - password = "", - elevationLevel = "nonadmin", - linuxUserConfiguration = new - { - uid = 1234, - gid = 1234, - sshPrivateKey = "", - }, - windowsUserConfiguration = new - { - loginMode = "batch", - }, - } - }, metadata = new object[] { new { - name = "", - value = "", - } - }, - mountConfiguration = new object[] - { - new - { - azureBlobFileSystemConfiguration = new - { - accountName = "", - containerName = "", - accountKey = "", - sasKey = "", - blobfuseOptions = "", - relativeMountPath = "", - }, - nfsMountConfiguration = new - { - source = "", - relativeMountPath = "", - mountOptions = "", - }, - cifsMountConfiguration = new - { - username = "", - source = "", - relativeMountPath = "", - mountOptions = "", - password = "", - }, - azureFileShareConfiguration = new - { - accountName = "", - azureFileUrl = "", - accountKey = "", - relativeMountPath = "", - mountOptions = "", - }, + name = "myproperty", + value = "myvalue", } }, targetNodeCommunicationMode = "default", - upgradePolicy = new - { - mode = "automatic", - automaticOSUpgradePolicy = new - { - disableAutomaticRollback = true, - enableAutomaticOSUpgrade = true, - useRollingUpgradePolicy = true, - osRollingUpgradeDeferral = true, - }, - rollingUpgradePolicy = new - { - enableCrossZoneUpgrade = true, - maxBatchInstancePercent = 1234, - maxUnhealthyInstancePercent = 1234, - maxUnhealthyUpgradedInstancePercent = 1234, - pauseTimeBetweenBatches = "PT1H23M45S", - prioritizeUnhealthyInstances = true, - rollbackFailedInstancesOnPolicyBreach = true, - }, - }, }, }, }, - onAllTasksComplete = "noaction", metadata = new object[] { - null + new + { + name = "myproperty", + value = "myvalue", + } }, }); -Response response = await client.ReplaceJobAsync("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); +Response response = await client.CreateJobAsync(content); Console.WriteLine(response.Status); ]]> - + -This sample shows how to call ReplaceJob. +This sample shows how to call CreateJob. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - poolInfo = new object(), + id = "jobId", + priority = 0, + poolInfo = new + { + poolId = "poolId", + }, }); -Response response = client.ReplaceJob("", content); +Response response = client.CreateJob(content); Console.WriteLine(response.Status); ]]> -This sample shows how to call ReplaceJob with all parameters and request content. +This sample shows how to call CreateJob. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - priority = 1234, - allowTaskPreemption = true, - maxParallelTasks = 1234, + id = "jobId", + priority = 100, constraints = new { - maxWallClockTime = "PT1H23M45S", - maxTaskRetryCount = 1234, + maxWallClockTime = "PT1H", + maxTaskRetryCount = -1, + }, + jobManagerTask = new + { + id = "taskId", + commandLine = "myprogram.exe", + resourceFiles = new object[] + { + new + { + httpUrl = "http://mystorage1.blob.core.windows.net/scripts/myprogram.exe?sas", + filePath = "myprogram.exe", + }, + new + { + storageContainerUrl = "http://mystorage1.blob.core.windows.net/data?sas", + filePath = "datafolder", + } + }, + environmentSettings = new object[] + { + new + { + name = "myvariable", + value = "myvalue", + } + }, + constraints = new + { + maxWallClockTime = "PT1H", + maxTaskRetryCount = 0, + retentionTime = "PT1H", + }, + requiredSlots = 2, + killJobOnCompletion = false, + userIdentity = new + { + autoUser = new + { + scope = "task", + elevationLevel = "admin", + }, + }, + runExclusive = true, }, poolInfo = new { - poolId = "", autoPoolSpecification = new { - autoPoolIdPrefix = "", - poolLifetimeOption = "jobschedule", - keepAlive = true, + autoPoolIdPrefix = "mypool", + poolLifetimeOption = "job", pool = new { - displayName = "", - vmSize = "", + vmSize = "Standard_D1_v2", virtualMachineConfiguration = new { imageReference = new { - publisher = "", - offer = "", - sku = "", - version = "", - virtualMachineImageId = "", - }, - nodeAgentSKUId = "", - windowsConfiguration = new - { - enableAutomaticUpdates = true, - }, - dataDisks = new object[] - { - new - { - lun = 1234, - caching = "none", - diskSizeGB = 1234, - storageAccountType = "standard_lrs", - } - }, - licenseType = "", - containerConfiguration = new - { - type = "dockerCompatible", - containerImageNames = new object[] - { - "" - }, - containerRegistries = new object[] - { - new - { - username = "", - password = "", - registryServer = "", - identityReference = new - { - resourceId = "", - }, - } - }, - }, - diskEncryptionConfiguration = new - { - targets = new object[] - { - "osdisk" - }, - }, - nodePlacementConfiguration = new - { - policy = "regional", - }, - extensions = new object[] - { - new - { - name = "", - publisher = "", - type = "", - typeHandlerVersion = "", - autoUpgradeMinorVersion = true, - enableAutomaticUpgrade = true, - settings = new - { - key = "", - }, - protectedSettings = new - { - key = "", - }, - provisionAfterExtensions = new object[] - { - "" - }, - } - }, - osDisk = new - { - ephemeralOSDiskSettings = new - { - placement = "cachedisk", - }, - caching = "none", - diskSizeGB = 1234, - managedDisk = new - { - storageAccountType = "standard_lrs", - }, - writeAcceleratorEnabled = true, - }, - securityProfile = new - { - encryptionAtHost = true, - securityType = "trustedLaunch", - uefiSettings = new - { - secureBootEnabled = true, - vTpmEnabled = true, - }, - }, - serviceArtifactReference = new - { - id = "", + publisher = "MicrosoftWindowsServer", + offer = "WindowsServer", + sku = "2016-datacenter-smalldisk", + version = "latest", }, + nodeAgentSKUId = "batch.node.windows amd64", }, - taskSlotsPerNode = 1234, + resizeTimeout = "PT15M", + targetDedicatedNodes = 3, + targetLowPriorityNodes = 0, + taskSlotsPerNode = 2, taskSchedulingPolicy = new { nodeFillType = "spread", }, - resizeTimeout = "PT1H23M45S", - resourceTags = "", - targetDedicatedNodes = 1234, - targetLowPriorityNodes = 1234, - enableAutoScale = true, - autoScaleFormula = "", - autoScaleEvaluationInterval = "PT1H23M45S", + enableAutoScale = false, enableInterNodeCommunication = true, - networkConfiguration = new - { - subnetId = "", - dynamicVNetAssignmentScope = "none", - endpointConfiguration = new - { - inboundNATPools = new object[] - { - new - { - name = "", - protocol = "tcp", - backendPort = 1234, - frontendPortRangeStart = 1234, - frontendPortRangeEnd = 1234, - networkSecurityGroupRules = new object[] - { - new - { - priority = 1234, - access = "allow", - sourceAddressPrefix = "", - sourcePortRanges = new object[] - { - "" - }, - } - }, - } - }, - }, - publicIPAddressConfiguration = new - { - provision = "batchmanaged", - ipAddressIds = new object[] - { - "" - }, - }, - enableAcceleratedNetworking = true, - }, startTask = new { - commandLine = "", - containerSettings = new - { - containerRunOptions = "", - imageName = "", - workingDirectory = "taskWorkingDirectory", - }, + commandLine = "myprogram2.exe", resourceFiles = new object[] { new { - autoStorageContainerName = "", - storageContainerUrl = "", - httpUrl = "", - blobPrefix = "", - filePath = "", - fileMode = "", + httpUrl = "http://mystorage1.blob.core.windows.net/scripts/myprogram2.exe?sas", + filePath = "myprogram2.exe", } }, environmentSettings = new object[] { new { - name = "", - value = "", + name = "myvariable", + value = "myvalue", } }, userIdentity = new { - username = "", autoUser = new { scope = "task", - elevationLevel = "nonadmin", + elevationLevel = "admin", }, }, - maxTaskRetryCount = 1234, + maxTaskRetryCount = 2, waitForSuccess = true, }, - applicationPackageReferences = new object[] - { - new - { - applicationId = "", - version = "", - } - }, - userAccounts = new object[] - { - new - { - name = "", - password = "", - elevationLevel = "nonadmin", - linuxUserConfiguration = new - { - uid = 1234, - gid = 1234, - sshPrivateKey = "", - }, - windowsUserConfiguration = new - { - loginMode = "batch", - }, - } - }, metadata = new object[] { new { - name = "", - value = "", - } - }, - mountConfiguration = new object[] - { - new - { - azureBlobFileSystemConfiguration = new - { - accountName = "", - containerName = "", - accountKey = "", - sasKey = "", - blobfuseOptions = "", - relativeMountPath = "", - }, - nfsMountConfiguration = new - { - source = "", - relativeMountPath = "", - mountOptions = "", - }, - cifsMountConfiguration = new - { - username = "", - source = "", - relativeMountPath = "", - mountOptions = "", - password = "", - }, - azureFileShareConfiguration = new - { - accountName = "", - azureFileUrl = "", - accountKey = "", - relativeMountPath = "", - mountOptions = "", - }, + name = "myproperty", + value = "myvalue", } }, targetNodeCommunicationMode = "default", - upgradePolicy = new - { - mode = "automatic", - automaticOSUpgradePolicy = new - { - disableAutomaticRollback = true, - enableAutomaticOSUpgrade = true, - useRollingUpgradePolicy = true, - osRollingUpgradeDeferral = true, - }, - rollingUpgradePolicy = new - { - enableCrossZoneUpgrade = true, - maxBatchInstancePercent = 1234, - maxUnhealthyInstancePercent = 1234, - maxUnhealthyUpgradedInstancePercent = 1234, - pauseTimeBetweenBatches = "PT1H23M45S", - prioritizeUnhealthyInstances = true, - rollbackFailedInstancesOnPolicyBreach = true, - }, - }, }, }, }, - onAllTasksComplete = "noaction", metadata = new object[] { - null + new + { + name = "myproperty", + value = "myvalue", + } }, }); -Response response = client.ReplaceJob("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); +Response response = client.CreateJob(content); Console.WriteLine(response.Status); ]]> - + -This sample shows how to call DisableJobAsync. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -BatchJobDisableContent content = new BatchJobDisableContent(DisableBatchJobOption.Requeue); -Response response = await client.DisableJobAsync("", content); -]]> -This sample shows how to call DisableJobAsync with all parameters. +This sample shows how to call GetJobTaskCountsAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -BatchJobDisableContent content = new BatchJobDisableContent(DisableBatchJobOption.Requeue); -Response response = await client.DisableJobAsync("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); +Response response = await client.GetJobTaskCountsAsync("jobId"); ]]> - + -This sample shows how to call DisableJob. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -BatchJobDisableContent content = new BatchJobDisableContent(DisableBatchJobOption.Requeue); -Response response = client.DisableJob("", content); -]]> -This sample shows how to call DisableJob with all parameters. +This sample shows how to call GetJobTaskCounts. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -BatchJobDisableContent content = new BatchJobDisableContent(DisableBatchJobOption.Requeue); -Response response = client.DisableJob("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); +Response response = client.GetJobTaskCounts("jobId"); ]]> - + -This sample shows how to call DisableJobAsync. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - disableTasks = "requeue", -}); -Response response = await client.DisableJobAsync("", content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call DisableJobAsync with all parameters and request content. +This sample shows how to call GetJobTaskCountsAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -using RequestContent content = RequestContent.Create(new -{ - disableTasks = "requeue", -}); -Response response = await client.DisableJobAsync("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); +Response response = await client.GetJobTaskCountsAsync("jobId", null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null); -Console.WriteLine(response.Status); +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("taskCounts").GetProperty("active").ToString()); +Console.WriteLine(result.GetProperty("taskCounts").GetProperty("running").ToString()); +Console.WriteLine(result.GetProperty("taskCounts").GetProperty("completed").ToString()); +Console.WriteLine(result.GetProperty("taskCounts").GetProperty("succeeded").ToString()); +Console.WriteLine(result.GetProperty("taskCounts").GetProperty("failed").ToString()); +Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("active").ToString()); +Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("running").ToString()); +Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("completed").ToString()); +Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("succeeded").ToString()); +Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("failed").ToString()); ]]> - + -This sample shows how to call DisableJob. +This sample shows how to call GetJobTaskCounts and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -using RequestContent content = RequestContent.Create(new -{ - disableTasks = "requeue", -}); -Response response = client.DisableJob("", content); +Response response = client.GetJobTaskCounts("jobId", null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null); -Console.WriteLine(response.Status); -]]> -This sample shows how to call DisableJob with all parameters and request content. +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("taskCounts").GetProperty("active").ToString()); +Console.WriteLine(result.GetProperty("taskCounts").GetProperty("running").ToString()); +Console.WriteLine(result.GetProperty("taskCounts").GetProperty("completed").ToString()); +Console.WriteLine(result.GetProperty("taskCounts").GetProperty("succeeded").ToString()); +Console.WriteLine(result.GetProperty("taskCounts").GetProperty("failed").ToString()); +Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("active").ToString()); +Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("running").ToString()); +Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("completed").ToString()); +Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("succeeded").ToString()); +Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("failed").ToString()); +]]> + + + +This sample shows how to call DeleteJobScheduleAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -using RequestContent content = RequestContent.Create(new -{ - disableTasks = "requeue", -}); -Response response = client.DisableJob("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); +Response response = await client.DeleteJobScheduleAsync("jobScheduleId"); Console.WriteLine(response.Status); ]]> - + -This sample shows how to call EnableJobAsync. +This sample shows how to call DeleteJobSchedule. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -Response response = await client.EnableJobAsync(""); +Response response = client.DeleteJobSchedule("jobScheduleId"); Console.WriteLine(response.Status); -]]> -This sample shows how to call EnableJobAsync with all parameters. +]]> + + + +This sample shows how to call GetJobScheduleAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -Response response = await client.EnableJobAsync("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); - -Console.WriteLine(response.Status); +Response response = await client.GetJobScheduleAsync("jobScheduleId"); ]]> - + -This sample shows how to call EnableJob. +This sample shows how to call GetJobSchedule. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -Response response = client.EnableJob(""); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call EnableJob with all parameters. +Response response = client.GetJobSchedule("jobScheduleId"); +]]> + + + +This sample shows how to call GetJobScheduleAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -Response response = client.EnableJob("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); +Response response = await client.GetJobScheduleAsync("jobScheduleId", null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null, null, null, null); -Console.WriteLine(response.Status); +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").ToString()); ]]> - + -This sample shows how to call TerminateJobAsync. +This sample shows how to call GetJobSchedule and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -Response response = await client.TerminateJobAsync(""); -]]> -This sample shows how to call TerminateJobAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); +Response response = client.GetJobSchedule("jobScheduleId", null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null, null, null, null); -BatchJobTerminateContent parameters = new BatchJobTerminateContent -{ - TerminationReason = "", -}; -Response response = await client.TerminateJobAsync("", parameters: parameters, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").ToString()); ]]> - + -This sample shows how to call TerminateJob. +This sample shows how to call UpdateJobScheduleAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -Response response = client.TerminateJob(""); -]]> -This sample shows how to call TerminateJob with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -BatchJobTerminateContent parameters = new BatchJobTerminateContent -{ - TerminationReason = "", -}; -Response response = client.TerminateJob("", parameters: parameters, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); -]]> - - - -This sample shows how to call TerminateJobAsync. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -using RequestContent content = null; -Response response = await client.TerminateJobAsync("", content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call TerminateJobAsync with all parameters and request content. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - terminateReason = "", -}); -Response response = await client.TerminateJobAsync("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); - -Console.WriteLine(response.Status); -]]> - - - -This sample shows how to call TerminateJob. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -using RequestContent content = null; -Response response = client.TerminateJob("", content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call TerminateJob with all parameters and request content. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - terminateReason = "", -}); -Response response = client.TerminateJob("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); - -Console.WriteLine(response.Status); -]]> - - - -This sample shows how to call CreateJobAsync. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -BatchJobCreateContent job = new BatchJobCreateContent("", new BatchPoolInfo()); -Response response = await client.CreateJobAsync(job); -]]> -This sample shows how to call CreateJobAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -BatchJobCreateContent job = new BatchJobCreateContent("", new BatchPoolInfo -{ - PoolId = "", - AutoPoolSpecification = new BatchAutoPoolSpecification(BatchPoolLifetimeOption.JobSchedule) - { - AutoPoolIdPrefix = "", - KeepAlive = true, - Pool = new BatchPoolSpecification("") - { - DisplayName = "", - VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference - { - Publisher = "", - Offer = "", - Sku = "", - Version = "", - VirtualMachineImageId = "", - }, "") - { - WindowsConfiguration = new WindowsConfiguration - { - EnableAutomaticUpdates = true, - }, - DataDisks = {new DataDisk(1234, 1234) - { - Caching = CachingType.None, - StorageAccountType = StorageAccountType.StandardLRS, - }}, - LicenseType = "", - ContainerConfiguration = new ContainerConfiguration(ContainerType.DockerCompatible) - { - ContainerImageNames = { "" }, - ContainerRegistries = { default }, - }, - DiskEncryptionConfiguration = new DiskEncryptionConfiguration - { - Targets = { DiskEncryptionTarget.OsDisk }, - }, - NodePlacementConfiguration = new BatchNodePlacementConfiguration - { - Policy = BatchNodePlacementPolicyType.Regional, - }, - Extensions = {new VMExtension("", "", "") - { - TypeHandlerVersion = "", - AutoUpgradeMinorVersion = true, - EnableAutomaticUpgrade = true, - Settings = - { - ["key"] = "" - }, - ProtectedSettings = - { - ["key"] = "" - }, - ProvisionAfterExtensions = {""}, - }}, - OsDisk = new OSDisk - { - EphemeralOSDiskSettings = new DiffDiskSettings - { - Placement = DiffDiskPlacement.CacheDisk, - }, - Caching = CachingType.None, - DiskSizeGB = 1234, - ManagedDisk = new ManagedDisk(StorageAccountType.StandardLRS), - WriteAcceleratorEnabled = true, - }, - SecurityProfile = new SecurityProfile(true, SecurityTypes.TrustedLaunch, new UefiSettings - { - SecureBootEnabled = true, - VTpmEnabled = true, - }), - ServiceArtifactReference = new ServiceArtifactReference(""), - }, - TaskSlotsPerNode = 1234, - TaskSchedulingPolicy = new BatchTaskSchedulingPolicy(BatchNodeFillType.Spread), - ResizeTimeout = XmlConvert.ToTimeSpan("PT1H23M45S"), - ResourceTags = "", - TargetDedicatedNodes = 1234, - TargetLowPriorityNodes = 1234, - EnableAutoScale = true, - AutoScaleFormula = "", - AutoScaleEvaluationInterval = XmlConvert.ToTimeSpan("PT1H23M45S"), - EnableInterNodeCommunication = true, - NetworkConfiguration = new NetworkConfiguration - { - SubnetId = "", - DynamicVNetAssignmentScope = DynamicVNetAssignmentScope.None, - EndpointConfiguration = new BatchPoolEndpointConfiguration(new InboundNatPool[] - { - new InboundNatPool("", InboundEndpointProtocol.Tcp, 1234, 1234, 1234) - { - NetworkSecurityGroupRules = {new NetworkSecurityGroupRule(1234, NetworkSecurityGroupRuleAccess.Allow, "") - { - SourcePortRanges = {""}, - }}, - } - }), - PublicIpAddressConfiguration = new PublicIpAddressConfiguration - { - IpAddressProvisioningType = IpAddressProvisioningType.BatchManaged, - IpAddressIds = { "" }, - }, - EnableAcceleratedNetworking = true, - }, - StartTask = new BatchStartTask("") - { - ContainerSettings = default, - ResourceFiles = { default }, - EnvironmentSettings = { default }, - UserIdentity = default, - MaxTaskRetryCount = 1234, - WaitForSuccess = true, - }, - ApplicationPackageReferences = { default }, - UserAccounts = {new UserAccount("", "") - { - ElevationLevel = ElevationLevel.NonAdmin, - LinuxUserConfiguration = new LinuxUserConfiguration - { - Uid = 1234, - Gid = 1234, - SshPrivateKey = "", - }, - WindowsUserConfiguration = new WindowsUserConfiguration - { - LoginMode = LoginMode.Batch, - }, - }}, - Metadata = { new MetadataItem("", "") }, - MountConfiguration = {new MountConfiguration - { - AzureBlobFileSystemConfiguration = new AzureBlobFileSystemConfiguration("", "", "") - { - AccountKey = "", - SasKey = "", - BlobfuseOptions = "", - IdentityReference = default, - }, - NfsMountConfiguration = new NfsMountConfiguration("", "") - { - MountOptions = "", - }, - CifsMountConfiguration = new CifsMountConfiguration("", "", "", "") - { - MountOptions = "", - }, - AzureFileShareConfiguration = new AzureFileShareConfiguration("", "", "", "") - { - MountOptions = "", - }, - }}, - TargetNodeCommunicationMode = BatchNodeCommunicationMode.Default, - UpgradePolicy = new UpgradePolicy(UpgradeMode.Automatic) - { - AutomaticOsUpgradePolicy = new AutomaticOsUpgradePolicy - { - DisableAutomaticRollback = true, - EnableAutomaticOsUpgrade = true, - UseRollingUpgradePolicy = true, - OsRollingUpgradeDeferral = true, - }, - RollingUpgradePolicy = new RollingUpgradePolicy - { - EnableCrossZoneUpgrade = true, - MaxBatchInstancePercent = 1234, - MaxUnhealthyInstancePercent = 1234, - MaxUnhealthyUpgradedInstancePercent = 1234, - PauseTimeBetweenBatches = XmlConvert.ToTimeSpan("PT1H23M45S"), - PrioritizeUnhealthyInstances = true, - RollbackFailedInstancesOnPolicyBreach = true, - }, - }, - }, - }, -}) -{ - DisplayName = "", - UsesTaskDependencies = true, - Priority = 1234, - AllowTaskPreemption = true, - MaxParallelTasks = 1234, - Constraints = new BatchJobConstraints - { - MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - MaxTaskRetryCount = 1234, - }, - JobManagerTask = new BatchJobManagerTask("", "") - { - DisplayName = "", - ContainerSettings = new BatchTaskContainerSettings("") - { - ContainerRunOptions = "", - Registry = new ContainerRegistryReference - { - Username = "", - Password = "", - RegistryServer = "", - IdentityReference = new BatchNodeIdentityReference - { - ResourceId = "", - }, - }, - WorkingDirectory = ContainerWorkingDirectory.TaskWorkingDirectory, - }, - ResourceFiles = {new ResourceFile - { - AutoStorageContainerName = "", - StorageContainerUrl = "", - HttpUrl = "", - BlobPrefix = "", - FilePath = "", - FileMode = "", - IdentityReference = default, - }}, - OutputFiles = {new OutputFile("", new OutputFileDestination - { - Container = new OutputFileBlobContainerDestination("") - { - Path = "", - IdentityReference = default, - UploadHeaders = {new HttpHeader("") - { - Value = "", - }}, - }, - }, new OutputFileUploadConfig(OutputFileUploadCondition.TaskSuccess))}, - EnvironmentSettings = {new EnvironmentSetting("") - { - Value = "", - }}, - Constraints = new BatchTaskConstraints - { - MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - RetentionTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - MaxTaskRetryCount = 1234, - }, - RequiredSlots = 1234, - KillJobOnCompletion = true, - UserIdentity = new UserIdentity - { - Username = "", - AutoUser = new AutoUserSpecification - { - Scope = AutoUserScope.Task, - ElevationLevel = ElevationLevel.NonAdmin, - }, - }, - RunExclusive = true, - ApplicationPackageReferences = {new BatchApplicationPackageReference("") - { - Version = "", - }}, - AuthenticationTokenSettings = new AuthenticationTokenSettings - { - Access = { AccessScope.Job }, - }, - AllowLowPriorityNode = true, - }, - JobPreparationTask = new BatchJobPreparationTask("") - { - Id = "", - ContainerSettings = default, - ResourceFiles = { default }, - EnvironmentSettings = { default }, - Constraints = default, - WaitForSuccess = true, - UserIdentity = default, - RerunOnNodeRebootAfterSuccess = true, - }, - JobReleaseTask = new BatchJobReleaseTask("") - { - Id = "", - ContainerSettings = default, - ResourceFiles = { default }, - EnvironmentSettings = { default }, - MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - RetentionTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - UserIdentity = default, - }, - CommonEnvironmentSettings = { default }, - OnAllTasksComplete = OnAllBatchTasksComplete.NoAction, - OnTaskFailure = OnBatchTaskFailure.NoAction, - NetworkConfiguration = new BatchJobNetworkConfiguration(""), - Metadata = { default }, -}; -Response response = await client.CreateJobAsync(job, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); -]]> - - - -This sample shows how to call CreateJob. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -BatchJobCreateContent job = new BatchJobCreateContent("", new BatchPoolInfo()); -Response response = client.CreateJob(job); -]]> -This sample shows how to call CreateJob with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -BatchJobCreateContent job = new BatchJobCreateContent("", new BatchPoolInfo -{ - PoolId = "", - AutoPoolSpecification = new BatchAutoPoolSpecification(BatchPoolLifetimeOption.JobSchedule) - { - AutoPoolIdPrefix = "", - KeepAlive = true, - Pool = new BatchPoolSpecification("") - { - DisplayName = "", - VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference - { - Publisher = "", - Offer = "", - Sku = "", - Version = "", - VirtualMachineImageId = "", - }, "") - { - WindowsConfiguration = new WindowsConfiguration - { - EnableAutomaticUpdates = true, - }, - DataDisks = {new DataDisk(1234, 1234) - { - Caching = CachingType.None, - StorageAccountType = StorageAccountType.StandardLRS, - }}, - LicenseType = "", - ContainerConfiguration = new ContainerConfiguration(ContainerType.DockerCompatible) - { - ContainerImageNames = { "" }, - ContainerRegistries = { default }, - }, - DiskEncryptionConfiguration = new DiskEncryptionConfiguration - { - Targets = { DiskEncryptionTarget.OsDisk }, - }, - NodePlacementConfiguration = new BatchNodePlacementConfiguration - { - Policy = BatchNodePlacementPolicyType.Regional, - }, - Extensions = {new VMExtension("", "", "") - { - TypeHandlerVersion = "", - AutoUpgradeMinorVersion = true, - EnableAutomaticUpgrade = true, - Settings = - { - ["key"] = "" - }, - ProtectedSettings = - { - ["key"] = "" - }, - ProvisionAfterExtensions = {""}, - }}, - OsDisk = new OSDisk - { - EphemeralOSDiskSettings = new DiffDiskSettings - { - Placement = DiffDiskPlacement.CacheDisk, - }, - Caching = CachingType.None, - DiskSizeGB = 1234, - ManagedDisk = new ManagedDisk(StorageAccountType.StandardLRS), - WriteAcceleratorEnabled = true, - }, - SecurityProfile = new SecurityProfile(true, SecurityTypes.TrustedLaunch, new UefiSettings - { - SecureBootEnabled = true, - VTpmEnabled = true, - }), - ServiceArtifactReference = new ServiceArtifactReference(""), - }, - TaskSlotsPerNode = 1234, - TaskSchedulingPolicy = new BatchTaskSchedulingPolicy(BatchNodeFillType.Spread), - ResizeTimeout = XmlConvert.ToTimeSpan("PT1H23M45S"), - ResourceTags = "", - TargetDedicatedNodes = 1234, - TargetLowPriorityNodes = 1234, - EnableAutoScale = true, - AutoScaleFormula = "", - AutoScaleEvaluationInterval = XmlConvert.ToTimeSpan("PT1H23M45S"), - EnableInterNodeCommunication = true, - NetworkConfiguration = new NetworkConfiguration - { - SubnetId = "", - DynamicVNetAssignmentScope = DynamicVNetAssignmentScope.None, - EndpointConfiguration = new BatchPoolEndpointConfiguration(new InboundNatPool[] - { - new InboundNatPool("", InboundEndpointProtocol.Tcp, 1234, 1234, 1234) - { - NetworkSecurityGroupRules = {new NetworkSecurityGroupRule(1234, NetworkSecurityGroupRuleAccess.Allow, "") - { - SourcePortRanges = {""}, - }}, - } - }), - PublicIpAddressConfiguration = new PublicIpAddressConfiguration - { - IpAddressProvisioningType = IpAddressProvisioningType.BatchManaged, - IpAddressIds = { "" }, - }, - EnableAcceleratedNetworking = true, - }, - StartTask = new BatchStartTask("") - { - ContainerSettings = default, - ResourceFiles = { default }, - EnvironmentSettings = { default }, - UserIdentity = default, - MaxTaskRetryCount = 1234, - WaitForSuccess = true, - }, - ApplicationPackageReferences = { default }, - UserAccounts = {new UserAccount("", "") - { - ElevationLevel = ElevationLevel.NonAdmin, - LinuxUserConfiguration = new LinuxUserConfiguration - { - Uid = 1234, - Gid = 1234, - SshPrivateKey = "", - }, - WindowsUserConfiguration = new WindowsUserConfiguration - { - LoginMode = LoginMode.Batch, - }, - }}, - Metadata = { new MetadataItem("", "") }, - MountConfiguration = {new MountConfiguration - { - AzureBlobFileSystemConfiguration = new AzureBlobFileSystemConfiguration("", "", "") - { - AccountKey = "", - SasKey = "", - BlobfuseOptions = "", - IdentityReference = default, - }, - NfsMountConfiguration = new NfsMountConfiguration("", "") - { - MountOptions = "", - }, - CifsMountConfiguration = new CifsMountConfiguration("", "", "", "") - { - MountOptions = "", - }, - AzureFileShareConfiguration = new AzureFileShareConfiguration("", "", "", "") - { - MountOptions = "", - }, - }}, - TargetNodeCommunicationMode = BatchNodeCommunicationMode.Default, - UpgradePolicy = new UpgradePolicy(UpgradeMode.Automatic) - { - AutomaticOsUpgradePolicy = new AutomaticOsUpgradePolicy - { - DisableAutomaticRollback = true, - EnableAutomaticOsUpgrade = true, - UseRollingUpgradePolicy = true, - OsRollingUpgradeDeferral = true, - }, - RollingUpgradePolicy = new RollingUpgradePolicy - { - EnableCrossZoneUpgrade = true, - MaxBatchInstancePercent = 1234, - MaxUnhealthyInstancePercent = 1234, - MaxUnhealthyUpgradedInstancePercent = 1234, - PauseTimeBetweenBatches = XmlConvert.ToTimeSpan("PT1H23M45S"), - PrioritizeUnhealthyInstances = true, - RollbackFailedInstancesOnPolicyBreach = true, - }, - }, - }, - }, -}) -{ - DisplayName = "", - UsesTaskDependencies = true, - Priority = 1234, - AllowTaskPreemption = true, - MaxParallelTasks = 1234, - Constraints = new BatchJobConstraints - { - MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - MaxTaskRetryCount = 1234, - }, - JobManagerTask = new BatchJobManagerTask("", "") - { - DisplayName = "", - ContainerSettings = new BatchTaskContainerSettings("") - { - ContainerRunOptions = "", - Registry = new ContainerRegistryReference - { - Username = "", - Password = "", - RegistryServer = "", - IdentityReference = new BatchNodeIdentityReference - { - ResourceId = "", - }, - }, - WorkingDirectory = ContainerWorkingDirectory.TaskWorkingDirectory, - }, - ResourceFiles = {new ResourceFile - { - AutoStorageContainerName = "", - StorageContainerUrl = "", - HttpUrl = "", - BlobPrefix = "", - FilePath = "", - FileMode = "", - IdentityReference = default, - }}, - OutputFiles = {new OutputFile("", new OutputFileDestination - { - Container = new OutputFileBlobContainerDestination("") - { - Path = "", - IdentityReference = default, - UploadHeaders = {new HttpHeader("") - { - Value = "", - }}, - }, - }, new OutputFileUploadConfig(OutputFileUploadCondition.TaskSuccess))}, - EnvironmentSettings = {new EnvironmentSetting("") - { - Value = "", - }}, - Constraints = new BatchTaskConstraints - { - MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - RetentionTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - MaxTaskRetryCount = 1234, - }, - RequiredSlots = 1234, - KillJobOnCompletion = true, - UserIdentity = new UserIdentity - { - Username = "", - AutoUser = new AutoUserSpecification - { - Scope = AutoUserScope.Task, - ElevationLevel = ElevationLevel.NonAdmin, - }, - }, - RunExclusive = true, - ApplicationPackageReferences = {new BatchApplicationPackageReference("") - { - Version = "", - }}, - AuthenticationTokenSettings = new AuthenticationTokenSettings - { - Access = { AccessScope.Job }, - }, - AllowLowPriorityNode = true, - }, - JobPreparationTask = new BatchJobPreparationTask("") - { - Id = "", - ContainerSettings = default, - ResourceFiles = { default }, - EnvironmentSettings = { default }, - Constraints = default, - WaitForSuccess = true, - UserIdentity = default, - RerunOnNodeRebootAfterSuccess = true, - }, - JobReleaseTask = new BatchJobReleaseTask("") - { - Id = "", - ContainerSettings = default, - ResourceFiles = { default }, - EnvironmentSettings = { default }, - MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - RetentionTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - UserIdentity = default, - }, - CommonEnvironmentSettings = { default }, - OnAllTasksComplete = OnAllBatchTasksComplete.NoAction, - OnTaskFailure = OnBatchTaskFailure.NoAction, - NetworkConfiguration = new BatchJobNetworkConfiguration(""), - Metadata = { default }, -}; -Response response = client.CreateJob(job, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); -]]> - - - -This sample shows how to call CreateJobAsync. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - id = "", - poolInfo = new object(), -}); -Response response = await client.CreateJobAsync(content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call CreateJobAsync with all parameters and request content. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - id = "", - displayName = "", - usesTaskDependencies = true, - priority = 1234, - allowTaskPreemption = true, - maxParallelTasks = 1234, - constraints = new - { - maxWallClockTime = "PT1H23M45S", - maxTaskRetryCount = 1234, - }, - jobManagerTask = new - { - id = "", - displayName = "", - commandLine = "", - containerSettings = new - { - containerRunOptions = "", - imageName = "", - registry = new - { - username = "", - password = "", - registryServer = "", - identityReference = new - { - resourceId = "", - }, - }, - workingDirectory = "taskWorkingDirectory", - }, - resourceFiles = new object[] - { - new - { - autoStorageContainerName = "", - storageContainerUrl = "", - httpUrl = "", - blobPrefix = "", - filePath = "", - fileMode = "", - } - }, - outputFiles = new object[] - { - new - { - filePattern = "", - destination = new - { - container = new - { - path = "", - containerUrl = "", - uploadHeaders = new object[] - { - new - { - name = "", - value = "", - } - }, - }, - }, - uploadOptions = new - { - uploadCondition = "tasksuccess", - }, - } - }, - environmentSettings = new object[] - { - new - { - name = "", - value = "", - } - }, - constraints = new - { - maxWallClockTime = "PT1H23M45S", - retentionTime = "PT1H23M45S", - maxTaskRetryCount = 1234, - }, - requiredSlots = 1234, - killJobOnCompletion = true, - userIdentity = new - { - username = "", - autoUser = new - { - scope = "task", - elevationLevel = "nonadmin", - }, - }, - runExclusive = true, - applicationPackageReferences = new object[] - { - new - { - applicationId = "", - version = "", - } - }, - authenticationTokenSettings = new - { - access = new object[] - { - "job" - }, - }, - allowLowPriorityNode = true, - }, - jobPreparationTask = new - { - id = "", - commandLine = "", - resourceFiles = new object[] - { - null - }, - environmentSettings = new object[] - { - null - }, - waitForSuccess = true, - rerunOnNodeRebootAfterSuccess = true, - }, - jobReleaseTask = new - { - id = "", - commandLine = "", - resourceFiles = new object[] - { - null - }, - environmentSettings = new object[] - { - null - }, - maxWallClockTime = "PT1H23M45S", - retentionTime = "PT1H23M45S", - }, - commonEnvironmentSettings = new object[] - { - null - }, - poolInfo = new - { - poolId = "", - autoPoolSpecification = new - { - autoPoolIdPrefix = "", - poolLifetimeOption = "jobschedule", - keepAlive = true, - pool = new - { - displayName = "", - vmSize = "", - virtualMachineConfiguration = new - { - imageReference = new - { - publisher = "", - offer = "", - sku = "", - version = "", - virtualMachineImageId = "", - }, - nodeAgentSKUId = "", - windowsConfiguration = new - { - enableAutomaticUpdates = true, - }, - dataDisks = new object[] - { - new - { - lun = 1234, - caching = "none", - diskSizeGB = 1234, - storageAccountType = "standard_lrs", - } - }, - licenseType = "", - containerConfiguration = new - { - type = "dockerCompatible", - containerImageNames = new object[] - { - "" - }, - containerRegistries = new object[] - { - null - }, - }, - diskEncryptionConfiguration = new - { - targets = new object[] - { - "osdisk" - }, - }, - nodePlacementConfiguration = new - { - policy = "regional", - }, - extensions = new object[] - { - new - { - name = "", - publisher = "", - type = "", - typeHandlerVersion = "", - autoUpgradeMinorVersion = true, - enableAutomaticUpgrade = true, - settings = new - { - key = "", - }, - protectedSettings = new - { - key = "", - }, - provisionAfterExtensions = new object[] - { - "" - }, - } - }, - osDisk = new - { - ephemeralOSDiskSettings = new - { - placement = "cachedisk", - }, - caching = "none", - diskSizeGB = 1234, - managedDisk = new - { - storageAccountType = "standard_lrs", - }, - writeAcceleratorEnabled = true, - }, - securityProfile = new - { - encryptionAtHost = true, - securityType = "trustedLaunch", - uefiSettings = new - { - secureBootEnabled = true, - vTpmEnabled = true, - }, - }, - serviceArtifactReference = new - { - id = "", - }, - }, - taskSlotsPerNode = 1234, - taskSchedulingPolicy = new - { - nodeFillType = "spread", - }, - resizeTimeout = "PT1H23M45S", - resourceTags = "", - targetDedicatedNodes = 1234, - targetLowPriorityNodes = 1234, - enableAutoScale = true, - autoScaleFormula = "", - autoScaleEvaluationInterval = "PT1H23M45S", - enableInterNodeCommunication = true, - networkConfiguration = new - { - subnetId = "", - dynamicVNetAssignmentScope = "none", - endpointConfiguration = new - { - inboundNATPools = new object[] - { - new - { - name = "", - protocol = "tcp", - backendPort = 1234, - frontendPortRangeStart = 1234, - frontendPortRangeEnd = 1234, - networkSecurityGroupRules = new object[] - { - new - { - priority = 1234, - access = "allow", - sourceAddressPrefix = "", - sourcePortRanges = new object[] - { - "" - }, - } - }, - } - }, - }, - publicIPAddressConfiguration = new - { - provision = "batchmanaged", - ipAddressIds = new object[] - { - "" - }, - }, - enableAcceleratedNetworking = true, - }, - startTask = new - { - commandLine = "", - resourceFiles = new object[] - { - null - }, - environmentSettings = new object[] - { - null - }, - maxTaskRetryCount = 1234, - waitForSuccess = true, - }, - applicationPackageReferences = new object[] - { - null - }, - userAccounts = new object[] - { - new - { - name = "", - password = "", - elevationLevel = "nonadmin", - linuxUserConfiguration = new - { - uid = 1234, - gid = 1234, - sshPrivateKey = "", - }, - windowsUserConfiguration = new - { - loginMode = "batch", - }, - } - }, - metadata = new object[] - { - new - { - name = "", - value = "", - } - }, - mountConfiguration = new object[] - { - new - { - azureBlobFileSystemConfiguration = new - { - accountName = "", - containerName = "", - accountKey = "", - sasKey = "", - blobfuseOptions = "", - relativeMountPath = "", - }, - nfsMountConfiguration = new - { - source = "", - relativeMountPath = "", - mountOptions = "", - }, - cifsMountConfiguration = new - { - username = "", - source = "", - relativeMountPath = "", - mountOptions = "", - password = "", - }, - azureFileShareConfiguration = new - { - accountName = "", - azureFileUrl = "", - accountKey = "", - relativeMountPath = "", - mountOptions = "", - }, - } - }, - targetNodeCommunicationMode = "default", - upgradePolicy = new - { - mode = "automatic", - automaticOSUpgradePolicy = new - { - disableAutomaticRollback = true, - enableAutomaticOSUpgrade = true, - useRollingUpgradePolicy = true, - osRollingUpgradeDeferral = true, - }, - rollingUpgradePolicy = new - { - enableCrossZoneUpgrade = true, - maxBatchInstancePercent = 1234, - maxUnhealthyInstancePercent = 1234, - maxUnhealthyUpgradedInstancePercent = 1234, - pauseTimeBetweenBatches = "PT1H23M45S", - prioritizeUnhealthyInstances = true, - rollbackFailedInstancesOnPolicyBreach = true, - }, - }, - }, - }, - }, - onAllTasksComplete = "noaction", - onTaskFailure = "noaction", - networkConfiguration = new - { - subnetId = "", - }, - metadata = new object[] - { - null - }, -}); -Response response = await client.CreateJobAsync(content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); - -Console.WriteLine(response.Status); -]]> - - - -This sample shows how to call CreateJob. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - id = "", - poolInfo = new object(), -}); -Response response = client.CreateJob(content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call CreateJob with all parameters and request content. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - id = "", - displayName = "", - usesTaskDependencies = true, - priority = 1234, - allowTaskPreemption = true, - maxParallelTasks = 1234, - constraints = new - { - maxWallClockTime = "PT1H23M45S", - maxTaskRetryCount = 1234, - }, - jobManagerTask = new - { - id = "", - displayName = "", - commandLine = "", - containerSettings = new - { - containerRunOptions = "", - imageName = "", - registry = new - { - username = "", - password = "", - registryServer = "", - identityReference = new - { - resourceId = "", - }, - }, - workingDirectory = "taskWorkingDirectory", - }, - resourceFiles = new object[] - { - new - { - autoStorageContainerName = "", - storageContainerUrl = "", - httpUrl = "", - blobPrefix = "", - filePath = "", - fileMode = "", - } - }, - outputFiles = new object[] - { - new - { - filePattern = "", - destination = new - { - container = new - { - path = "", - containerUrl = "", - uploadHeaders = new object[] - { - new - { - name = "", - value = "", - } - }, - }, - }, - uploadOptions = new - { - uploadCondition = "tasksuccess", - }, - } - }, - environmentSettings = new object[] - { - new - { - name = "", - value = "", - } - }, - constraints = new - { - maxWallClockTime = "PT1H23M45S", - retentionTime = "PT1H23M45S", - maxTaskRetryCount = 1234, - }, - requiredSlots = 1234, - killJobOnCompletion = true, - userIdentity = new - { - username = "", - autoUser = new - { - scope = "task", - elevationLevel = "nonadmin", - }, - }, - runExclusive = true, - applicationPackageReferences = new object[] - { - new - { - applicationId = "", - version = "", - } - }, - authenticationTokenSettings = new - { - access = new object[] - { - "job" - }, - }, - allowLowPriorityNode = true, - }, - jobPreparationTask = new - { - id = "", - commandLine = "", - resourceFiles = new object[] - { - null - }, - environmentSettings = new object[] - { - null - }, - waitForSuccess = true, - rerunOnNodeRebootAfterSuccess = true, - }, - jobReleaseTask = new - { - id = "", - commandLine = "", - resourceFiles = new object[] - { - null - }, - environmentSettings = new object[] - { - null - }, - maxWallClockTime = "PT1H23M45S", - retentionTime = "PT1H23M45S", - }, - commonEnvironmentSettings = new object[] - { - null - }, - poolInfo = new - { - poolId = "", - autoPoolSpecification = new - { - autoPoolIdPrefix = "", - poolLifetimeOption = "jobschedule", - keepAlive = true, - pool = new - { - displayName = "", - vmSize = "", - virtualMachineConfiguration = new - { - imageReference = new - { - publisher = "", - offer = "", - sku = "", - version = "", - virtualMachineImageId = "", - }, - nodeAgentSKUId = "", - windowsConfiguration = new - { - enableAutomaticUpdates = true, - }, - dataDisks = new object[] - { - new - { - lun = 1234, - caching = "none", - diskSizeGB = 1234, - storageAccountType = "standard_lrs", - } - }, - licenseType = "", - containerConfiguration = new - { - type = "dockerCompatible", - containerImageNames = new object[] - { - "" - }, - containerRegistries = new object[] - { - null - }, - }, - diskEncryptionConfiguration = new - { - targets = new object[] - { - "osdisk" - }, - }, - nodePlacementConfiguration = new - { - policy = "regional", - }, - extensions = new object[] - { - new - { - name = "", - publisher = "", - type = "", - typeHandlerVersion = "", - autoUpgradeMinorVersion = true, - enableAutomaticUpgrade = true, - settings = new - { - key = "", - }, - protectedSettings = new - { - key = "", - }, - provisionAfterExtensions = new object[] - { - "" - }, - } - }, - osDisk = new - { - ephemeralOSDiskSettings = new - { - placement = "cachedisk", - }, - caching = "none", - diskSizeGB = 1234, - managedDisk = new - { - storageAccountType = "standard_lrs", - }, - writeAcceleratorEnabled = true, - }, - securityProfile = new - { - encryptionAtHost = true, - securityType = "trustedLaunch", - uefiSettings = new - { - secureBootEnabled = true, - vTpmEnabled = true, - }, - }, - serviceArtifactReference = new - { - id = "", - }, - }, - taskSlotsPerNode = 1234, - taskSchedulingPolicy = new - { - nodeFillType = "spread", - }, - resizeTimeout = "PT1H23M45S", - resourceTags = "", - targetDedicatedNodes = 1234, - targetLowPriorityNodes = 1234, - enableAutoScale = true, - autoScaleFormula = "", - autoScaleEvaluationInterval = "PT1H23M45S", - enableInterNodeCommunication = true, - networkConfiguration = new - { - subnetId = "", - dynamicVNetAssignmentScope = "none", - endpointConfiguration = new - { - inboundNATPools = new object[] - { - new - { - name = "", - protocol = "tcp", - backendPort = 1234, - frontendPortRangeStart = 1234, - frontendPortRangeEnd = 1234, - networkSecurityGroupRules = new object[] - { - new - { - priority = 1234, - access = "allow", - sourceAddressPrefix = "", - sourcePortRanges = new object[] - { - "" - }, - } - }, - } - }, - }, - publicIPAddressConfiguration = new - { - provision = "batchmanaged", - ipAddressIds = new object[] - { - "" - }, - }, - enableAcceleratedNetworking = true, - }, - startTask = new - { - commandLine = "", - resourceFiles = new object[] - { - null - }, - environmentSettings = new object[] - { - null - }, - maxTaskRetryCount = 1234, - waitForSuccess = true, - }, - applicationPackageReferences = new object[] - { - null - }, - userAccounts = new object[] - { - new - { - name = "", - password = "", - elevationLevel = "nonadmin", - linuxUserConfiguration = new - { - uid = 1234, - gid = 1234, - sshPrivateKey = "", - }, - windowsUserConfiguration = new - { - loginMode = "batch", - }, - } - }, - metadata = new object[] - { - new - { - name = "", - value = "", - } - }, - mountConfiguration = new object[] - { - new - { - azureBlobFileSystemConfiguration = new - { - accountName = "", - containerName = "", - accountKey = "", - sasKey = "", - blobfuseOptions = "", - relativeMountPath = "", - }, - nfsMountConfiguration = new - { - source = "", - relativeMountPath = "", - mountOptions = "", - }, - cifsMountConfiguration = new - { - username = "", - source = "", - relativeMountPath = "", - mountOptions = "", - password = "", - }, - azureFileShareConfiguration = new - { - accountName = "", - azureFileUrl = "", - accountKey = "", - relativeMountPath = "", - mountOptions = "", - }, - } - }, - targetNodeCommunicationMode = "default", - upgradePolicy = new - { - mode = "automatic", - automaticOSUpgradePolicy = new - { - disableAutomaticRollback = true, - enableAutomaticOSUpgrade = true, - useRollingUpgradePolicy = true, - osRollingUpgradeDeferral = true, - }, - rollingUpgradePolicy = new - { - enableCrossZoneUpgrade = true, - maxBatchInstancePercent = 1234, - maxUnhealthyInstancePercent = 1234, - maxUnhealthyUpgradedInstancePercent = 1234, - pauseTimeBetweenBatches = "PT1H23M45S", - prioritizeUnhealthyInstances = true, - rollbackFailedInstancesOnPolicyBreach = true, - }, - }, - }, - }, - }, - onAllTasksComplete = "noaction", - onTaskFailure = "noaction", - networkConfiguration = new - { - subnetId = "", - }, - metadata = new object[] - { - null - }, -}); -Response response = client.CreateJob(content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); - -Console.WriteLine(response.Status); -]]> - - - -This sample shows how to call GetJobTaskCountsAsync. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -Response response = await client.GetJobTaskCountsAsync(""); -]]> -This sample shows how to call GetJobTaskCountsAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -Response response = await client.GetJobTaskCountsAsync("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); -]]> - - - -This sample shows how to call GetJobTaskCounts. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -Response response = client.GetJobTaskCounts(""); -]]> -This sample shows how to call GetJobTaskCounts with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -Response response = client.GetJobTaskCounts("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); -]]> - - - -This sample shows how to call GetJobTaskCountsAsync and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -Response response = await client.GetJobTaskCountsAsync("", null, null, null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("taskCounts").GetProperty("active").ToString()); -Console.WriteLine(result.GetProperty("taskCounts").GetProperty("running").ToString()); -Console.WriteLine(result.GetProperty("taskCounts").GetProperty("completed").ToString()); -Console.WriteLine(result.GetProperty("taskCounts").GetProperty("succeeded").ToString()); -Console.WriteLine(result.GetProperty("taskCounts").GetProperty("failed").ToString()); -Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("active").ToString()); -Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("running").ToString()); -Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("completed").ToString()); -Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("succeeded").ToString()); -Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("failed").ToString()); -]]> -This sample shows how to call GetJobTaskCountsAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -Response response = await client.GetJobTaskCountsAsync("", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("taskCounts").GetProperty("active").ToString()); -Console.WriteLine(result.GetProperty("taskCounts").GetProperty("running").ToString()); -Console.WriteLine(result.GetProperty("taskCounts").GetProperty("completed").ToString()); -Console.WriteLine(result.GetProperty("taskCounts").GetProperty("succeeded").ToString()); -Console.WriteLine(result.GetProperty("taskCounts").GetProperty("failed").ToString()); -Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("active").ToString()); -Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("running").ToString()); -Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("completed").ToString()); -Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("succeeded").ToString()); -Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("failed").ToString()); -]]> - - - -This sample shows how to call GetJobTaskCounts and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -Response response = client.GetJobTaskCounts("", null, null, null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("taskCounts").GetProperty("active").ToString()); -Console.WriteLine(result.GetProperty("taskCounts").GetProperty("running").ToString()); -Console.WriteLine(result.GetProperty("taskCounts").GetProperty("completed").ToString()); -Console.WriteLine(result.GetProperty("taskCounts").GetProperty("succeeded").ToString()); -Console.WriteLine(result.GetProperty("taskCounts").GetProperty("failed").ToString()); -Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("active").ToString()); -Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("running").ToString()); -Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("completed").ToString()); -Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("succeeded").ToString()); -Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("failed").ToString()); -]]> -This sample shows how to call GetJobTaskCounts with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -Response response = client.GetJobTaskCounts("", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("taskCounts").GetProperty("active").ToString()); -Console.WriteLine(result.GetProperty("taskCounts").GetProperty("running").ToString()); -Console.WriteLine(result.GetProperty("taskCounts").GetProperty("completed").ToString()); -Console.WriteLine(result.GetProperty("taskCounts").GetProperty("succeeded").ToString()); -Console.WriteLine(result.GetProperty("taskCounts").GetProperty("failed").ToString()); -Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("active").ToString()); -Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("running").ToString()); -Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("completed").ToString()); -Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("succeeded").ToString()); -Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("failed").ToString()); -]]> - - - -This sample shows how to call DeleteJobScheduleAsync. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -Response response = await client.DeleteJobScheduleAsync(""); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call DeleteJobScheduleAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -Response response = await client.DeleteJobScheduleAsync("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); - -Console.WriteLine(response.Status); -]]> - - - -This sample shows how to call DeleteJobSchedule. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -Response response = client.DeleteJobSchedule(""); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call DeleteJobSchedule with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -Response response = client.DeleteJobSchedule("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); - -Console.WriteLine(response.Status); -]]> - - - -This sample shows how to call GetJobScheduleAsync. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -Response response = await client.GetJobScheduleAsync(""); -]]> -This sample shows how to call GetJobScheduleAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -Response response = await client.GetJobScheduleAsync("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), select: new string[] { "" }, expand: new string[] { "" }, requestConditions: null); -]]> - - - -This sample shows how to call GetJobScheduleAsync and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -Response response = await client.GetJobScheduleAsync("", null, null, null, null, null, null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").ToString()); -]]> -This sample shows how to call GetJobScheduleAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -Response response = await client.GetJobScheduleAsync("", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), new string[] { "" }, new string[] { "" }, null, null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("url").ToString()); -Console.WriteLine(result.GetProperty("eTag").ToString()); -Console.WriteLine(result.GetProperty("lastModified").ToString()); -Console.WriteLine(result.GetProperty("creationTime").ToString()); -Console.WriteLine(result.GetProperty("state").ToString()); -Console.WriteLine(result.GetProperty("stateTransitionTime").ToString()); -Console.WriteLine(result.GetProperty("previousState").ToString()); -Console.WriteLine(result.GetProperty("previousStateTransitionTime").ToString()); -Console.WriteLine(result.GetProperty("schedule").GetProperty("doNotRunUntil").ToString()); -Console.WriteLine(result.GetProperty("schedule").GetProperty("doNotRunAfter").ToString()); -Console.WriteLine(result.GetProperty("schedule").GetProperty("startWindow").ToString()); -Console.WriteLine(result.GetProperty("schedule").GetProperty("recurrenceInterval").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("priority").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("allowTaskPreemption").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("maxParallelTasks").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("usesTaskDependencies").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("onAllTasksComplete").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("onTaskFailure").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("networkConfiguration").GetProperty("subnetId").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("constraints").GetProperty("maxWallClockTime").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("constraints").GetProperty("maxTaskRetryCount").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("commandLine").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("filePattern").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("path").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("containerUrl").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("identityReference").GetProperty("resourceId").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("uploadHeaders")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("uploadHeaders")[0].GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("uploadOptions").GetProperty("uploadCondition").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("constraints").GetProperty("maxWallClockTime").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("constraints").GetProperty("retentionTime").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("constraints").GetProperty("maxTaskRetryCount").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("requiredSlots").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("killJobOnCompletion").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("userIdentity").GetProperty("username").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("runExclusive").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("applicationPackageReferences")[0].GetProperty("applicationId").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("applicationPackageReferences")[0].GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("authenticationTokenSettings").GetProperty("access")[0].ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("allowLowPriorityNode").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("commandLine").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("constraints").GetProperty("maxWallClockTime").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("constraints").GetProperty("retentionTime").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("constraints").GetProperty("maxTaskRetryCount").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("waitForSuccess").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("userIdentity").GetProperty("username").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("rerunOnNodeRebootAfterSuccess").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("commandLine").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("maxWallClockTime").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("retentionTime").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("userIdentity").GetProperty("username").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("commonEnvironmentSettings")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("commonEnvironmentSettings")[0].GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("poolId").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("autoPoolIdPrefix").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("poolLifetimeOption").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("keepAlive").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("vmSize").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("publisher").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("offer").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("sku").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("virtualMachineImageId").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("exactVersion").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("nodeAgentSKUId").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("windowsConfiguration").GetProperty("enableAutomaticUpdates").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("lun").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("caching").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("diskSizeGB").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("storageAccountType").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("licenseType").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerImageNames")[0].ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("username").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("password").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("registryServer").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("diskEncryptionConfiguration").GetProperty("targets")[0].ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("nodePlacementConfiguration").GetProperty("policy").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("publisher").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("typeHandlerVersion").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("autoUpgradeMinorVersion").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("enableAutomaticUpgrade").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("settings").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("protectedSettings").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("provisionAfterExtensions")[0].ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("ephemeralOSDiskSettings").GetProperty("placement").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("caching").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("managedDisk").GetProperty("storageAccountType").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("writeAcceleratorEnabled").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("encryptionAtHost").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("securityType").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("uefiSettings").GetProperty("secureBootEnabled").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("uefiSettings").GetProperty("vTpmEnabled").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("serviceArtifactReference").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("taskSlotsPerNode").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("taskSchedulingPolicy").GetProperty("nodeFillType").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("resizeTimeout").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("resourceTags").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("targetDedicatedNodes").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("targetLowPriorityNodes").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("enableAutoScale").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("autoScaleFormula").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("autoScaleEvaluationInterval").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("enableInterNodeCommunication").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("subnetId").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("dynamicVNetAssignmentScope").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("protocol").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("backendPort").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("frontendPortRangeStart").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("frontendPortRangeEnd").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("priority").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("access").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("sourceAddressPrefix").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("sourcePortRanges")[0].ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("publicIPAddressConfiguration").GetProperty("provision").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("publicIPAddressConfiguration").GetProperty("ipAddressIds")[0].ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("enableAcceleratedNetworking").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("commandLine").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("userIdentity").GetProperty("username").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("maxTaskRetryCount").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("waitForSuccess").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("applicationPackageReferences")[0].GetProperty("applicationId").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("applicationPackageReferences")[0].GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("password").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("elevationLevel").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("uid").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("gid").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("sshPrivateKey").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("windowsUserConfiguration").GetProperty("loginMode").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("metadata")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("metadata")[0].GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("accountName").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("containerName").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("accountKey").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("sasKey").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("blobfuseOptions").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("relativeMountPath").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("identityReference").GetProperty("resourceId").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("relativeMountPath").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("mountOptions").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("username").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("relativeMountPath").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("mountOptions").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("password").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("accountName").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("azureFileUrl").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("accountKey").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("relativeMountPath").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("mountOptions").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("targetNodeCommunicationMode").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("mode").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("disableAutomaticRollback").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("enableAutomaticOSUpgrade").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("useRollingUpgradePolicy").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("osRollingUpgradeDeferral").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("enableCrossZoneUpgrade").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxBatchInstancePercent").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxUnhealthyInstancePercent").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxUnhealthyUpgradedInstancePercent").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("pauseTimeBetweenBatches").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("prioritizeUnhealthyInstances").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("rollbackFailedInstancesOnPolicyBreach").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("metadata")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("metadata")[0].GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("executionInfo").GetProperty("nextRunTime").ToString()); -Console.WriteLine(result.GetProperty("executionInfo").GetProperty("recentJob").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("executionInfo").GetProperty("recentJob").GetProperty("url").ToString()); -Console.WriteLine(result.GetProperty("executionInfo").GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("metadata")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("metadata")[0].GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("stats").GetProperty("url").ToString()); -Console.WriteLine(result.GetProperty("stats").GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("stats").GetProperty("lastUpdateTime").ToString()); -Console.WriteLine(result.GetProperty("stats").GetProperty("userCPUTime").ToString()); -Console.WriteLine(result.GetProperty("stats").GetProperty("kernelCPUTime").ToString()); -Console.WriteLine(result.GetProperty("stats").GetProperty("wallClockTime").ToString()); -Console.WriteLine(result.GetProperty("stats").GetProperty("readIOps").ToString()); -Console.WriteLine(result.GetProperty("stats").GetProperty("writeIOps").ToString()); -Console.WriteLine(result.GetProperty("stats").GetProperty("readIOGiB").ToString()); -Console.WriteLine(result.GetProperty("stats").GetProperty("writeIOGiB").ToString()); -Console.WriteLine(result.GetProperty("stats").GetProperty("numSucceededTasks").ToString()); -Console.WriteLine(result.GetProperty("stats").GetProperty("numFailedTasks").ToString()); -Console.WriteLine(result.GetProperty("stats").GetProperty("numTaskRetries").ToString()); -Console.WriteLine(result.GetProperty("stats").GetProperty("waitTime").ToString()); -]]> - - - -This sample shows how to call UpdateJobScheduleAsync. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new object()); -Response response = await client.UpdateJobScheduleAsync("", content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call UpdateJobScheduleAsync with all parameters and request content. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - schedule = new - { - doNotRunUntil = "2022-05-10T18:57:31.2311892Z", - doNotRunAfter = "2022-05-10T18:57:31.2311892Z", - startWindow = "PT1H23M45S", - recurrenceInterval = "PT1H23M45S", - }, - jobSpecification = new - { - priority = 1234, - allowTaskPreemption = true, - maxParallelTasks = 1234, - displayName = "", - usesTaskDependencies = true, - onAllTasksComplete = "noaction", - onTaskFailure = "noaction", - networkConfiguration = new - { - subnetId = "", - }, - constraints = new - { - maxWallClockTime = "PT1H23M45S", - maxTaskRetryCount = 1234, - }, - jobManagerTask = new - { - id = "", - displayName = "", - commandLine = "", - containerSettings = new - { - containerRunOptions = "", - imageName = "", - registry = new - { - username = "", - password = "", - registryServer = "", - identityReference = new - { - resourceId = "", - }, - }, - workingDirectory = "taskWorkingDirectory", - }, - resourceFiles = new object[] - { - new - { - autoStorageContainerName = "", - storageContainerUrl = "", - httpUrl = "", - blobPrefix = "", - filePath = "", - fileMode = "", - } - }, - outputFiles = new object[] - { - new - { - filePattern = "", - destination = new - { - container = new - { - path = "", - containerUrl = "", - uploadHeaders = new object[] - { - new - { - name = "", - value = "", - } - }, - }, - }, - uploadOptions = new - { - uploadCondition = "tasksuccess", - }, - } - }, - environmentSettings = new object[] - { - new - { - name = "", - value = "", - } - }, - constraints = new - { - maxWallClockTime = "PT1H23M45S", - retentionTime = "PT1H23M45S", - maxTaskRetryCount = 1234, - }, - requiredSlots = 1234, - killJobOnCompletion = true, - userIdentity = new - { - username = "", - autoUser = new - { - scope = "task", - elevationLevel = "nonadmin", - }, - }, - runExclusive = true, - applicationPackageReferences = new object[] - { - new - { - applicationId = "", - version = "", - } - }, - authenticationTokenSettings = new - { - access = new object[] - { - "job" - }, - }, - allowLowPriorityNode = true, - }, - jobPreparationTask = new - { - id = "", - commandLine = "", - resourceFiles = new object[] - { - null - }, - environmentSettings = new object[] - { - null - }, - waitForSuccess = true, - rerunOnNodeRebootAfterSuccess = true, - }, - jobReleaseTask = new - { - id = "", - commandLine = "", - resourceFiles = new object[] - { - null - }, - environmentSettings = new object[] - { - null - }, - maxWallClockTime = "PT1H23M45S", - retentionTime = "PT1H23M45S", - }, - commonEnvironmentSettings = new object[] - { - null - }, - poolInfo = new - { - poolId = "", - autoPoolSpecification = new - { - autoPoolIdPrefix = "", - poolLifetimeOption = "jobschedule", - keepAlive = true, - pool = new - { - displayName = "", - vmSize = "", - virtualMachineConfiguration = new - { - imageReference = new - { - publisher = "", - offer = "", - sku = "", - version = "", - virtualMachineImageId = "", - }, - nodeAgentSKUId = "", - windowsConfiguration = new - { - enableAutomaticUpdates = true, - }, - dataDisks = new object[] - { - new - { - lun = 1234, - caching = "none", - diskSizeGB = 1234, - storageAccountType = "standard_lrs", - } - }, - licenseType = "", - containerConfiguration = new - { - type = "dockerCompatible", - containerImageNames = new object[] - { - "" - }, - containerRegistries = new object[] - { - null - }, - }, - diskEncryptionConfiguration = new - { - targets = new object[] - { - "osdisk" - }, - }, - nodePlacementConfiguration = new - { - policy = "regional", - }, - extensions = new object[] - { - new - { - name = "", - publisher = "", - type = "", - typeHandlerVersion = "", - autoUpgradeMinorVersion = true, - enableAutomaticUpgrade = true, - settings = new - { - key = "", - }, - protectedSettings = new - { - key = "", - }, - provisionAfterExtensions = new object[] - { - "" - }, - } - }, - osDisk = new - { - ephemeralOSDiskSettings = new - { - placement = "cachedisk", - }, - caching = "none", - diskSizeGB = 1234, - managedDisk = new - { - storageAccountType = "standard_lrs", - }, - writeAcceleratorEnabled = true, - }, - securityProfile = new - { - encryptionAtHost = true, - securityType = "trustedLaunch", - uefiSettings = new - { - secureBootEnabled = true, - vTpmEnabled = true, - }, - }, - serviceArtifactReference = new - { - id = "", - }, - }, - taskSlotsPerNode = 1234, - taskSchedulingPolicy = new - { - nodeFillType = "spread", - }, - resizeTimeout = "PT1H23M45S", - resourceTags = "", - targetDedicatedNodes = 1234, - targetLowPriorityNodes = 1234, - enableAutoScale = true, - autoScaleFormula = "", - autoScaleEvaluationInterval = "PT1H23M45S", - enableInterNodeCommunication = true, - networkConfiguration = new - { - subnetId = "", - dynamicVNetAssignmentScope = "none", - endpointConfiguration = new - { - inboundNATPools = new object[] - { - new - { - name = "", - protocol = "tcp", - backendPort = 1234, - frontendPortRangeStart = 1234, - frontendPortRangeEnd = 1234, - networkSecurityGroupRules = new object[] - { - new - { - priority = 1234, - access = "allow", - sourceAddressPrefix = "", - sourcePortRanges = new object[] - { - "" - }, - } - }, - } - }, - }, - publicIPAddressConfiguration = new - { - provision = "batchmanaged", - ipAddressIds = new object[] - { - "" - }, - }, - enableAcceleratedNetworking = true, - }, - startTask = new - { - commandLine = "", - resourceFiles = new object[] - { - null - }, - environmentSettings = new object[] - { - null - }, - maxTaskRetryCount = 1234, - waitForSuccess = true, - }, - applicationPackageReferences = new object[] - { - null - }, - userAccounts = new object[] - { - new - { - name = "", - password = "", - elevationLevel = "nonadmin", - linuxUserConfiguration = new - { - uid = 1234, - gid = 1234, - sshPrivateKey = "", - }, - windowsUserConfiguration = new - { - loginMode = "batch", - }, - } - }, - metadata = new object[] - { - new - { - name = "", - value = "", - } - }, - mountConfiguration = new object[] - { - new - { - azureBlobFileSystemConfiguration = new - { - accountName = "", - containerName = "", - accountKey = "", - sasKey = "", - blobfuseOptions = "", - relativeMountPath = "", - }, - nfsMountConfiguration = new - { - source = "", - relativeMountPath = "", - mountOptions = "", - }, - cifsMountConfiguration = new - { - username = "", - source = "", - relativeMountPath = "", - mountOptions = "", - password = "", - }, - azureFileShareConfiguration = new - { - accountName = "", - azureFileUrl = "", - accountKey = "", - relativeMountPath = "", - mountOptions = "", - }, - } - }, - targetNodeCommunicationMode = "default", - upgradePolicy = new - { - mode = "automatic", - automaticOSUpgradePolicy = new - { - disableAutomaticRollback = true, - enableAutomaticOSUpgrade = true, - useRollingUpgradePolicy = true, - osRollingUpgradeDeferral = true, - }, - rollingUpgradePolicy = new - { - enableCrossZoneUpgrade = true, - maxBatchInstancePercent = 1234, - maxUnhealthyInstancePercent = 1234, - maxUnhealthyUpgradedInstancePercent = 1234, - pauseTimeBetweenBatches = "PT1H23M45S", - prioritizeUnhealthyInstances = true, - rollbackFailedInstancesOnPolicyBreach = true, - }, - }, - }, - }, - }, - metadata = new object[] - { - null - }, - }, - metadata = new object[] - { - null - }, -}); -Response response = await client.UpdateJobScheduleAsync("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); - -Console.WriteLine(response.Status); -]]> - - - -This sample shows how to call UpdateJobSchedule. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new object()); -Response response = client.UpdateJobSchedule("", content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call UpdateJobSchedule with all parameters and request content. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - schedule = new - { - doNotRunUntil = "2022-05-10T18:57:31.2311892Z", - doNotRunAfter = "2022-05-10T18:57:31.2311892Z", - startWindow = "PT1H23M45S", - recurrenceInterval = "PT1H23M45S", - }, - jobSpecification = new - { - priority = 1234, - allowTaskPreemption = true, - maxParallelTasks = 1234, - displayName = "", - usesTaskDependencies = true, - onAllTasksComplete = "noaction", - onTaskFailure = "noaction", - networkConfiguration = new - { - subnetId = "", - }, - constraints = new - { - maxWallClockTime = "PT1H23M45S", - maxTaskRetryCount = 1234, - }, - jobManagerTask = new - { - id = "", - displayName = "", - commandLine = "", - containerSettings = new - { - containerRunOptions = "", - imageName = "", - registry = new - { - username = "", - password = "", - registryServer = "", - identityReference = new - { - resourceId = "", - }, - }, - workingDirectory = "taskWorkingDirectory", - }, - resourceFiles = new object[] - { - new - { - autoStorageContainerName = "", - storageContainerUrl = "", - httpUrl = "", - blobPrefix = "", - filePath = "", - fileMode = "", - } - }, - outputFiles = new object[] - { - new - { - filePattern = "", - destination = new - { - container = new - { - path = "", - containerUrl = "", - uploadHeaders = new object[] - { - new - { - name = "", - value = "", - } - }, - }, - }, - uploadOptions = new - { - uploadCondition = "tasksuccess", - }, - } - }, - environmentSettings = new object[] - { - new - { - name = "", - value = "", - } - }, - constraints = new - { - maxWallClockTime = "PT1H23M45S", - retentionTime = "PT1H23M45S", - maxTaskRetryCount = 1234, - }, - requiredSlots = 1234, - killJobOnCompletion = true, - userIdentity = new - { - username = "", - autoUser = new - { - scope = "task", - elevationLevel = "nonadmin", - }, - }, - runExclusive = true, - applicationPackageReferences = new object[] - { - new - { - applicationId = "", - version = "", - } - }, - authenticationTokenSettings = new - { - access = new object[] - { - "job" - }, - }, - allowLowPriorityNode = true, - }, - jobPreparationTask = new - { - id = "", - commandLine = "", - resourceFiles = new object[] - { - null - }, - environmentSettings = new object[] - { - null - }, - waitForSuccess = true, - rerunOnNodeRebootAfterSuccess = true, - }, - jobReleaseTask = new - { - id = "", - commandLine = "", - resourceFiles = new object[] - { - null - }, - environmentSettings = new object[] - { - null - }, - maxWallClockTime = "PT1H23M45S", - retentionTime = "PT1H23M45S", - }, - commonEnvironmentSettings = new object[] - { - null - }, - poolInfo = new - { - poolId = "", - autoPoolSpecification = new - { - autoPoolIdPrefix = "", - poolLifetimeOption = "jobschedule", - keepAlive = true, - pool = new - { - displayName = "", - vmSize = "", - virtualMachineConfiguration = new - { - imageReference = new - { - publisher = "", - offer = "", - sku = "", - version = "", - virtualMachineImageId = "", - }, - nodeAgentSKUId = "", - windowsConfiguration = new - { - enableAutomaticUpdates = true, - }, - dataDisks = new object[] - { - new - { - lun = 1234, - caching = "none", - diskSizeGB = 1234, - storageAccountType = "standard_lrs", - } - }, - licenseType = "", - containerConfiguration = new - { - type = "dockerCompatible", - containerImageNames = new object[] - { - "" - }, - containerRegistries = new object[] - { - null - }, - }, - diskEncryptionConfiguration = new - { - targets = new object[] - { - "osdisk" - }, - }, - nodePlacementConfiguration = new - { - policy = "regional", - }, - extensions = new object[] - { - new - { - name = "", - publisher = "", - type = "", - typeHandlerVersion = "", - autoUpgradeMinorVersion = true, - enableAutomaticUpgrade = true, - settings = new - { - key = "", - }, - protectedSettings = new - { - key = "", - }, - provisionAfterExtensions = new object[] - { - "" - }, - } - }, - osDisk = new - { - ephemeralOSDiskSettings = new - { - placement = "cachedisk", - }, - caching = "none", - diskSizeGB = 1234, - managedDisk = new - { - storageAccountType = "standard_lrs", - }, - writeAcceleratorEnabled = true, - }, - securityProfile = new - { - encryptionAtHost = true, - securityType = "trustedLaunch", - uefiSettings = new - { - secureBootEnabled = true, - vTpmEnabled = true, - }, - }, - serviceArtifactReference = new - { - id = "", - }, - }, - taskSlotsPerNode = 1234, - taskSchedulingPolicy = new - { - nodeFillType = "spread", - }, - resizeTimeout = "PT1H23M45S", - resourceTags = "", - targetDedicatedNodes = 1234, - targetLowPriorityNodes = 1234, - enableAutoScale = true, - autoScaleFormula = "", - autoScaleEvaluationInterval = "PT1H23M45S", - enableInterNodeCommunication = true, - networkConfiguration = new - { - subnetId = "", - dynamicVNetAssignmentScope = "none", - endpointConfiguration = new - { - inboundNATPools = new object[] - { - new - { - name = "", - protocol = "tcp", - backendPort = 1234, - frontendPortRangeStart = 1234, - frontendPortRangeEnd = 1234, - networkSecurityGroupRules = new object[] - { - new - { - priority = 1234, - access = "allow", - sourceAddressPrefix = "", - sourcePortRanges = new object[] - { - "" - }, - } - }, - } - }, - }, - publicIPAddressConfiguration = new - { - provision = "batchmanaged", - ipAddressIds = new object[] - { - "" - }, - }, - enableAcceleratedNetworking = true, - }, - startTask = new - { - commandLine = "", - resourceFiles = new object[] - { - null - }, - environmentSettings = new object[] - { - null - }, - maxTaskRetryCount = 1234, - waitForSuccess = true, - }, - applicationPackageReferences = new object[] - { - null - }, - userAccounts = new object[] - { - new - { - name = "", - password = "", - elevationLevel = "nonadmin", - linuxUserConfiguration = new - { - uid = 1234, - gid = 1234, - sshPrivateKey = "", - }, - windowsUserConfiguration = new - { - loginMode = "batch", - }, - } - }, - metadata = new object[] - { - new - { - name = "", - value = "", - } - }, - mountConfiguration = new object[] - { - new - { - azureBlobFileSystemConfiguration = new - { - accountName = "", - containerName = "", - accountKey = "", - sasKey = "", - blobfuseOptions = "", - relativeMountPath = "", - }, - nfsMountConfiguration = new - { - source = "", - relativeMountPath = "", - mountOptions = "", - }, - cifsMountConfiguration = new - { - username = "", - source = "", - relativeMountPath = "", - mountOptions = "", - password = "", - }, - azureFileShareConfiguration = new - { - accountName = "", - azureFileUrl = "", - accountKey = "", - relativeMountPath = "", - mountOptions = "", - }, - } - }, - targetNodeCommunicationMode = "default", - upgradePolicy = new - { - mode = "automatic", - automaticOSUpgradePolicy = new - { - disableAutomaticRollback = true, - enableAutomaticOSUpgrade = true, - useRollingUpgradePolicy = true, - osRollingUpgradeDeferral = true, - }, - rollingUpgradePolicy = new - { - enableCrossZoneUpgrade = true, - maxBatchInstancePercent = 1234, - maxUnhealthyInstancePercent = 1234, - maxUnhealthyUpgradedInstancePercent = 1234, - pauseTimeBetweenBatches = "PT1H23M45S", - prioritizeUnhealthyInstances = true, - rollbackFailedInstancesOnPolicyBreach = true, - }, - }, - }, - }, - }, - metadata = new object[] - { - null - }, - }, - metadata = new object[] - { - null - }, -}); -Response response = client.UpdateJobSchedule("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); - -Console.WriteLine(response.Status); -]]> - - - -This sample shows how to call ReplaceJobScheduleAsync. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -BatchJobSchedule jobSchedule = new BatchJobSchedule(new BatchJobSpecification(new BatchPoolInfo())); -Response response = await client.ReplaceJobScheduleAsync("", jobSchedule); -]]> -This sample shows how to call ReplaceJobScheduleAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -BatchJobSchedule jobSchedule = new BatchJobSchedule(new BatchJobSpecification(new BatchPoolInfo -{ - PoolId = "", - AutoPoolSpecification = new BatchAutoPoolSpecification(BatchPoolLifetimeOption.JobSchedule) - { - AutoPoolIdPrefix = "", - KeepAlive = true, - Pool = new BatchPoolSpecification("") - { - DisplayName = "", - VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference - { - Publisher = "", - Offer = "", - Sku = "", - Version = "", - VirtualMachineImageId = "", - }, "") - { - WindowsConfiguration = new WindowsConfiguration - { - EnableAutomaticUpdates = true, - }, - DataDisks = {new DataDisk(1234, 1234) - { - Caching = CachingType.None, - StorageAccountType = StorageAccountType.StandardLRS, - }}, - LicenseType = "", - ContainerConfiguration = new ContainerConfiguration(ContainerType.DockerCompatible) - { - ContainerImageNames = { "" }, - ContainerRegistries = { default }, - }, - DiskEncryptionConfiguration = new DiskEncryptionConfiguration - { - Targets = { DiskEncryptionTarget.OsDisk }, - }, - NodePlacementConfiguration = new BatchNodePlacementConfiguration - { - Policy = BatchNodePlacementPolicyType.Regional, - }, - Extensions = {new VMExtension("", "", "") - { - TypeHandlerVersion = "", - AutoUpgradeMinorVersion = true, - EnableAutomaticUpgrade = true, - Settings = - { - ["key"] = "" - }, - ProtectedSettings = - { - ["key"] = "" - }, - ProvisionAfterExtensions = {""}, - }}, - OsDisk = new OSDisk - { - EphemeralOSDiskSettings = new DiffDiskSettings - { - Placement = DiffDiskPlacement.CacheDisk, - }, - Caching = CachingType.None, - DiskSizeGB = 1234, - ManagedDisk = new ManagedDisk(StorageAccountType.StandardLRS), - WriteAcceleratorEnabled = true, - }, - SecurityProfile = new SecurityProfile(true, SecurityTypes.TrustedLaunch, new UefiSettings - { - SecureBootEnabled = true, - VTpmEnabled = true, - }), - ServiceArtifactReference = new ServiceArtifactReference(""), - }, - TaskSlotsPerNode = 1234, - TaskSchedulingPolicy = new BatchTaskSchedulingPolicy(BatchNodeFillType.Spread), - ResizeTimeout = XmlConvert.ToTimeSpan("PT1H23M45S"), - ResourceTags = "", - TargetDedicatedNodes = 1234, - TargetLowPriorityNodes = 1234, - EnableAutoScale = true, - AutoScaleFormula = "", - AutoScaleEvaluationInterval = XmlConvert.ToTimeSpan("PT1H23M45S"), - EnableInterNodeCommunication = true, - NetworkConfiguration = new NetworkConfiguration - { - SubnetId = "", - DynamicVNetAssignmentScope = DynamicVNetAssignmentScope.None, - EndpointConfiguration = new BatchPoolEndpointConfiguration(new InboundNatPool[] - { - new InboundNatPool("", InboundEndpointProtocol.Tcp, 1234, 1234, 1234) - { - NetworkSecurityGroupRules = {new NetworkSecurityGroupRule(1234, NetworkSecurityGroupRuleAccess.Allow, "") - { - SourcePortRanges = {""}, - }}, - } - }), - PublicIpAddressConfiguration = new PublicIpAddressConfiguration - { - IpAddressProvisioningType = IpAddressProvisioningType.BatchManaged, - IpAddressIds = { "" }, - }, - EnableAcceleratedNetworking = true, - }, - StartTask = new BatchStartTask("") - { - ContainerSettings = default, - ResourceFiles = { default }, - EnvironmentSettings = { default }, - UserIdentity = default, - MaxTaskRetryCount = 1234, - WaitForSuccess = true, - }, - ApplicationPackageReferences = { default }, - UserAccounts = {new UserAccount("", "") - { - ElevationLevel = ElevationLevel.NonAdmin, - LinuxUserConfiguration = new LinuxUserConfiguration - { - Uid = 1234, - Gid = 1234, - SshPrivateKey = "", - }, - WindowsUserConfiguration = new WindowsUserConfiguration - { - LoginMode = LoginMode.Batch, - }, - }}, - Metadata = { new MetadataItem("", "") }, - MountConfiguration = {new MountConfiguration - { - AzureBlobFileSystemConfiguration = new AzureBlobFileSystemConfiguration("", "", "") - { - AccountKey = "", - SasKey = "", - BlobfuseOptions = "", - IdentityReference = default, - }, - NfsMountConfiguration = new NfsMountConfiguration("", "") - { - MountOptions = "", - }, - CifsMountConfiguration = new CifsMountConfiguration("", "", "", "") - { - MountOptions = "", - }, - AzureFileShareConfiguration = new AzureFileShareConfiguration("", "", "", "") - { - MountOptions = "", - }, - }}, - TargetNodeCommunicationMode = BatchNodeCommunicationMode.Default, - UpgradePolicy = new UpgradePolicy(UpgradeMode.Automatic) - { - AutomaticOsUpgradePolicy = new AutomaticOsUpgradePolicy - { - DisableAutomaticRollback = true, - EnableAutomaticOsUpgrade = true, - UseRollingUpgradePolicy = true, - OsRollingUpgradeDeferral = true, - }, - RollingUpgradePolicy = new RollingUpgradePolicy - { - EnableCrossZoneUpgrade = true, - MaxBatchInstancePercent = 1234, - MaxUnhealthyInstancePercent = 1234, - MaxUnhealthyUpgradedInstancePercent = 1234, - PauseTimeBetweenBatches = XmlConvert.ToTimeSpan("PT1H23M45S"), - PrioritizeUnhealthyInstances = true, - RollbackFailedInstancesOnPolicyBreach = true, - }, - }, - }, - }, -}) -{ - Priority = 1234, - AllowTaskPreemption = true, - MaxParallelTasks = 1234, - DisplayName = "", - UsesTaskDependencies = true, - OnAllTasksComplete = OnAllBatchTasksComplete.NoAction, - OnTaskFailure = OnBatchTaskFailure.NoAction, - NetworkConfiguration = new BatchJobNetworkConfiguration(""), - Constraints = new BatchJobConstraints - { - MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - MaxTaskRetryCount = 1234, - }, - JobManagerTask = new BatchJobManagerTask("", "") - { - DisplayName = "", - ContainerSettings = new BatchTaskContainerSettings("") - { - ContainerRunOptions = "", - Registry = new ContainerRegistryReference - { - Username = "", - Password = "", - RegistryServer = "", - IdentityReference = new BatchNodeIdentityReference - { - ResourceId = "", - }, - }, - WorkingDirectory = ContainerWorkingDirectory.TaskWorkingDirectory, - }, - ResourceFiles = {new ResourceFile - { - AutoStorageContainerName = "", - StorageContainerUrl = "", - HttpUrl = "", - BlobPrefix = "", - FilePath = "", - FileMode = "", - IdentityReference = default, - }}, - OutputFiles = {new OutputFile("", new OutputFileDestination - { - Container = new OutputFileBlobContainerDestination("") - { - Path = "", - IdentityReference = default, - UploadHeaders = {new HttpHeader("") - { - Value = "", - }}, - }, - }, new OutputFileUploadConfig(OutputFileUploadCondition.TaskSuccess))}, - EnvironmentSettings = {new EnvironmentSetting("") - { - Value = "", - }}, - Constraints = new BatchTaskConstraints - { - MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - RetentionTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - MaxTaskRetryCount = 1234, - }, - RequiredSlots = 1234, - KillJobOnCompletion = true, - UserIdentity = new UserIdentity - { - Username = "", - AutoUser = new AutoUserSpecification - { - Scope = AutoUserScope.Task, - ElevationLevel = ElevationLevel.NonAdmin, - }, - }, - RunExclusive = true, - ApplicationPackageReferences = {new BatchApplicationPackageReference("") - { - Version = "", - }}, - AuthenticationTokenSettings = new AuthenticationTokenSettings - { - Access = { AccessScope.Job }, - }, - AllowLowPriorityNode = true, - }, - JobPreparationTask = new BatchJobPreparationTask("") - { - Id = "", - ContainerSettings = default, - ResourceFiles = { default }, - EnvironmentSettings = { default }, - Constraints = default, - WaitForSuccess = true, - UserIdentity = default, - RerunOnNodeRebootAfterSuccess = true, - }, - JobReleaseTask = new BatchJobReleaseTask("") - { - Id = "", - ContainerSettings = default, - ResourceFiles = { default }, - EnvironmentSettings = { default }, - MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - RetentionTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - UserIdentity = default, - }, - CommonEnvironmentSettings = { default }, - Metadata = { default }, -}) -{ - Schedule = new BatchJobScheduleConfiguration - { - DoNotRunUntil = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), - DoNotRunAfter = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), - StartWindow = XmlConvert.ToTimeSpan("PT1H23M45S"), - RecurrenceInterval = XmlConvert.ToTimeSpan("PT1H23M45S"), - }, - Metadata = { default }, -}; -Response response = await client.ReplaceJobScheduleAsync("", jobSchedule, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); -]]> - - - -This sample shows how to call ReplaceJobSchedule. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -BatchJobSchedule jobSchedule = new BatchJobSchedule(new BatchJobSpecification(new BatchPoolInfo())); -Response response = client.ReplaceJobSchedule("", jobSchedule); -]]> -This sample shows how to call ReplaceJobSchedule with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -BatchJobSchedule jobSchedule = new BatchJobSchedule(new BatchJobSpecification(new BatchPoolInfo -{ - PoolId = "", - AutoPoolSpecification = new BatchAutoPoolSpecification(BatchPoolLifetimeOption.JobSchedule) - { - AutoPoolIdPrefix = "", - KeepAlive = true, - Pool = new BatchPoolSpecification("") - { - DisplayName = "", - VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference - { - Publisher = "", - Offer = "", - Sku = "", - Version = "", - VirtualMachineImageId = "", - }, "") - { - WindowsConfiguration = new WindowsConfiguration - { - EnableAutomaticUpdates = true, - }, - DataDisks = {new DataDisk(1234, 1234) - { - Caching = CachingType.None, - StorageAccountType = StorageAccountType.StandardLRS, - }}, - LicenseType = "", - ContainerConfiguration = new ContainerConfiguration(ContainerType.DockerCompatible) - { - ContainerImageNames = { "" }, - ContainerRegistries = { default }, - }, - DiskEncryptionConfiguration = new DiskEncryptionConfiguration - { - Targets = { DiskEncryptionTarget.OsDisk }, - }, - NodePlacementConfiguration = new BatchNodePlacementConfiguration - { - Policy = BatchNodePlacementPolicyType.Regional, - }, - Extensions = {new VMExtension("", "", "") - { - TypeHandlerVersion = "", - AutoUpgradeMinorVersion = true, - EnableAutomaticUpgrade = true, - Settings = - { - ["key"] = "" - }, - ProtectedSettings = - { - ["key"] = "" - }, - ProvisionAfterExtensions = {""}, - }}, - OsDisk = new OSDisk - { - EphemeralOSDiskSettings = new DiffDiskSettings - { - Placement = DiffDiskPlacement.CacheDisk, - }, - Caching = CachingType.None, - DiskSizeGB = 1234, - ManagedDisk = new ManagedDisk(StorageAccountType.StandardLRS), - WriteAcceleratorEnabled = true, - }, - SecurityProfile = new SecurityProfile(true, SecurityTypes.TrustedLaunch, new UefiSettings - { - SecureBootEnabled = true, - VTpmEnabled = true, - }), - ServiceArtifactReference = new ServiceArtifactReference(""), - }, - TaskSlotsPerNode = 1234, - TaskSchedulingPolicy = new BatchTaskSchedulingPolicy(BatchNodeFillType.Spread), - ResizeTimeout = XmlConvert.ToTimeSpan("PT1H23M45S"), - ResourceTags = "", - TargetDedicatedNodes = 1234, - TargetLowPriorityNodes = 1234, - EnableAutoScale = true, - AutoScaleFormula = "", - AutoScaleEvaluationInterval = XmlConvert.ToTimeSpan("PT1H23M45S"), - EnableInterNodeCommunication = true, - NetworkConfiguration = new NetworkConfiguration - { - SubnetId = "", - DynamicVNetAssignmentScope = DynamicVNetAssignmentScope.None, - EndpointConfiguration = new BatchPoolEndpointConfiguration(new InboundNatPool[] - { - new InboundNatPool("", InboundEndpointProtocol.Tcp, 1234, 1234, 1234) - { - NetworkSecurityGroupRules = {new NetworkSecurityGroupRule(1234, NetworkSecurityGroupRuleAccess.Allow, "") - { - SourcePortRanges = {""}, - }}, - } - }), - PublicIpAddressConfiguration = new PublicIpAddressConfiguration - { - IpAddressProvisioningType = IpAddressProvisioningType.BatchManaged, - IpAddressIds = { "" }, - }, - EnableAcceleratedNetworking = true, - }, - StartTask = new BatchStartTask("") - { - ContainerSettings = default, - ResourceFiles = { default }, - EnvironmentSettings = { default }, - UserIdentity = default, - MaxTaskRetryCount = 1234, - WaitForSuccess = true, - }, - ApplicationPackageReferences = { default }, - UserAccounts = {new UserAccount("", "") - { - ElevationLevel = ElevationLevel.NonAdmin, - LinuxUserConfiguration = new LinuxUserConfiguration - { - Uid = 1234, - Gid = 1234, - SshPrivateKey = "", - }, - WindowsUserConfiguration = new WindowsUserConfiguration - { - LoginMode = LoginMode.Batch, - }, - }}, - Metadata = { new MetadataItem("", "") }, - MountConfiguration = {new MountConfiguration - { - AzureBlobFileSystemConfiguration = new AzureBlobFileSystemConfiguration("", "", "") - { - AccountKey = "", - SasKey = "", - BlobfuseOptions = "", - IdentityReference = default, - }, - NfsMountConfiguration = new NfsMountConfiguration("", "") - { - MountOptions = "", - }, - CifsMountConfiguration = new CifsMountConfiguration("", "", "", "") - { - MountOptions = "", - }, - AzureFileShareConfiguration = new AzureFileShareConfiguration("", "", "", "") - { - MountOptions = "", - }, - }}, - TargetNodeCommunicationMode = BatchNodeCommunicationMode.Default, - UpgradePolicy = new UpgradePolicy(UpgradeMode.Automatic) - { - AutomaticOsUpgradePolicy = new AutomaticOsUpgradePolicy - { - DisableAutomaticRollback = true, - EnableAutomaticOsUpgrade = true, - UseRollingUpgradePolicy = true, - OsRollingUpgradeDeferral = true, - }, - RollingUpgradePolicy = new RollingUpgradePolicy - { - EnableCrossZoneUpgrade = true, - MaxBatchInstancePercent = 1234, - MaxUnhealthyInstancePercent = 1234, - MaxUnhealthyUpgradedInstancePercent = 1234, - PauseTimeBetweenBatches = XmlConvert.ToTimeSpan("PT1H23M45S"), - PrioritizeUnhealthyInstances = true, - RollbackFailedInstancesOnPolicyBreach = true, - }, - }, - }, - }, -}) -{ - Priority = 1234, - AllowTaskPreemption = true, - MaxParallelTasks = 1234, - DisplayName = "", - UsesTaskDependencies = true, - OnAllTasksComplete = OnAllBatchTasksComplete.NoAction, - OnTaskFailure = OnBatchTaskFailure.NoAction, - NetworkConfiguration = new BatchJobNetworkConfiguration(""), - Constraints = new BatchJobConstraints - { - MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - MaxTaskRetryCount = 1234, - }, - JobManagerTask = new BatchJobManagerTask("", "") - { - DisplayName = "", - ContainerSettings = new BatchTaskContainerSettings("") - { - ContainerRunOptions = "", - Registry = new ContainerRegistryReference - { - Username = "", - Password = "", - RegistryServer = "", - IdentityReference = new BatchNodeIdentityReference - { - ResourceId = "", - }, - }, - WorkingDirectory = ContainerWorkingDirectory.TaskWorkingDirectory, - }, - ResourceFiles = {new ResourceFile - { - AutoStorageContainerName = "", - StorageContainerUrl = "", - HttpUrl = "", - BlobPrefix = "", - FilePath = "", - FileMode = "", - IdentityReference = default, - }}, - OutputFiles = {new OutputFile("", new OutputFileDestination - { - Container = new OutputFileBlobContainerDestination("") - { - Path = "", - IdentityReference = default, - UploadHeaders = {new HttpHeader("") - { - Value = "", - }}, - }, - }, new OutputFileUploadConfig(OutputFileUploadCondition.TaskSuccess))}, - EnvironmentSettings = {new EnvironmentSetting("") - { - Value = "", - }}, - Constraints = new BatchTaskConstraints - { - MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - RetentionTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - MaxTaskRetryCount = 1234, - }, - RequiredSlots = 1234, - KillJobOnCompletion = true, - UserIdentity = new UserIdentity - { - Username = "", - AutoUser = new AutoUserSpecification - { - Scope = AutoUserScope.Task, - ElevationLevel = ElevationLevel.NonAdmin, - }, - }, - RunExclusive = true, - ApplicationPackageReferences = {new BatchApplicationPackageReference("") - { - Version = "", - }}, - AuthenticationTokenSettings = new AuthenticationTokenSettings - { - Access = { AccessScope.Job }, - }, - AllowLowPriorityNode = true, - }, - JobPreparationTask = new BatchJobPreparationTask("") - { - Id = "", - ContainerSettings = default, - ResourceFiles = { default }, - EnvironmentSettings = { default }, - Constraints = default, - WaitForSuccess = true, - UserIdentity = default, - RerunOnNodeRebootAfterSuccess = true, - }, - JobReleaseTask = new BatchJobReleaseTask("") - { - Id = "", - ContainerSettings = default, - ResourceFiles = { default }, - EnvironmentSettings = { default }, - MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - RetentionTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - UserIdentity = default, - }, - CommonEnvironmentSettings = { default }, - Metadata = { default }, -}) -{ - Schedule = new BatchJobScheduleConfiguration - { - DoNotRunUntil = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), - DoNotRunAfter = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), - StartWindow = XmlConvert.ToTimeSpan("PT1H23M45S"), - RecurrenceInterval = XmlConvert.ToTimeSpan("PT1H23M45S"), - }, - Metadata = { default }, -}; -Response response = client.ReplaceJobSchedule("", jobSchedule, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); -]]> - - - -This sample shows how to call ReplaceJobScheduleAsync. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - jobSpecification = new - { - poolInfo = new object(), - }, -}); -Response response = await client.ReplaceJobScheduleAsync("", content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call ReplaceJobScheduleAsync with all parameters and request content. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - schedule = new - { - doNotRunUntil = "2022-05-10T18:57:31.2311892Z", - doNotRunAfter = "2022-05-10T18:57:31.2311892Z", - startWindow = "PT1H23M45S", - recurrenceInterval = "PT1H23M45S", - }, - jobSpecification = new - { - priority = 1234, - allowTaskPreemption = true, - maxParallelTasks = 1234, - displayName = "", - usesTaskDependencies = true, - onAllTasksComplete = "noaction", - onTaskFailure = "noaction", - networkConfiguration = new - { - subnetId = "", - }, - constraints = new - { - maxWallClockTime = "PT1H23M45S", - maxTaskRetryCount = 1234, - }, - jobManagerTask = new - { - id = "", - displayName = "", - commandLine = "", - containerSettings = new - { - containerRunOptions = "", - imageName = "", - registry = new - { - username = "", - password = "", - registryServer = "", - identityReference = new - { - resourceId = "", - }, - }, - workingDirectory = "taskWorkingDirectory", - }, - resourceFiles = new object[] - { - new - { - autoStorageContainerName = "", - storageContainerUrl = "", - httpUrl = "", - blobPrefix = "", - filePath = "", - fileMode = "", - } - }, - outputFiles = new object[] - { - new - { - filePattern = "", - destination = new - { - container = new - { - path = "", - containerUrl = "", - uploadHeaders = new object[] - { - new - { - name = "", - value = "", - } - }, - }, - }, - uploadOptions = new - { - uploadCondition = "tasksuccess", - }, - } - }, - environmentSettings = new object[] - { - new - { - name = "", - value = "", - } - }, - constraints = new - { - maxWallClockTime = "PT1H23M45S", - retentionTime = "PT1H23M45S", - maxTaskRetryCount = 1234, - }, - requiredSlots = 1234, - killJobOnCompletion = true, - userIdentity = new - { - username = "", - autoUser = new - { - scope = "task", - elevationLevel = "nonadmin", - }, - }, - runExclusive = true, - applicationPackageReferences = new object[] - { - new - { - applicationId = "", - version = "", - } - }, - authenticationTokenSettings = new - { - access = new object[] - { - "job" - }, - }, - allowLowPriorityNode = true, - }, - jobPreparationTask = new - { - id = "", - commandLine = "", - resourceFiles = new object[] - { - null - }, - environmentSettings = new object[] - { - null - }, - waitForSuccess = true, - rerunOnNodeRebootAfterSuccess = true, - }, - jobReleaseTask = new - { - id = "", - commandLine = "", - resourceFiles = new object[] - { - null - }, - environmentSettings = new object[] - { - null - }, - maxWallClockTime = "PT1H23M45S", - retentionTime = "PT1H23M45S", - }, - commonEnvironmentSettings = new object[] - { - null - }, - poolInfo = new - { - poolId = "", - autoPoolSpecification = new - { - autoPoolIdPrefix = "", - poolLifetimeOption = "jobschedule", - keepAlive = true, - pool = new - { - displayName = "", - vmSize = "", - virtualMachineConfiguration = new - { - imageReference = new - { - publisher = "", - offer = "", - sku = "", - version = "", - virtualMachineImageId = "", - }, - nodeAgentSKUId = "", - windowsConfiguration = new - { - enableAutomaticUpdates = true, - }, - dataDisks = new object[] - { - new - { - lun = 1234, - caching = "none", - diskSizeGB = 1234, - storageAccountType = "standard_lrs", - } - }, - licenseType = "", - containerConfiguration = new - { - type = "dockerCompatible", - containerImageNames = new object[] - { - "" - }, - containerRegistries = new object[] - { - null - }, - }, - diskEncryptionConfiguration = new - { - targets = new object[] - { - "osdisk" - }, - }, - nodePlacementConfiguration = new - { - policy = "regional", - }, - extensions = new object[] - { - new - { - name = "", - publisher = "", - type = "", - typeHandlerVersion = "", - autoUpgradeMinorVersion = true, - enableAutomaticUpgrade = true, - settings = new - { - key = "", - }, - protectedSettings = new - { - key = "", - }, - provisionAfterExtensions = new object[] - { - "" - }, - } - }, - osDisk = new - { - ephemeralOSDiskSettings = new - { - placement = "cachedisk", - }, - caching = "none", - diskSizeGB = 1234, - managedDisk = new - { - storageAccountType = "standard_lrs", - }, - writeAcceleratorEnabled = true, - }, - securityProfile = new - { - encryptionAtHost = true, - securityType = "trustedLaunch", - uefiSettings = new - { - secureBootEnabled = true, - vTpmEnabled = true, - }, - }, - serviceArtifactReference = new - { - id = "", - }, - }, - taskSlotsPerNode = 1234, - taskSchedulingPolicy = new - { - nodeFillType = "spread", - }, - resizeTimeout = "PT1H23M45S", - resourceTags = "", - targetDedicatedNodes = 1234, - targetLowPriorityNodes = 1234, - enableAutoScale = true, - autoScaleFormula = "", - autoScaleEvaluationInterval = "PT1H23M45S", - enableInterNodeCommunication = true, - networkConfiguration = new - { - subnetId = "", - dynamicVNetAssignmentScope = "none", - endpointConfiguration = new - { - inboundNATPools = new object[] - { - new - { - name = "", - protocol = "tcp", - backendPort = 1234, - frontendPortRangeStart = 1234, - frontendPortRangeEnd = 1234, - networkSecurityGroupRules = new object[] - { - new - { - priority = 1234, - access = "allow", - sourceAddressPrefix = "", - sourcePortRanges = new object[] - { - "" - }, - } - }, - } - }, - }, - publicIPAddressConfiguration = new - { - provision = "batchmanaged", - ipAddressIds = new object[] - { - "" - }, - }, - enableAcceleratedNetworking = true, - }, - startTask = new - { - commandLine = "", - resourceFiles = new object[] - { - null - }, - environmentSettings = new object[] - { - null - }, - maxTaskRetryCount = 1234, - waitForSuccess = true, - }, - applicationPackageReferences = new object[] - { - null - }, - userAccounts = new object[] - { - new - { - name = "", - password = "", - elevationLevel = "nonadmin", - linuxUserConfiguration = new - { - uid = 1234, - gid = 1234, - sshPrivateKey = "", - }, - windowsUserConfiguration = new - { - loginMode = "batch", - }, - } - }, - metadata = new object[] - { - new - { - name = "", - value = "", - } - }, - mountConfiguration = new object[] - { - new - { - azureBlobFileSystemConfiguration = new - { - accountName = "", - containerName = "", - accountKey = "", - sasKey = "", - blobfuseOptions = "", - relativeMountPath = "", - }, - nfsMountConfiguration = new - { - source = "", - relativeMountPath = "", - mountOptions = "", - }, - cifsMountConfiguration = new - { - username = "", - source = "", - relativeMountPath = "", - mountOptions = "", - password = "", - }, - azureFileShareConfiguration = new - { - accountName = "", - azureFileUrl = "", - accountKey = "", - relativeMountPath = "", - mountOptions = "", - }, - } - }, - targetNodeCommunicationMode = "default", - upgradePolicy = new - { - mode = "automatic", - automaticOSUpgradePolicy = new - { - disableAutomaticRollback = true, - enableAutomaticOSUpgrade = true, - useRollingUpgradePolicy = true, - osRollingUpgradeDeferral = true, - }, - rollingUpgradePolicy = new - { - enableCrossZoneUpgrade = true, - maxBatchInstancePercent = 1234, - maxUnhealthyInstancePercent = 1234, - maxUnhealthyUpgradedInstancePercent = 1234, - pauseTimeBetweenBatches = "PT1H23M45S", - prioritizeUnhealthyInstances = true, - rollbackFailedInstancesOnPolicyBreach = true, - }, - }, - }, - }, - }, - metadata = new object[] - { - null - }, - }, - metadata = new object[] - { - null - }, -}); -Response response = await client.ReplaceJobScheduleAsync("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); - -Console.WriteLine(response.Status); -]]> - - - -This sample shows how to call ReplaceJobSchedule. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - jobSpecification = new - { - poolInfo = new object(), - }, -}); -Response response = client.ReplaceJobSchedule("", content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call ReplaceJobSchedule with all parameters and request content. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - schedule = new - { - doNotRunUntil = "2022-05-10T18:57:31.2311892Z", - doNotRunAfter = "2022-05-10T18:57:31.2311892Z", - startWindow = "PT1H23M45S", - recurrenceInterval = "PT1H23M45S", - }, - jobSpecification = new - { - priority = 1234, - allowTaskPreemption = true, - maxParallelTasks = 1234, - displayName = "", - usesTaskDependencies = true, - onAllTasksComplete = "noaction", - onTaskFailure = "noaction", - networkConfiguration = new - { - subnetId = "", - }, - constraints = new - { - maxWallClockTime = "PT1H23M45S", - maxTaskRetryCount = 1234, - }, - jobManagerTask = new - { - id = "", - displayName = "", - commandLine = "", - containerSettings = new - { - containerRunOptions = "", - imageName = "", - registry = new - { - username = "", - password = "", - registryServer = "", - identityReference = new - { - resourceId = "", - }, - }, - workingDirectory = "taskWorkingDirectory", - }, - resourceFiles = new object[] - { - new - { - autoStorageContainerName = "", - storageContainerUrl = "", - httpUrl = "", - blobPrefix = "", - filePath = "", - fileMode = "", - } - }, - outputFiles = new object[] - { - new - { - filePattern = "", - destination = new - { - container = new - { - path = "", - containerUrl = "", - uploadHeaders = new object[] - { - new - { - name = "", - value = "", - } - }, - }, - }, - uploadOptions = new - { - uploadCondition = "tasksuccess", - }, - } - }, - environmentSettings = new object[] - { - new - { - name = "", - value = "", - } - }, - constraints = new - { - maxWallClockTime = "PT1H23M45S", - retentionTime = "PT1H23M45S", - maxTaskRetryCount = 1234, - }, - requiredSlots = 1234, - killJobOnCompletion = true, - userIdentity = new - { - username = "", - autoUser = new - { - scope = "task", - elevationLevel = "nonadmin", - }, - }, - runExclusive = true, - applicationPackageReferences = new object[] - { - new - { - applicationId = "", - version = "", - } - }, - authenticationTokenSettings = new - { - access = new object[] - { - "job" - }, - }, - allowLowPriorityNode = true, - }, - jobPreparationTask = new - { - id = "", - commandLine = "", - resourceFiles = new object[] - { - null - }, - environmentSettings = new object[] - { - null - }, - waitForSuccess = true, - rerunOnNodeRebootAfterSuccess = true, - }, - jobReleaseTask = new - { - id = "", - commandLine = "", - resourceFiles = new object[] - { - null - }, - environmentSettings = new object[] - { - null - }, - maxWallClockTime = "PT1H23M45S", - retentionTime = "PT1H23M45S", - }, - commonEnvironmentSettings = new object[] - { - null - }, - poolInfo = new - { - poolId = "", - autoPoolSpecification = new - { - autoPoolIdPrefix = "", - poolLifetimeOption = "jobschedule", - keepAlive = true, - pool = new - { - displayName = "", - vmSize = "", - virtualMachineConfiguration = new - { - imageReference = new - { - publisher = "", - offer = "", - sku = "", - version = "", - virtualMachineImageId = "", - }, - nodeAgentSKUId = "", - windowsConfiguration = new - { - enableAutomaticUpdates = true, - }, - dataDisks = new object[] - { - new - { - lun = 1234, - caching = "none", - diskSizeGB = 1234, - storageAccountType = "standard_lrs", - } - }, - licenseType = "", - containerConfiguration = new - { - type = "dockerCompatible", - containerImageNames = new object[] - { - "" - }, - containerRegistries = new object[] - { - null - }, - }, - diskEncryptionConfiguration = new - { - targets = new object[] - { - "osdisk" - }, - }, - nodePlacementConfiguration = new - { - policy = "regional", - }, - extensions = new object[] - { - new - { - name = "", - publisher = "", - type = "", - typeHandlerVersion = "", - autoUpgradeMinorVersion = true, - enableAutomaticUpgrade = true, - settings = new - { - key = "", - }, - protectedSettings = new - { - key = "", - }, - provisionAfterExtensions = new object[] - { - "" - }, - } - }, - osDisk = new - { - ephemeralOSDiskSettings = new - { - placement = "cachedisk", - }, - caching = "none", - diskSizeGB = 1234, - managedDisk = new - { - storageAccountType = "standard_lrs", - }, - writeAcceleratorEnabled = true, - }, - securityProfile = new - { - encryptionAtHost = true, - securityType = "trustedLaunch", - uefiSettings = new - { - secureBootEnabled = true, - vTpmEnabled = true, - }, - }, - serviceArtifactReference = new - { - id = "", - }, - }, - taskSlotsPerNode = 1234, - taskSchedulingPolicy = new - { - nodeFillType = "spread", - }, - resizeTimeout = "PT1H23M45S", - resourceTags = "", - targetDedicatedNodes = 1234, - targetLowPriorityNodes = 1234, - enableAutoScale = true, - autoScaleFormula = "", - autoScaleEvaluationInterval = "PT1H23M45S", - enableInterNodeCommunication = true, - networkConfiguration = new - { - subnetId = "", - dynamicVNetAssignmentScope = "none", - endpointConfiguration = new - { - inboundNATPools = new object[] - { - new - { - name = "", - protocol = "tcp", - backendPort = 1234, - frontendPortRangeStart = 1234, - frontendPortRangeEnd = 1234, - networkSecurityGroupRules = new object[] - { - new - { - priority = 1234, - access = "allow", - sourceAddressPrefix = "", - sourcePortRanges = new object[] - { - "" - }, - } - }, - } - }, - }, - publicIPAddressConfiguration = new - { - provision = "batchmanaged", - ipAddressIds = new object[] - { - "" - }, - }, - enableAcceleratedNetworking = true, - }, - startTask = new - { - commandLine = "", - resourceFiles = new object[] - { - null - }, - environmentSettings = new object[] - { - null - }, - maxTaskRetryCount = 1234, - waitForSuccess = true, - }, - applicationPackageReferences = new object[] - { - null - }, - userAccounts = new object[] - { - new - { - name = "", - password = "", - elevationLevel = "nonadmin", - linuxUserConfiguration = new - { - uid = 1234, - gid = 1234, - sshPrivateKey = "", - }, - windowsUserConfiguration = new - { - loginMode = "batch", - }, - } - }, - metadata = new object[] - { - new - { - name = "", - value = "", - } - }, - mountConfiguration = new object[] - { - new - { - azureBlobFileSystemConfiguration = new - { - accountName = "", - containerName = "", - accountKey = "", - sasKey = "", - blobfuseOptions = "", - relativeMountPath = "", - }, - nfsMountConfiguration = new - { - source = "", - relativeMountPath = "", - mountOptions = "", - }, - cifsMountConfiguration = new - { - username = "", - source = "", - relativeMountPath = "", - mountOptions = "", - password = "", - }, - azureFileShareConfiguration = new - { - accountName = "", - azureFileUrl = "", - accountKey = "", - relativeMountPath = "", - mountOptions = "", - }, - } - }, - targetNodeCommunicationMode = "default", - upgradePolicy = new - { - mode = "automatic", - automaticOSUpgradePolicy = new - { - disableAutomaticRollback = true, - enableAutomaticOSUpgrade = true, - useRollingUpgradePolicy = true, - osRollingUpgradeDeferral = true, - }, - rollingUpgradePolicy = new - { - enableCrossZoneUpgrade = true, - maxBatchInstancePercent = 1234, - maxUnhealthyInstancePercent = 1234, - maxUnhealthyUpgradedInstancePercent = 1234, - pauseTimeBetweenBatches = "PT1H23M45S", - prioritizeUnhealthyInstances = true, - rollbackFailedInstancesOnPolicyBreach = true, - }, - }, - }, - }, +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + schedule = new + { + doNotRunUntil = "2025-01-01T12:30:00Z", + }, + jobSpecification = new + { + priority = 0, + usesTaskDependencies = false, + constraints = new + { + maxWallClockTime = "P10675199DT2H48M5.4775807S", + maxTaskRetryCount = 0, }, - metadata = new object[] + poolInfo = new { - null + poolId = "poolId", }, }, - metadata = new object[] - { - null - }, }); -Response response = client.ReplaceJobSchedule("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); +Response response = await client.UpdateJobScheduleAsync("jobScheduleId", content); Console.WriteLine(response.Status); ]]> - + -This sample shows how to call DisableJobScheduleAsync. +This sample shows how to call UpdateJobSchedule. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -Response response = await client.DisableJobScheduleAsync(""); +using RequestContent content = RequestContent.Create(new +{ + schedule = new + { + doNotRunUntil = "2025-01-01T12:30:00Z", + }, + jobSpecification = new + { + priority = 0, + usesTaskDependencies = false, + constraints = new + { + maxWallClockTime = "P10675199DT2H48M5.4775807S", + maxTaskRetryCount = 0, + }, + poolInfo = new + { + poolId = "poolId", + }, + }, +}); +Response response = client.UpdateJobSchedule("jobScheduleId", content); Console.WriteLine(response.Status); -]]> -This sample shows how to call DisableJobScheduleAsync with all parameters. +]]> + + + +This sample shows how to call ReplaceJobScheduleAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -Response response = await client.DisableJobScheduleAsync("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); - -Console.WriteLine(response.Status); +BatchJobSchedule jobSchedule = new BatchJobSchedule(new BatchJobSpecification(new BatchPoolInfo +{ + PoolId = "poolId", +}) +{ + Priority = 0, + UsesTaskDependencies = false, + Constraints = new BatchJobConstraints + { + MaxWallClockTime = XmlConvert.ToTimeSpan("P10675199DT2H48M5.4775807S"), + MaxTaskRetryCount = 0, + }, +}) +{ + Schedule = new BatchJobScheduleConfiguration + { + DoNotRunUntil = DateTimeOffset.Parse("2025-01-01T12:30:00Z"), + }, +}; +Response response = await client.ReplaceJobScheduleAsync("jobScheduleId", jobSchedule); ]]> - + -This sample shows how to call DisableJobSchedule. +This sample shows how to call ReplaceJobSchedule. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -Response response = client.DisableJobSchedule(""); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call DisableJobSchedule with all parameters. +BatchJobSchedule jobSchedule = new BatchJobSchedule(new BatchJobSpecification(new BatchPoolInfo +{ + PoolId = "poolId", +}) +{ + Priority = 0, + UsesTaskDependencies = false, + Constraints = new BatchJobConstraints + { + MaxWallClockTime = XmlConvert.ToTimeSpan("P10675199DT2H48M5.4775807S"), + MaxTaskRetryCount = 0, + }, +}) +{ + Schedule = new BatchJobScheduleConfiguration + { + DoNotRunUntil = DateTimeOffset.Parse("2025-01-01T12:30:00Z"), + }, +}; +Response response = client.ReplaceJobSchedule("jobScheduleId", jobSchedule); +]]> + + + +This sample shows how to call ReplaceJobScheduleAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -Response response = client.DisableJobSchedule("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); +using RequestContent content = RequestContent.Create(new +{ + schedule = new + { + doNotRunUntil = "2025-01-01T12:30:00Z", + }, + jobSpecification = new + { + priority = 0, + usesTaskDependencies = false, + constraints = new + { + maxWallClockTime = "P10675199DT2H48M5.4775807S", + maxTaskRetryCount = 0, + }, + poolInfo = new + { + poolId = "poolId", + }, + }, +}); +Response response = await client.ReplaceJobScheduleAsync("jobScheduleId", content); Console.WriteLine(response.Status); ]]> - + -This sample shows how to call EnableJobScheduleAsync. +This sample shows how to call ReplaceJobSchedule. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -Response response = await client.EnableJobScheduleAsync(""); +using RequestContent content = RequestContent.Create(new +{ + schedule = new + { + doNotRunUntil = "2025-01-01T12:30:00Z", + }, + jobSpecification = new + { + priority = 0, + usesTaskDependencies = false, + constraints = new + { + maxWallClockTime = "P10675199DT2H48M5.4775807S", + maxTaskRetryCount = 0, + }, + poolInfo = new + { + poolId = "poolId", + }, + }, +}); +Response response = client.ReplaceJobSchedule("jobScheduleId", content); Console.WriteLine(response.Status); -]]> -This sample shows how to call EnableJobScheduleAsync with all parameters. +]]> + + + +This sample shows how to call DisableJobScheduleAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -Response response = await client.EnableJobScheduleAsync("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); +Response response = await client.DisableJobScheduleAsync("jobScheduleId"); Console.WriteLine(response.Status); ]]> - + -This sample shows how to call EnableJobSchedule. +This sample shows how to call DisableJobSchedule. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -Response response = client.EnableJobSchedule(""); +Response response = client.DisableJobSchedule("jobScheduleId"); Console.WriteLine(response.Status); -]]> -This sample shows how to call EnableJobSchedule with all parameters. +]]> + + + +This sample shows how to call EnableJobScheduleAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -Response response = client.EnableJobSchedule("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); +Response response = await client.EnableJobScheduleAsync("jobScheduleId"); Console.WriteLine(response.Status); ]]> - + -This sample shows how to call TerminateJobScheduleAsync. +This sample shows how to call EnableJobSchedule. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -Response response = await client.TerminateJobScheduleAsync(""); +Response response = client.EnableJobSchedule("jobScheduleId"); Console.WriteLine(response.Status); -]]> -This sample shows how to call TerminateJobScheduleAsync with all parameters. +]]> + + + +This sample shows how to call TerminateJobScheduleAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -Response response = await client.TerminateJobScheduleAsync("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); +Response response = await client.TerminateJobScheduleAsync("jobScheduleId"); Console.WriteLine(response.Status); ]]> @@ -10694,21 +3440,11 @@ Console.WriteLine(response.Status); This sample shows how to call TerminateJobSchedule. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -Response response = client.TerminateJobSchedule(""); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call TerminateJobSchedule with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -Response response = client.TerminateJobSchedule("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); +Response response = client.TerminateJobSchedule("jobScheduleId"); Console.WriteLine(response.Status); ]]> @@ -10717,271 +3453,111 @@ Console.WriteLine(response.Status); This sample shows how to call CreateJobScheduleAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -BatchJobScheduleCreateContent jobSchedule = new BatchJobScheduleCreateContent("", new BatchJobScheduleConfiguration(), new BatchJobSpecification(new BatchPoolInfo())); +BatchJobScheduleCreateContent jobSchedule = new BatchJobScheduleCreateContent("jobScheduleId", new BatchJobScheduleConfiguration +{ + RecurrenceInterval = XmlConvert.ToTimeSpan("PT5M"), +}, new BatchJobSpecification(new BatchPoolInfo +{ + PoolId = "poolId", +})); Response response = await client.CreateJobScheduleAsync(jobSchedule); ]]> -This sample shows how to call CreateJobScheduleAsync with all parameters. +This sample shows how to call CreateJobScheduleAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -BatchJobScheduleCreateContent jobSchedule = new BatchJobScheduleCreateContent("", new BatchJobScheduleConfiguration +BatchJobScheduleCreateContent jobSchedule = new BatchJobScheduleCreateContent("jobScheduleId", new BatchJobScheduleConfiguration { - DoNotRunUntil = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), - DoNotRunAfter = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), - StartWindow = XmlConvert.ToTimeSpan("PT1H23M45S"), - RecurrenceInterval = XmlConvert.ToTimeSpan("PT1H23M45S"), + DoNotRunUntil = DateTimeOffset.Parse("2014-09-10T02:30:00.000Z"), + DoNotRunAfter = DateTimeOffset.Parse("2014-09-10T06:30:00.000Z"), + StartWindow = XmlConvert.ToTimeSpan("PT1M"), + RecurrenceInterval = XmlConvert.ToTimeSpan("PT5M"), }, new BatchJobSpecification(new BatchPoolInfo { - PoolId = "", AutoPoolSpecification = new BatchAutoPoolSpecification(BatchPoolLifetimeOption.JobSchedule) { - AutoPoolIdPrefix = "", - KeepAlive = true, - Pool = new BatchPoolSpecification("") + AutoPoolIdPrefix = "mypool", + Pool = new BatchPoolSpecification("Standard_D1_v2") { - DisplayName = "", VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference { - Publisher = "", - Offer = "", - Sku = "", - Version = "", - VirtualMachineImageId = "", - }, "") + Publisher = "MicrosoftWindowsServer", + Offer = "WindowsServer", + Sku = "2016-datacenter-smalldisk", + Version = "latest", + }, "batch.node.windows amd64"), + TaskSlotsPerNode = 2, + TaskSchedulingPolicy = new BatchTaskSchedulingPolicy(BatchNodeFillType.Spread), + ResizeTimeout = XmlConvert.ToTimeSpan("PT15M"), + TargetDedicatedNodes = 3, + TargetLowPriorityNodes = 0, + EnableAutoScale = false, + EnableInterNodeCommunication = true, + StartTask = new BatchStartTask("myprogram2.exe") { - WindowsConfiguration = new WindowsConfiguration - { - EnableAutomaticUpdates = true, - }, - DataDisks = {new DataDisk(1234, 1234) + ResourceFiles = {new ResourceFile { - Caching = CachingType.None, - StorageAccountType = StorageAccountType.StandardLRS, + HttpUrl = "http://mystorage1.blob.core.windows.net/scripts/myprogram2.exe?sas", + FilePath = "myprogram2.exe", }}, - LicenseType = "", - ContainerConfiguration = new ContainerConfiguration(ContainerType.DockerCompatible) - { - ContainerImageNames = { "" }, - ContainerRegistries = { default }, - }, - DiskEncryptionConfiguration = new DiskEncryptionConfiguration - { - Targets = { DiskEncryptionTarget.OsDisk }, - }, - NodePlacementConfiguration = new BatchNodePlacementConfiguration - { - Policy = BatchNodePlacementPolicyType.Regional, - }, - Extensions = {new VMExtension("", "", "") + EnvironmentSettings = {new EnvironmentSetting("myvariable") { - TypeHandlerVersion = "", - AutoUpgradeMinorVersion = true, - EnableAutomaticUpgrade = true, - Settings = - { - ["key"] = "" - }, - ProtectedSettings = - { - ["key"] = "" - }, - ProvisionAfterExtensions = {""}, + Value = "myvalue", }}, - OsDisk = new OSDisk + UserIdentity = new UserIdentity { - EphemeralOSDiskSettings = new DiffDiskSettings + AutoUser = new AutoUserSpecification { - Placement = DiffDiskPlacement.CacheDisk, + Scope = AutoUserScope.Task, + ElevationLevel = ElevationLevel.Admin, }, - Caching = CachingType.None, - DiskSizeGB = 1234, - ManagedDisk = new ManagedDisk(StorageAccountType.StandardLRS), - WriteAcceleratorEnabled = true, - }, - SecurityProfile = new SecurityProfile(true, SecurityTypes.TrustedLaunch, new UefiSettings - { - SecureBootEnabled = true, - VTpmEnabled = true, - }), - ServiceArtifactReference = new ServiceArtifactReference(""), - }, - TaskSlotsPerNode = 1234, - TaskSchedulingPolicy = new BatchTaskSchedulingPolicy(BatchNodeFillType.Spread), - ResizeTimeout = XmlConvert.ToTimeSpan("PT1H23M45S"), - ResourceTags = "", - TargetDedicatedNodes = 1234, - TargetLowPriorityNodes = 1234, - EnableAutoScale = true, - AutoScaleFormula = "", - AutoScaleEvaluationInterval = XmlConvert.ToTimeSpan("PT1H23M45S"), - EnableInterNodeCommunication = true, - NetworkConfiguration = new NetworkConfiguration - { - SubnetId = "", - DynamicVNetAssignmentScope = DynamicVNetAssignmentScope.None, - EndpointConfiguration = new BatchPoolEndpointConfiguration(new InboundNatPool[] - { - new InboundNatPool("", InboundEndpointProtocol.Tcp, 1234, 1234, 1234) - { - NetworkSecurityGroupRules = {new NetworkSecurityGroupRule(1234, NetworkSecurityGroupRuleAccess.Allow, "") - { - SourcePortRanges = {""}, - }}, - } - }), - PublicIpAddressConfiguration = new PublicIpAddressConfiguration - { - IpAddressProvisioningType = IpAddressProvisioningType.BatchManaged, - IpAddressIds = { "" }, }, - EnableAcceleratedNetworking = true, - }, - StartTask = new BatchStartTask("") - { - ContainerSettings = default, - ResourceFiles = { default }, - EnvironmentSettings = { default }, - UserIdentity = default, - MaxTaskRetryCount = 1234, + MaxTaskRetryCount = 2, WaitForSuccess = true, }, - ApplicationPackageReferences = { default }, - UserAccounts = {new UserAccount("", "") - { - ElevationLevel = ElevationLevel.NonAdmin, - LinuxUserConfiguration = new LinuxUserConfiguration - { - Uid = 1234, - Gid = 1234, - SshPrivateKey = "", - }, - WindowsUserConfiguration = new WindowsUserConfiguration - { - LoginMode = LoginMode.Batch, - }, - }}, - Metadata = { new MetadataItem("", "") }, - MountConfiguration = {new MountConfiguration - { - AzureBlobFileSystemConfiguration = new AzureBlobFileSystemConfiguration("", "", "") - { - AccountKey = "", - SasKey = "", - BlobfuseOptions = "", - IdentityReference = default, - }, - NfsMountConfiguration = new NfsMountConfiguration("", "") - { - MountOptions = "", - }, - CifsMountConfiguration = new CifsMountConfiguration("", "", "", "") - { - MountOptions = "", - }, - AzureFileShareConfiguration = new AzureFileShareConfiguration("", "", "", "") - { - MountOptions = "", - }, - }}, + Metadata = { new MetadataItem("myproperty", "myvalue") }, TargetNodeCommunicationMode = BatchNodeCommunicationMode.Default, - UpgradePolicy = new UpgradePolicy(UpgradeMode.Automatic) - { - AutomaticOsUpgradePolicy = new AutomaticOsUpgradePolicy - { - DisableAutomaticRollback = true, - EnableAutomaticOsUpgrade = true, - UseRollingUpgradePolicy = true, - OsRollingUpgradeDeferral = true, - }, - RollingUpgradePolicy = new RollingUpgradePolicy - { - EnableCrossZoneUpgrade = true, - MaxBatchInstancePercent = 1234, - MaxUnhealthyInstancePercent = 1234, - MaxUnhealthyUpgradedInstancePercent = 1234, - PauseTimeBetweenBatches = XmlConvert.ToTimeSpan("PT1H23M45S"), - PrioritizeUnhealthyInstances = true, - RollbackFailedInstancesOnPolicyBreach = true, - }, - }, }, }, }) { - Priority = 1234, - AllowTaskPreemption = true, - MaxParallelTasks = 1234, - DisplayName = "", - UsesTaskDependencies = true, - OnAllTasksComplete = OnAllBatchTasksComplete.NoAction, - OnTaskFailure = OnBatchTaskFailure.NoAction, - NetworkConfiguration = new BatchJobNetworkConfiguration(""), + Priority = 100, Constraints = new BatchJobConstraints { - MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - MaxTaskRetryCount = 1234, + MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H"), + MaxTaskRetryCount = -1, }, - JobManagerTask = new BatchJobManagerTask("", "") + JobManagerTask = new BatchJobManagerTask("mytask1", "myprogram.exe") { - DisplayName = "", - ContainerSettings = new BatchTaskContainerSettings("") - { - ContainerRunOptions = "", - Registry = new ContainerRegistryReference - { - Username = "", - Password = "", - RegistryServer = "", - IdentityReference = new BatchNodeIdentityReference - { - ResourceId = "", - }, - }, - WorkingDirectory = ContainerWorkingDirectory.TaskWorkingDirectory, - }, ResourceFiles = {new ResourceFile { - AutoStorageContainerName = "", - StorageContainerUrl = "", - HttpUrl = "", - BlobPrefix = "", - FilePath = "", - FileMode = "", - IdentityReference = default, - }}, - OutputFiles = {new OutputFile("", new OutputFileDestination + HttpUrl = "http://mystorage1.blob.core.windows.net/scripts/myprogram.exe?sas", + FilePath = "myprogram.exe", + }, new ResourceFile { - Container = new OutputFileBlobContainerDestination("") - { - Path = "", - IdentityReference = default, - UploadHeaders = {new HttpHeader("") - { - Value = "", - }}, - }, - }, new OutputFileUploadConfig(OutputFileUploadCondition.TaskSuccess))}, - EnvironmentSettings = {new EnvironmentSetting("") + HttpUrl = "http://mystorage1.blob.core.windows.net/scripts/test.txt?sas", + FilePath = "test.txt", + }}, + EnvironmentSettings = {new EnvironmentSetting("myvariable") { - Value = "", + Value = "myvalue", }}, Constraints = new BatchTaskConstraints { - MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - RetentionTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - MaxTaskRetryCount = 1234, + MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H"), + RetentionTime = XmlConvert.ToTimeSpan("PT1H"), + MaxTaskRetryCount = 0, }, - RequiredSlots = 1234, + RequiredSlots = 2, KillJobOnCompletion = true, UserIdentity = new UserIdentity { - Username = "", AutoUser = new AutoUserSpecification { Scope = AutoUserScope.Task, @@ -10989,316 +3565,123 @@ BatchJobScheduleCreateContent jobSchedule = new BatchJobScheduleCreateContent("< }, }, RunExclusive = true, - ApplicationPackageReferences = {new BatchApplicationPackageReference("") - { - Version = "", - }}, - AuthenticationTokenSettings = new AuthenticationTokenSettings - { - Access = { AccessScope.Job }, - }, - AllowLowPriorityNode = true, - }, - JobPreparationTask = new BatchJobPreparationTask("") - { - Id = "", - ContainerSettings = default, - ResourceFiles = { default }, - EnvironmentSettings = { default }, - Constraints = default, - WaitForSuccess = true, - UserIdentity = default, - RerunOnNodeRebootAfterSuccess = true, }, - JobReleaseTask = new BatchJobReleaseTask("") - { - Id = "", - ContainerSettings = default, - ResourceFiles = { default }, - EnvironmentSettings = { default }, - MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - RetentionTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - UserIdentity = default, - }, - CommonEnvironmentSettings = { default }, - Metadata = { default }, }) { - DisplayName = "", - Metadata = { default }, + Metadata = { new MetadataItem("myproperty", "myvalue") }, }; -Response response = await client.CreateJobScheduleAsync(jobSchedule, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +Response response = await client.CreateJobScheduleAsync(jobSchedule); ]]> This sample shows how to call CreateJobSchedule. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -BatchJobScheduleCreateContent jobSchedule = new BatchJobScheduleCreateContent("", new BatchJobScheduleConfiguration(), new BatchJobSpecification(new BatchPoolInfo())); +BatchJobScheduleCreateContent jobSchedule = new BatchJobScheduleCreateContent("jobScheduleId", new BatchJobScheduleConfiguration +{ + RecurrenceInterval = XmlConvert.ToTimeSpan("PT5M"), +}, new BatchJobSpecification(new BatchPoolInfo +{ + PoolId = "poolId", +})); Response response = client.CreateJobSchedule(jobSchedule); ]]> -This sample shows how to call CreateJobSchedule with all parameters. +This sample shows how to call CreateJobSchedule. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -BatchJobScheduleCreateContent jobSchedule = new BatchJobScheduleCreateContent("", new BatchJobScheduleConfiguration +BatchJobScheduleCreateContent jobSchedule = new BatchJobScheduleCreateContent("jobScheduleId", new BatchJobScheduleConfiguration { - DoNotRunUntil = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), - DoNotRunAfter = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), - StartWindow = XmlConvert.ToTimeSpan("PT1H23M45S"), - RecurrenceInterval = XmlConvert.ToTimeSpan("PT1H23M45S"), + DoNotRunUntil = DateTimeOffset.Parse("2014-09-10T02:30:00.000Z"), + DoNotRunAfter = DateTimeOffset.Parse("2014-09-10T06:30:00.000Z"), + StartWindow = XmlConvert.ToTimeSpan("PT1M"), + RecurrenceInterval = XmlConvert.ToTimeSpan("PT5M"), }, new BatchJobSpecification(new BatchPoolInfo { - PoolId = "", AutoPoolSpecification = new BatchAutoPoolSpecification(BatchPoolLifetimeOption.JobSchedule) { - AutoPoolIdPrefix = "", - KeepAlive = true, - Pool = new BatchPoolSpecification("") + AutoPoolIdPrefix = "mypool", + Pool = new BatchPoolSpecification("Standard_D1_v2") { - DisplayName = "", - VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference - { - Publisher = "", - Offer = "", - Sku = "", - Version = "", - VirtualMachineImageId = "", - }, "") - { - WindowsConfiguration = new WindowsConfiguration - { - EnableAutomaticUpdates = true, - }, - DataDisks = {new DataDisk(1234, 1234) - { - Caching = CachingType.None, - StorageAccountType = StorageAccountType.StandardLRS, - }}, - LicenseType = "", - ContainerConfiguration = new ContainerConfiguration(ContainerType.DockerCompatible) - { - ContainerImageNames = { "" }, - ContainerRegistries = { default }, - }, - DiskEncryptionConfiguration = new DiskEncryptionConfiguration - { - Targets = { DiskEncryptionTarget.OsDisk }, - }, - NodePlacementConfiguration = new BatchNodePlacementConfiguration - { - Policy = BatchNodePlacementPolicyType.Regional, - }, - Extensions = {new VMExtension("", "", "") - { - TypeHandlerVersion = "", - AutoUpgradeMinorVersion = true, - EnableAutomaticUpgrade = true, - Settings = - { - ["key"] = "" - }, - ProtectedSettings = - { - ["key"] = "" - }, - ProvisionAfterExtensions = {""}, - }}, - OsDisk = new OSDisk - { - EphemeralOSDiskSettings = new DiffDiskSettings - { - Placement = DiffDiskPlacement.CacheDisk, - }, - Caching = CachingType.None, - DiskSizeGB = 1234, - ManagedDisk = new ManagedDisk(StorageAccountType.StandardLRS), - WriteAcceleratorEnabled = true, - }, - SecurityProfile = new SecurityProfile(true, SecurityTypes.TrustedLaunch, new UefiSettings - { - SecureBootEnabled = true, - VTpmEnabled = true, - }), - ServiceArtifactReference = new ServiceArtifactReference(""), - }, - TaskSlotsPerNode = 1234, + VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference + { + Publisher = "MicrosoftWindowsServer", + Offer = "WindowsServer", + Sku = "2016-datacenter-smalldisk", + Version = "latest", + }, "batch.node.windows amd64"), + TaskSlotsPerNode = 2, TaskSchedulingPolicy = new BatchTaskSchedulingPolicy(BatchNodeFillType.Spread), - ResizeTimeout = XmlConvert.ToTimeSpan("PT1H23M45S"), - ResourceTags = "", - TargetDedicatedNodes = 1234, - TargetLowPriorityNodes = 1234, - EnableAutoScale = true, - AutoScaleFormula = "", - AutoScaleEvaluationInterval = XmlConvert.ToTimeSpan("PT1H23M45S"), + ResizeTimeout = XmlConvert.ToTimeSpan("PT15M"), + TargetDedicatedNodes = 3, + TargetLowPriorityNodes = 0, + EnableAutoScale = false, EnableInterNodeCommunication = true, - NetworkConfiguration = new NetworkConfiguration + StartTask = new BatchStartTask("myprogram2.exe") { - SubnetId = "", - DynamicVNetAssignmentScope = DynamicVNetAssignmentScope.None, - EndpointConfiguration = new BatchPoolEndpointConfiguration(new InboundNatPool[] + ResourceFiles = {new ResourceFile { - new InboundNatPool("", InboundEndpointProtocol.Tcp, 1234, 1234, 1234) - { - NetworkSecurityGroupRules = {new NetworkSecurityGroupRule(1234, NetworkSecurityGroupRuleAccess.Allow, "") - { - SourcePortRanges = {""}, - }}, - } - }), - PublicIpAddressConfiguration = new PublicIpAddressConfiguration + HttpUrl = "http://mystorage1.blob.core.windows.net/scripts/myprogram2.exe?sas", + FilePath = "myprogram2.exe", + }}, + EnvironmentSettings = {new EnvironmentSetting("myvariable") + { + Value = "myvalue", + }}, + UserIdentity = new UserIdentity { - IpAddressProvisioningType = IpAddressProvisioningType.BatchManaged, - IpAddressIds = { "" }, + AutoUser = new AutoUserSpecification + { + Scope = AutoUserScope.Task, + ElevationLevel = ElevationLevel.Admin, + }, }, - EnableAcceleratedNetworking = true, - }, - StartTask = new BatchStartTask("") - { - ContainerSettings = default, - ResourceFiles = { default }, - EnvironmentSettings = { default }, - UserIdentity = default, - MaxTaskRetryCount = 1234, + MaxTaskRetryCount = 2, WaitForSuccess = true, }, - ApplicationPackageReferences = { default }, - UserAccounts = {new UserAccount("", "") - { - ElevationLevel = ElevationLevel.NonAdmin, - LinuxUserConfiguration = new LinuxUserConfiguration - { - Uid = 1234, - Gid = 1234, - SshPrivateKey = "", - }, - WindowsUserConfiguration = new WindowsUserConfiguration - { - LoginMode = LoginMode.Batch, - }, - }}, - Metadata = { new MetadataItem("", "") }, - MountConfiguration = {new MountConfiguration - { - AzureBlobFileSystemConfiguration = new AzureBlobFileSystemConfiguration("", "", "") - { - AccountKey = "", - SasKey = "", - BlobfuseOptions = "", - IdentityReference = default, - }, - NfsMountConfiguration = new NfsMountConfiguration("", "") - { - MountOptions = "", - }, - CifsMountConfiguration = new CifsMountConfiguration("", "", "", "") - { - MountOptions = "", - }, - AzureFileShareConfiguration = new AzureFileShareConfiguration("", "", "", "") - { - MountOptions = "", - }, - }}, + Metadata = { new MetadataItem("myproperty", "myvalue") }, TargetNodeCommunicationMode = BatchNodeCommunicationMode.Default, - UpgradePolicy = new UpgradePolicy(UpgradeMode.Automatic) - { - AutomaticOsUpgradePolicy = new AutomaticOsUpgradePolicy - { - DisableAutomaticRollback = true, - EnableAutomaticOsUpgrade = true, - UseRollingUpgradePolicy = true, - OsRollingUpgradeDeferral = true, - }, - RollingUpgradePolicy = new RollingUpgradePolicy - { - EnableCrossZoneUpgrade = true, - MaxBatchInstancePercent = 1234, - MaxUnhealthyInstancePercent = 1234, - MaxUnhealthyUpgradedInstancePercent = 1234, - PauseTimeBetweenBatches = XmlConvert.ToTimeSpan("PT1H23M45S"), - PrioritizeUnhealthyInstances = true, - RollbackFailedInstancesOnPolicyBreach = true, - }, - }, }, }, }) { - Priority = 1234, - AllowTaskPreemption = true, - MaxParallelTasks = 1234, - DisplayName = "", - UsesTaskDependencies = true, - OnAllTasksComplete = OnAllBatchTasksComplete.NoAction, - OnTaskFailure = OnBatchTaskFailure.NoAction, - NetworkConfiguration = new BatchJobNetworkConfiguration(""), + Priority = 100, Constraints = new BatchJobConstraints { - MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - MaxTaskRetryCount = 1234, + MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H"), + MaxTaskRetryCount = -1, }, - JobManagerTask = new BatchJobManagerTask("", "") + JobManagerTask = new BatchJobManagerTask("mytask1", "myprogram.exe") { - DisplayName = "", - ContainerSettings = new BatchTaskContainerSettings("") - { - ContainerRunOptions = "", - Registry = new ContainerRegistryReference - { - Username = "", - Password = "", - RegistryServer = "", - IdentityReference = new BatchNodeIdentityReference - { - ResourceId = "", - }, - }, - WorkingDirectory = ContainerWorkingDirectory.TaskWorkingDirectory, - }, ResourceFiles = {new ResourceFile { - AutoStorageContainerName = "", - StorageContainerUrl = "", - HttpUrl = "", - BlobPrefix = "", - FilePath = "", - FileMode = "", - IdentityReference = default, - }}, - OutputFiles = {new OutputFile("", new OutputFileDestination + HttpUrl = "http://mystorage1.blob.core.windows.net/scripts/myprogram.exe?sas", + FilePath = "myprogram.exe", + }, new ResourceFile { - Container = new OutputFileBlobContainerDestination("") - { - Path = "", - IdentityReference = default, - UploadHeaders = {new HttpHeader("") - { - Value = "", - }}, - }, - }, new OutputFileUploadConfig(OutputFileUploadCondition.TaskSuccess))}, - EnvironmentSettings = {new EnvironmentSetting("") + HttpUrl = "http://mystorage1.blob.core.windows.net/scripts/test.txt?sas", + FilePath = "test.txt", + }}, + EnvironmentSettings = {new EnvironmentSetting("myvariable") { - Value = "", + Value = "myvalue", }}, Constraints = new BatchTaskConstraints { - MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - RetentionTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - MaxTaskRetryCount = 1234, + MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H"), + RetentionTime = XmlConvert.ToTimeSpan("PT1H"), + MaxTaskRetryCount = 0, }, - RequiredSlots = 1234, + RequiredSlots = 2, KillJobOnCompletion = true, UserIdentity = new UserIdentity { - Username = "", AutoUser = new AutoUserSpecification { Scope = AutoUserScope.Task, @@ -11306,182 +3689,100 @@ BatchJobScheduleCreateContent jobSchedule = new BatchJobScheduleCreateContent("< }, }, RunExclusive = true, - ApplicationPackageReferences = {new BatchApplicationPackageReference("") - { - Version = "", - }}, - AuthenticationTokenSettings = new AuthenticationTokenSettings - { - Access = { AccessScope.Job }, - }, - AllowLowPriorityNode = true, - }, - JobPreparationTask = new BatchJobPreparationTask("") - { - Id = "", - ContainerSettings = default, - ResourceFiles = { default }, - EnvironmentSettings = { default }, - Constraints = default, - WaitForSuccess = true, - UserIdentity = default, - RerunOnNodeRebootAfterSuccess = true, - }, - JobReleaseTask = new BatchJobReleaseTask("") - { - Id = "", - ContainerSettings = default, - ResourceFiles = { default }, - EnvironmentSettings = { default }, - MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - RetentionTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - UserIdentity = default, }, - CommonEnvironmentSettings = { default }, - Metadata = { default }, }) { - DisplayName = "", - Metadata = { default }, + Metadata = { new MetadataItem("myproperty", "myvalue") }, }; -Response response = client.CreateJobSchedule(jobSchedule, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +Response response = client.CreateJobSchedule(jobSchedule); ]]> This sample shows how to call CreateJobScheduleAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - id = "", - schedule = new object(), + id = "jobScheduleId", + schedule = new + { + recurrenceInterval = "PT5M", + }, jobSpecification = new { - poolInfo = new object(), + poolInfo = new + { + poolId = "poolId", + }, }, }); Response response = await client.CreateJobScheduleAsync(content); Console.WriteLine(response.Status); ]]> -This sample shows how to call CreateJobScheduleAsync with all parameters and request content. +This sample shows how to call CreateJobScheduleAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - id = "", - displayName = "", + id = "jobScheduleId", schedule = new { - doNotRunUntil = "2022-05-10T18:57:31.2311892Z", - doNotRunAfter = "2022-05-10T18:57:31.2311892Z", - startWindow = "PT1H23M45S", - recurrenceInterval = "PT1H23M45S", + doNotRunUntil = "2014-09-10T02:30:00.000Z", + doNotRunAfter = "2014-09-10T06:30:00.000Z", + startWindow = "PT1M", + recurrenceInterval = "PT5M", }, jobSpecification = new { - priority = 1234, - allowTaskPreemption = true, - maxParallelTasks = 1234, - displayName = "", - usesTaskDependencies = true, - onAllTasksComplete = "noaction", - onTaskFailure = "noaction", - networkConfiguration = new - { - subnetId = "", - }, + priority = 100, constraints = new { - maxWallClockTime = "PT1H23M45S", - maxTaskRetryCount = 1234, + maxWallClockTime = "PT1H", + maxTaskRetryCount = -1, }, jobManagerTask = new { - id = "", - displayName = "", - commandLine = "", - containerSettings = new - { - containerRunOptions = "", - imageName = "", - registry = new - { - username = "", - password = "", - registryServer = "", - identityReference = new - { - resourceId = "", - }, - }, - workingDirectory = "taskWorkingDirectory", - }, + id = "mytask1", + commandLine = "myprogram.exe", resourceFiles = new object[] { new { - autoStorageContainerName = "", - storageContainerUrl = "", - httpUrl = "", - blobPrefix = "", - filePath = "", - fileMode = "", - } - }, - outputFiles = new object[] - { + httpUrl = "http://mystorage1.blob.core.windows.net/scripts/myprogram.exe?sas", + filePath = "myprogram.exe", + }, new { - filePattern = "", - destination = new - { - container = new - { - path = "", - containerUrl = "", - uploadHeaders = new object[] - { - new - { - name = "", - value = "", - } - }, - }, - }, - uploadOptions = new - { - uploadCondition = "tasksuccess", - }, + httpUrl = "http://mystorage1.blob.core.windows.net/scripts/test.txt?sas", + filePath = "test.txt", } }, environmentSettings = new object[] { new { - name = "", - value = "", + name = "myvariable", + value = "myvalue", } }, constraints = new { - maxWallClockTime = "PT1H23M45S", - retentionTime = "PT1H23M45S", - maxTaskRetryCount = 1234, + maxWallClockTime = "PT1H", + maxTaskRetryCount = 0, + retentionTime = "PT1H", }, - requiredSlots = 1234, + requiredSlots = 2, killJobOnCompletion = true, userIdentity = new { - username = "", autoUser = new { scope = "task", @@ -11489,343 +3790,90 @@ using RequestContent content = RequestContent.Create(new }, }, runExclusive = true, - applicationPackageReferences = new object[] - { - new - { - applicationId = "", - version = "", - } - }, - authenticationTokenSettings = new - { - access = new object[] - { - "job" - }, - }, - allowLowPriorityNode = true, - }, - jobPreparationTask = new - { - id = "", - commandLine = "", - resourceFiles = new object[] - { - null - }, - environmentSettings = new object[] - { - null - }, - waitForSuccess = true, - rerunOnNodeRebootAfterSuccess = true, - }, - jobReleaseTask = new - { - id = "", - commandLine = "", - resourceFiles = new object[] - { - null - }, - environmentSettings = new object[] - { - null - }, - maxWallClockTime = "PT1H23M45S", - retentionTime = "PT1H23M45S", - }, - commonEnvironmentSettings = new object[] - { - null }, poolInfo = new { - poolId = "", autoPoolSpecification = new { - autoPoolIdPrefix = "", + autoPoolIdPrefix = "mypool", poolLifetimeOption = "jobschedule", - keepAlive = true, pool = new { - displayName = "", - vmSize = "", + vmSize = "Standard_D1_v2", virtualMachineConfiguration = new { imageReference = new { - publisher = "", - offer = "", - sku = "", - version = "", - virtualMachineImageId = "", - }, - nodeAgentSKUId = "", - windowsConfiguration = new - { - enableAutomaticUpdates = true, - }, - dataDisks = new object[] - { - new - { - lun = 1234, - caching = "none", - diskSizeGB = 1234, - storageAccountType = "standard_lrs", - } - }, - licenseType = "", - containerConfiguration = new - { - type = "dockerCompatible", - containerImageNames = new object[] - { - "" - }, - containerRegistries = new object[] - { - null - }, - }, - diskEncryptionConfiguration = new - { - targets = new object[] - { - "osdisk" - }, - }, - nodePlacementConfiguration = new - { - policy = "regional", - }, - extensions = new object[] - { - new - { - name = "", - publisher = "", - type = "", - typeHandlerVersion = "", - autoUpgradeMinorVersion = true, - enableAutomaticUpgrade = true, - settings = new - { - key = "", - }, - protectedSettings = new - { - key = "", - }, - provisionAfterExtensions = new object[] - { - "" - }, - } - }, - osDisk = new - { - ephemeralOSDiskSettings = new - { - placement = "cachedisk", - }, - caching = "none", - diskSizeGB = 1234, - managedDisk = new - { - storageAccountType = "standard_lrs", - }, - writeAcceleratorEnabled = true, - }, - securityProfile = new - { - encryptionAtHost = true, - securityType = "trustedLaunch", - uefiSettings = new - { - secureBootEnabled = true, - vTpmEnabled = true, - }, - }, - serviceArtifactReference = new - { - id = "", + publisher = "MicrosoftWindowsServer", + offer = "WindowsServer", + sku = "2016-datacenter-smalldisk", + version = "latest", }, + nodeAgentSKUId = "batch.node.windows amd64", }, - taskSlotsPerNode = 1234, + resizeTimeout = "PT15M", + targetDedicatedNodes = 3, + targetLowPriorityNodes = 0, + taskSlotsPerNode = 2, taskSchedulingPolicy = new { nodeFillType = "spread", }, - resizeTimeout = "PT1H23M45S", - resourceTags = "", - targetDedicatedNodes = 1234, - targetLowPriorityNodes = 1234, - enableAutoScale = true, - autoScaleFormula = "", - autoScaleEvaluationInterval = "PT1H23M45S", + enableAutoScale = false, enableInterNodeCommunication = true, - networkConfiguration = new - { - subnetId = "", - dynamicVNetAssignmentScope = "none", - endpointConfiguration = new - { - inboundNATPools = new object[] - { - new - { - name = "", - protocol = "tcp", - backendPort = 1234, - frontendPortRangeStart = 1234, - frontendPortRangeEnd = 1234, - networkSecurityGroupRules = new object[] - { - new - { - priority = 1234, - access = "allow", - sourceAddressPrefix = "", - sourcePortRanges = new object[] - { - "" - }, - } - }, - } - }, - }, - publicIPAddressConfiguration = new - { - provision = "batchmanaged", - ipAddressIds = new object[] - { - "" - }, - }, - enableAcceleratedNetworking = true, - }, startTask = new { - commandLine = "", + commandLine = "myprogram2.exe", resourceFiles = new object[] { - null + new + { + httpUrl = "http://mystorage1.blob.core.windows.net/scripts/myprogram2.exe?sas", + filePath = "myprogram2.exe", + } }, environmentSettings = new object[] { - null + new + { + name = "myvariable", + value = "myvalue", + } }, - maxTaskRetryCount = 1234, - waitForSuccess = true, - }, - applicationPackageReferences = new object[] - { - null - }, - userAccounts = new object[] - { - new + userIdentity = new { - name = "", - password = "", - elevationLevel = "nonadmin", - linuxUserConfiguration = new + autoUser = new { - uid = 1234, - gid = 1234, - sshPrivateKey = "", + scope = "task", + elevationLevel = "admin", }, - windowsUserConfiguration = new - { - loginMode = "batch", - }, - } + }, + maxTaskRetryCount = 2, + waitForSuccess = true, }, metadata = new object[] { new { - name = "", - value = "", - } - }, - mountConfiguration = new object[] - { - new - { - azureBlobFileSystemConfiguration = new - { - accountName = "", - containerName = "", - accountKey = "", - sasKey = "", - blobfuseOptions = "", - relativeMountPath = "", - }, - nfsMountConfiguration = new - { - source = "", - relativeMountPath = "", - mountOptions = "", - }, - cifsMountConfiguration = new - { - username = "", - source = "", - relativeMountPath = "", - mountOptions = "", - password = "", - }, - azureFileShareConfiguration = new - { - accountName = "", - azureFileUrl = "", - accountKey = "", - relativeMountPath = "", - mountOptions = "", - }, + name = "myproperty", + value = "myvalue", } }, targetNodeCommunicationMode = "default", - upgradePolicy = new - { - mode = "automatic", - automaticOSUpgradePolicy = new - { - disableAutomaticRollback = true, - enableAutomaticOSUpgrade = true, - useRollingUpgradePolicy = true, - osRollingUpgradeDeferral = true, - }, - rollingUpgradePolicy = new - { - enableCrossZoneUpgrade = true, - maxBatchInstancePercent = 1234, - maxUnhealthyInstancePercent = 1234, - maxUnhealthyUpgradedInstancePercent = 1234, - pauseTimeBetweenBatches = "PT1H23M45S", - prioritizeUnhealthyInstances = true, - rollbackFailedInstancesOnPolicyBreach = true, - }, - }, }, }, }, - metadata = new object[] - { - null - }, }, metadata = new object[] { - null + new + { + name = "myproperty", + value = "myvalue", + } }, }); -Response response = await client.CreateJobScheduleAsync(content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +Response response = await client.CreateJobScheduleAsync(content); Console.WriteLine(response.Status); ]]> @@ -11834,137 +3882,88 @@ Console.WriteLine(response.Status); This sample shows how to call CreateJobSchedule. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - id = "", - schedule = new object(), + id = "jobScheduleId", + schedule = new + { + recurrenceInterval = "PT5M", + }, jobSpecification = new { - poolInfo = new object(), + poolInfo = new + { + poolId = "poolId", + }, }, }); Response response = client.CreateJobSchedule(content); Console.WriteLine(response.Status); ]]> -This sample shows how to call CreateJobSchedule with all parameters and request content. +This sample shows how to call CreateJobSchedule. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - id = "", - displayName = "", + id = "jobScheduleId", schedule = new { - doNotRunUntil = "2022-05-10T18:57:31.2311892Z", - doNotRunAfter = "2022-05-10T18:57:31.2311892Z", - startWindow = "PT1H23M45S", - recurrenceInterval = "PT1H23M45S", + doNotRunUntil = "2014-09-10T02:30:00.000Z", + doNotRunAfter = "2014-09-10T06:30:00.000Z", + startWindow = "PT1M", + recurrenceInterval = "PT5M", }, jobSpecification = new { - priority = 1234, - allowTaskPreemption = true, - maxParallelTasks = 1234, - displayName = "", - usesTaskDependencies = true, - onAllTasksComplete = "noaction", - onTaskFailure = "noaction", - networkConfiguration = new - { - subnetId = "", - }, + priority = 100, constraints = new { - maxWallClockTime = "PT1H23M45S", - maxTaskRetryCount = 1234, + maxWallClockTime = "PT1H", + maxTaskRetryCount = -1, }, jobManagerTask = new { - id = "", - displayName = "", - commandLine = "", - containerSettings = new - { - containerRunOptions = "", - imageName = "", - registry = new - { - username = "", - password = "", - registryServer = "", - identityReference = new - { - resourceId = "", - }, - }, - workingDirectory = "taskWorkingDirectory", - }, + id = "mytask1", + commandLine = "myprogram.exe", resourceFiles = new object[] { new { - autoStorageContainerName = "", - storageContainerUrl = "", - httpUrl = "", - blobPrefix = "", - filePath = "", - fileMode = "", - } - }, - outputFiles = new object[] - { + httpUrl = "http://mystorage1.blob.core.windows.net/scripts/myprogram.exe?sas", + filePath = "myprogram.exe", + }, new { - filePattern = "", - destination = new - { - container = new - { - path = "", - containerUrl = "", - uploadHeaders = new object[] - { - new - { - name = "", - value = "", - } - }, - }, - }, - uploadOptions = new - { - uploadCondition = "tasksuccess", - }, + httpUrl = "http://mystorage1.blob.core.windows.net/scripts/test.txt?sas", + filePath = "test.txt", } }, environmentSettings = new object[] { new { - name = "", - value = "", + name = "myvariable", + value = "myvalue", } }, constraints = new { - maxWallClockTime = "PT1H23M45S", - retentionTime = "PT1H23M45S", - maxTaskRetryCount = 1234, + maxWallClockTime = "PT1H", + maxTaskRetryCount = 0, + retentionTime = "PT1H", }, - requiredSlots = 1234, + requiredSlots = 2, killJobOnCompletion = true, userIdentity = new { - username = "", autoUser = new { scope = "task", @@ -11972,343 +3971,90 @@ using RequestContent content = RequestContent.Create(new }, }, runExclusive = true, - applicationPackageReferences = new object[] - { - new - { - applicationId = "", - version = "", - } - }, - authenticationTokenSettings = new - { - access = new object[] - { - "job" - }, - }, - allowLowPriorityNode = true, - }, - jobPreparationTask = new - { - id = "", - commandLine = "", - resourceFiles = new object[] - { - null - }, - environmentSettings = new object[] - { - null - }, - waitForSuccess = true, - rerunOnNodeRebootAfterSuccess = true, - }, - jobReleaseTask = new - { - id = "", - commandLine = "", - resourceFiles = new object[] - { - null - }, - environmentSettings = new object[] - { - null - }, - maxWallClockTime = "PT1H23M45S", - retentionTime = "PT1H23M45S", - }, - commonEnvironmentSettings = new object[] - { - null }, poolInfo = new { - poolId = "", autoPoolSpecification = new { - autoPoolIdPrefix = "", + autoPoolIdPrefix = "mypool", poolLifetimeOption = "jobschedule", - keepAlive = true, pool = new { - displayName = "", - vmSize = "", + vmSize = "Standard_D1_v2", virtualMachineConfiguration = new { imageReference = new { - publisher = "", - offer = "", - sku = "", - version = "", - virtualMachineImageId = "", - }, - nodeAgentSKUId = "", - windowsConfiguration = new - { - enableAutomaticUpdates = true, - }, - dataDisks = new object[] - { - new - { - lun = 1234, - caching = "none", - diskSizeGB = 1234, - storageAccountType = "standard_lrs", - } - }, - licenseType = "", - containerConfiguration = new - { - type = "dockerCompatible", - containerImageNames = new object[] - { - "" - }, - containerRegistries = new object[] - { - null - }, - }, - diskEncryptionConfiguration = new - { - targets = new object[] - { - "osdisk" - }, - }, - nodePlacementConfiguration = new - { - policy = "regional", - }, - extensions = new object[] - { - new - { - name = "", - publisher = "", - type = "", - typeHandlerVersion = "", - autoUpgradeMinorVersion = true, - enableAutomaticUpgrade = true, - settings = new - { - key = "", - }, - protectedSettings = new - { - key = "", - }, - provisionAfterExtensions = new object[] - { - "" - }, - } - }, - osDisk = new - { - ephemeralOSDiskSettings = new - { - placement = "cachedisk", - }, - caching = "none", - diskSizeGB = 1234, - managedDisk = new - { - storageAccountType = "standard_lrs", - }, - writeAcceleratorEnabled = true, - }, - securityProfile = new - { - encryptionAtHost = true, - securityType = "trustedLaunch", - uefiSettings = new - { - secureBootEnabled = true, - vTpmEnabled = true, - }, - }, - serviceArtifactReference = new - { - id = "", + publisher = "MicrosoftWindowsServer", + offer = "WindowsServer", + sku = "2016-datacenter-smalldisk", + version = "latest", }, + nodeAgentSKUId = "batch.node.windows amd64", }, - taskSlotsPerNode = 1234, + resizeTimeout = "PT15M", + targetDedicatedNodes = 3, + targetLowPriorityNodes = 0, + taskSlotsPerNode = 2, taskSchedulingPolicy = new { nodeFillType = "spread", }, - resizeTimeout = "PT1H23M45S", - resourceTags = "", - targetDedicatedNodes = 1234, - targetLowPriorityNodes = 1234, - enableAutoScale = true, - autoScaleFormula = "", - autoScaleEvaluationInterval = "PT1H23M45S", + enableAutoScale = false, enableInterNodeCommunication = true, - networkConfiguration = new - { - subnetId = "", - dynamicVNetAssignmentScope = "none", - endpointConfiguration = new - { - inboundNATPools = new object[] - { - new - { - name = "", - protocol = "tcp", - backendPort = 1234, - frontendPortRangeStart = 1234, - frontendPortRangeEnd = 1234, - networkSecurityGroupRules = new object[] - { - new - { - priority = 1234, - access = "allow", - sourceAddressPrefix = "", - sourcePortRanges = new object[] - { - "" - }, - } - }, - } - }, - }, - publicIPAddressConfiguration = new - { - provision = "batchmanaged", - ipAddressIds = new object[] - { - "" - }, - }, - enableAcceleratedNetworking = true, - }, startTask = new { - commandLine = "", + commandLine = "myprogram2.exe", resourceFiles = new object[] { - null + new + { + httpUrl = "http://mystorage1.blob.core.windows.net/scripts/myprogram2.exe?sas", + filePath = "myprogram2.exe", + } }, environmentSettings = new object[] { - null + new + { + name = "myvariable", + value = "myvalue", + } }, - maxTaskRetryCount = 1234, - waitForSuccess = true, - }, - applicationPackageReferences = new object[] - { - null - }, - userAccounts = new object[] - { - new + userIdentity = new { - name = "", - password = "", - elevationLevel = "nonadmin", - linuxUserConfiguration = new - { - uid = 1234, - gid = 1234, - sshPrivateKey = "", - }, - windowsUserConfiguration = new + autoUser = new { - loginMode = "batch", + scope = "task", + elevationLevel = "admin", }, - } + }, + maxTaskRetryCount = 2, + waitForSuccess = true, }, metadata = new object[] { new { - name = "", - value = "", - } - }, - mountConfiguration = new object[] - { - new - { - azureBlobFileSystemConfiguration = new - { - accountName = "", - containerName = "", - accountKey = "", - sasKey = "", - blobfuseOptions = "", - relativeMountPath = "", - }, - nfsMountConfiguration = new - { - source = "", - relativeMountPath = "", - mountOptions = "", - }, - cifsMountConfiguration = new - { - username = "", - source = "", - relativeMountPath = "", - mountOptions = "", - password = "", - }, - azureFileShareConfiguration = new - { - accountName = "", - azureFileUrl = "", - accountKey = "", - relativeMountPath = "", - mountOptions = "", - }, + name = "myproperty", + value = "myvalue", } }, targetNodeCommunicationMode = "default", - upgradePolicy = new - { - mode = "automatic", - automaticOSUpgradePolicy = new - { - disableAutomaticRollback = true, - enableAutomaticOSUpgrade = true, - useRollingUpgradePolicy = true, - osRollingUpgradeDeferral = true, - }, - rollingUpgradePolicy = new - { - enableCrossZoneUpgrade = true, - maxBatchInstancePercent = 1234, - maxUnhealthyInstancePercent = 1234, - maxUnhealthyUpgradedInstancePercent = 1234, - pauseTimeBetweenBatches = "PT1H23M45S", - prioritizeUnhealthyInstances = true, - rollbackFailedInstancesOnPolicyBreach = true, - }, - }, }, }, }, - metadata = new object[] - { - null - }, }, metadata = new object[] { - null + new + { + name = "myproperty", + value = "myvalue", + } }, }); -Response response = client.CreateJobSchedule(content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +Response response = client.CreateJobSchedule(content); Console.WriteLine(response.Status); ]]> @@ -12317,404 +4063,244 @@ Console.WriteLine(response.Status); This sample shows how to call CreateTaskAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -BatchTaskCreateContent task = new BatchTaskCreateContent("", ""); -Response response = await client.CreateTaskAsync("", task); +BatchTaskCreateContent task = new BatchTaskCreateContent("task1", "cmd /c echo task1"); +Response response = await client.CreateTaskAsync("jobId", task); ]]> -This sample shows how to call CreateTaskAsync with all parameters. +This sample shows how to call CreateTaskAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -BatchTaskCreateContent task = new BatchTaskCreateContent("", "") +BatchTaskCreateContent task = new BatchTaskCreateContent("taskId", "bash -c 'echo hello'") { - DisplayName = "", - ExitConditions = new ExitConditions + ContainerSettings = new BatchTaskContainerSettings("ubuntu") { - ExitCodes = {new ExitCodeMapping(1234, new ExitOptions - { - JobAction = BatchJobAction.None, - DependencyAction = DependencyAction.Satisfy, - })}, - ExitCodeRanges = { new ExitCodeRangeMapping(1234, 1234, default) }, - PreProcessingError = default, - FileUploadError = default, - Default = default, + ContainerRunOptions = "--rm", }, - ContainerSettings = new BatchTaskContainerSettings("") + UserIdentity = new UserIdentity { - ContainerRunOptions = "", - Registry = new ContainerRegistryReference + AutoUser = new AutoUserSpecification { - Username = "", - Password = "", - RegistryServer = "", - IdentityReference = new BatchNodeIdentityReference - { - ResourceId = "", - }, + Scope = AutoUserScope.Task, + ElevationLevel = ElevationLevel.NonAdmin, }, - WorkingDirectory = ContainerWorkingDirectory.TaskWorkingDirectory, }, - ResourceFiles = {new ResourceFile - { - AutoStorageContainerName = "", - StorageContainerUrl = "", - HttpUrl = "", - BlobPrefix = "", - FilePath = "", - FileMode = "", - IdentityReference = default, - }}, - OutputFiles = {new OutputFile("", new OutputFileDestination +}; +Response response = await client.CreateTaskAsync("jobId", task); +]]> +This sample shows how to call CreateTaskAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchTaskCreateContent task = new BatchTaskCreateContent("taskId", "cmd /c exit 3") +{ + ExitConditions = new ExitConditions { - Container = new OutputFileBlobContainerDestination("") + ExitCodeRanges = {new ExitCodeRangeMapping(2, 4, new ExitOptions { - Path = "", - IdentityReference = default, - UploadHeaders = {new HttpHeader("") - { - Value = "", - }}, - }, - }, new OutputFileUploadConfig(OutputFileUploadCondition.TaskSuccess))}, - EnvironmentSettings = {new EnvironmentSetting("") - { - Value = "", - }}, - AffinityInfo = new AffinityInfo(""), - Constraints = new BatchTaskConstraints - { - MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - RetentionTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - MaxTaskRetryCount = 1234, + JobAction = BatchJobAction.Terminate, + })}, }, - RequiredSlots = 1234, UserIdentity = new UserIdentity { - Username = "", AutoUser = new AutoUserSpecification { Scope = AutoUserScope.Task, ElevationLevel = ElevationLevel.NonAdmin, }, }, - MultiInstanceSettings = new MultiInstanceSettings("") - { - NumberOfInstances = 1234, - CommonResourceFiles = { default }, - }, - DependsOn = new BatchTaskDependencies - { - TaskIds = { "" }, - TaskIdRanges = { new BatchTaskIdRange(1234, 1234) }, - }, - ApplicationPackageReferences = {new BatchApplicationPackageReference("") - { - Version = "", - }}, - AuthenticationTokenSettings = new AuthenticationTokenSettings - { - Access = { AccessScope.Job }, - }, }; -Response response = await client.CreateTaskAsync("", task, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +Response response = await client.CreateTaskAsync("jobId", task); +]]> +This sample shows how to call CreateTaskAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchTaskCreateContent task = new BatchTaskCreateContent("task1", "cmd /c echo task1") +{ + RequiredSlots = 2, +}; +Response response = await client.CreateTaskAsync("jobId", task); ]]> This sample shows how to call CreateTask. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -BatchTaskCreateContent task = new BatchTaskCreateContent("", ""); -Response response = client.CreateTask("", task); +BatchTaskCreateContent task = new BatchTaskCreateContent("task1", "cmd /c echo task1"); +Response response = client.CreateTask("jobId", task); ]]> -This sample shows how to call CreateTask with all parameters. +This sample shows how to call CreateTask. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -BatchTaskCreateContent task = new BatchTaskCreateContent("", "") +BatchTaskCreateContent task = new BatchTaskCreateContent("taskId", "bash -c 'echo hello'") { - DisplayName = "", - ExitConditions = new ExitConditions + ContainerSettings = new BatchTaskContainerSettings("ubuntu") { - ExitCodes = {new ExitCodeMapping(1234, new ExitOptions - { - JobAction = BatchJobAction.None, - DependencyAction = DependencyAction.Satisfy, - })}, - ExitCodeRanges = { new ExitCodeRangeMapping(1234, 1234, default) }, - PreProcessingError = default, - FileUploadError = default, - Default = default, + ContainerRunOptions = "--rm", }, - ContainerSettings = new BatchTaskContainerSettings("") + UserIdentity = new UserIdentity { - ContainerRunOptions = "", - Registry = new ContainerRegistryReference + AutoUser = new AutoUserSpecification { - Username = "", - Password = "", - RegistryServer = "", - IdentityReference = new BatchNodeIdentityReference - { - ResourceId = "", - }, + Scope = AutoUserScope.Task, + ElevationLevel = ElevationLevel.NonAdmin, }, - WorkingDirectory = ContainerWorkingDirectory.TaskWorkingDirectory, }, - ResourceFiles = {new ResourceFile - { - AutoStorageContainerName = "", - StorageContainerUrl = "", - HttpUrl = "", - BlobPrefix = "", - FilePath = "", - FileMode = "", - IdentityReference = default, - }}, - OutputFiles = {new OutputFile("", new OutputFileDestination +}; +Response response = client.CreateTask("jobId", task); +]]> +This sample shows how to call CreateTask. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchTaskCreateContent task = new BatchTaskCreateContent("taskId", "cmd /c exit 3") +{ + ExitConditions = new ExitConditions { - Container = new OutputFileBlobContainerDestination("") + ExitCodeRanges = {new ExitCodeRangeMapping(2, 4, new ExitOptions { - Path = "", - IdentityReference = default, - UploadHeaders = {new HttpHeader("") - { - Value = "", - }}, - }, - }, new OutputFileUploadConfig(OutputFileUploadCondition.TaskSuccess))}, - EnvironmentSettings = {new EnvironmentSetting("") - { - Value = "", - }}, - AffinityInfo = new AffinityInfo(""), - Constraints = new BatchTaskConstraints - { - MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - RetentionTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - MaxTaskRetryCount = 1234, + JobAction = BatchJobAction.Terminate, + })}, }, - RequiredSlots = 1234, UserIdentity = new UserIdentity { - Username = "", AutoUser = new AutoUserSpecification { Scope = AutoUserScope.Task, ElevationLevel = ElevationLevel.NonAdmin, }, }, - MultiInstanceSettings = new MultiInstanceSettings("") - { - NumberOfInstances = 1234, - CommonResourceFiles = { default }, - }, - DependsOn = new BatchTaskDependencies - { - TaskIds = { "" }, - TaskIdRanges = { new BatchTaskIdRange(1234, 1234) }, - }, - ApplicationPackageReferences = {new BatchApplicationPackageReference("") - { - Version = "", - }}, - AuthenticationTokenSettings = new AuthenticationTokenSettings - { - Access = { AccessScope.Job }, - }, }; -Response response = client.CreateTask("", task, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +Response response = client.CreateTask("jobId", task); +]]> +This sample shows how to call CreateTask. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchTaskCreateContent task = new BatchTaskCreateContent("task1", "cmd /c echo task1") +{ + RequiredSlots = 2, +}; +Response response = client.CreateTask("jobId", task); ]]> This sample shows how to call CreateTaskAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - id = "", - commandLine = "", + id = "task1", + commandLine = "cmd /c echo task1", }); -Response response = await client.CreateTaskAsync("", content); +Response response = await client.CreateTaskAsync("jobId", content); Console.WriteLine(response.Status); ]]> -This sample shows how to call CreateTaskAsync with all parameters and request content. +This sample shows how to call CreateTaskAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - id = "", - displayName = "", - exitConditions = new Dictionary - { - ["exitCodes"] = new object[] - { - new - { - code = 1234, - exitOptions = new - { - jobAction = "none", - dependencyAction = "satisfy", - }, - } - }, - ["exitCodeRanges"] = new object[] - { - new - { - start = 1234, - end = 1234, - } - }, - ["preProcessingError"] = null, - ["fileUploadError"] = null, - ["default"] = null - }, - commandLine = "", + id = "taskId", + commandLine = "bash -c 'echo hello'", containerSettings = new { - containerRunOptions = "", - imageName = "", - registry = new - { - username = "", - password = "", - registryServer = "", - identityReference = new - { - resourceId = "", - }, - }, - workingDirectory = "taskWorkingDirectory", - }, - resourceFiles = new object[] - { - new - { - autoStorageContainerName = "", - storageContainerUrl = "", - httpUrl = "", - blobPrefix = "", - filePath = "", - fileMode = "", - } - }, - outputFiles = new object[] - { - new - { - filePattern = "", - destination = new - { - container = new - { - path = "", - containerUrl = "", - uploadHeaders = new object[] - { - new - { - name = "", - value = "", - } - }, - }, - }, - uploadOptions = new - { - uploadCondition = "tasksuccess", - }, - } - }, - environmentSettings = new object[] - { - new - { - name = "", - value = "", - } - }, - affinityInfo = new - { - affinityId = "", - }, - constraints = new - { - maxWallClockTime = "PT1H23M45S", - retentionTime = "PT1H23M45S", - maxTaskRetryCount = 1234, + imageName = "ubuntu", + containerRunOptions = "--rm", }, - requiredSlots = 1234, userIdentity = new { - username = "", autoUser = new { scope = "task", elevationLevel = "nonadmin", }, }, - multiInstanceSettings = new - { - numberOfInstances = 1234, - coordinationCommandLine = "", - commonResourceFiles = new object[] - { - null - }, - }, - dependsOn = new +}); +Response response = await client.CreateTaskAsync("jobId", content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call CreateTaskAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + id = "taskId", + commandLine = "cmd /c exit 3", + exitConditions = new { - taskIds = new object[] - { - "" - }, - taskIdRanges = new object[] + exitCodeRanges = new object[] { new { - start = 1234, - end = 1234, + start = 2, + end = 4, + exitOptions = new + { + jobAction = "terminate", + }, } }, }, - applicationPackageReferences = new object[] - { - new - { - applicationId = "", - version = "", - } - }, - authenticationTokenSettings = new + userIdentity = new { - access = new object[] + autoUser = new { - "job" + scope = "task", + elevationLevel = "nonadmin", }, }, }); -Response response = await client.CreateTaskAsync("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +Response response = await client.CreateTaskAsync("jobId", content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call CreateTaskAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + id = "task1", + requiredSlots = 2, + commandLine = "cmd /c echo task1", +}); +Response response = await client.CreateTaskAsync("jobId", content); Console.WriteLine(response.Status); ]]> @@ -12723,180 +4309,98 @@ Console.WriteLine(response.Status); This sample shows how to call CreateTask. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - id = "", - commandLine = "", + id = "task1", + commandLine = "cmd /c echo task1", }); -Response response = client.CreateTask("", content); +Response response = client.CreateTask("jobId", content); Console.WriteLine(response.Status); ]]> -This sample shows how to call CreateTask with all parameters and request content. +This sample shows how to call CreateTask. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - id = "", - displayName = "", - exitConditions = new Dictionary - { - ["exitCodes"] = new object[] - { - new - { - code = 1234, - exitOptions = new - { - jobAction = "none", - dependencyAction = "satisfy", - }, - } - }, - ["exitCodeRanges"] = new object[] - { - new - { - start = 1234, - end = 1234, - } - }, - ["preProcessingError"] = null, - ["fileUploadError"] = null, - ["default"] = null - }, - commandLine = "", + id = "taskId", + commandLine = "bash -c 'echo hello'", containerSettings = new { - containerRunOptions = "", - imageName = "", - registry = new - { - username = "", - password = "", - registryServer = "", - identityReference = new - { - resourceId = "", - }, - }, - workingDirectory = "taskWorkingDirectory", - }, - resourceFiles = new object[] - { - new - { - autoStorageContainerName = "", - storageContainerUrl = "", - httpUrl = "", - blobPrefix = "", - filePath = "", - fileMode = "", - } - }, - outputFiles = new object[] - { - new - { - filePattern = "", - destination = new - { - container = new - { - path = "", - containerUrl = "", - uploadHeaders = new object[] - { - new - { - name = "", - value = "", - } - }, - }, - }, - uploadOptions = new - { - uploadCondition = "tasksuccess", - }, - } - }, - environmentSettings = new object[] - { - new - { - name = "", - value = "", - } - }, - affinityInfo = new - { - affinityId = "", - }, - constraints = new - { - maxWallClockTime = "PT1H23M45S", - retentionTime = "PT1H23M45S", - maxTaskRetryCount = 1234, + imageName = "ubuntu", + containerRunOptions = "--rm", }, - requiredSlots = 1234, userIdentity = new { - username = "", autoUser = new { scope = "task", elevationLevel = "nonadmin", }, }, - multiInstanceSettings = new - { - numberOfInstances = 1234, - coordinationCommandLine = "", - commonResourceFiles = new object[] - { - null - }, - }, - dependsOn = new +}); +Response response = client.CreateTask("jobId", content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call CreateTask. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + id = "taskId", + commandLine = "cmd /c exit 3", + exitConditions = new { - taskIds = new object[] - { - "" - }, - taskIdRanges = new object[] + exitCodeRanges = new object[] { new { - start = 1234, - end = 1234, + start = 2, + end = 4, + exitOptions = new + { + jobAction = "terminate", + }, } }, }, - applicationPackageReferences = new object[] - { - new - { - applicationId = "", - version = "", - } - }, - authenticationTokenSettings = new + userIdentity = new { - access = new object[] + autoUser = new { - "job" + scope = "task", + elevationLevel = "nonadmin", }, }, }); -Response response = client.CreateTask("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +Response response = client.CreateTask("jobId", content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call CreateTask. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + id = "task1", + requiredSlots = 2, + commandLine = "cmd /c echo task1", +}); +Response response = client.CreateTask("jobId", content); Console.WriteLine(response.Status); ]]> @@ -12905,243 +4409,127 @@ Console.WriteLine(response.Status); This sample shows how to call CreateTaskCollectionAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); BatchTaskGroup taskCollection = new BatchTaskGroup(new BatchTaskCreateContent[] { - new BatchTaskCreateContent("", "") + new BatchTaskCreateContent("simple1", "cmd /c dir /s"), + new BatchTaskCreateContent("simple2", "cmd /c dir /s") }); -Response response = await client.CreateTaskCollectionAsync("", taskCollection); +Response response = await client.CreateTaskCollectionAsync("jobId", taskCollection); ]]> -This sample shows how to call CreateTaskCollectionAsync with all parameters. +This sample shows how to call CreateTaskCollectionAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); BatchTaskGroup taskCollection = new BatchTaskGroup(new BatchTaskCreateContent[] { - new BatchTaskCreateContent("", "") + new BatchTaskCreateContent("complex1", "cmd /c dir /s") { - DisplayName = "", - ExitConditions = new ExitConditions - { - ExitCodes = {new ExitCodeMapping(1234, new ExitOptions - { - JobAction = BatchJobAction.None, - DependencyAction = DependencyAction.Satisfy, - })}, - ExitCodeRanges = {new ExitCodeRangeMapping(1234, 1234, default)}, - PreProcessingError = default, - FileUploadError = default, - Default = default, - }, - ContainerSettings = new BatchTaskContainerSettings("") - { - ContainerRunOptions = "", - Registry = new ContainerRegistryReference - { - Username = "", - Password = "", - RegistryServer = "", - IdentityReference = new BatchNodeIdentityReference - { - ResourceId = "", - }, - }, - WorkingDirectory = ContainerWorkingDirectory.TaskWorkingDirectory, - }, ResourceFiles = {new ResourceFile { - AutoStorageContainerName = "", - StorageContainerUrl = "", - HttpUrl = "", - BlobPrefix = "", - FilePath = "", - FileMode = "", - IdentityReference = default, + AutoStorageContainerName = "containerName", + FilePath = "data", }}, - OutputFiles = {new OutputFile("", new OutputFileDestination + EnvironmentSettings = {new EnvironmentSetting("env1") { - Container = new OutputFileBlobContainerDestination("") - { - Path = "", - IdentityReference = default, - UploadHeaders = {new HttpHeader("") - { - Value = "", - }}, - }, - }, new OutputFileUploadConfig(OutputFileUploadCondition.TaskSuccess))}, - EnvironmentSettings = {new EnvironmentSetting("") + Value = "value1", + }, new EnvironmentSetting("env2") { - Value = "", + Value = "value2", }}, - AffinityInfo = new AffinityInfo(""), + AffinityInfo = new AffinityInfo("affinityId"), Constraints = new BatchTaskConstraints { - MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - RetentionTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - MaxTaskRetryCount = 1234, + MaxWallClockTime = XmlConvert.ToTimeSpan("P1D"), + RetentionTime = XmlConvert.ToTimeSpan("P2D"), + MaxTaskRetryCount = 5, }, - RequiredSlots = 1234, - UserIdentity = new UserIdentity + RequiredSlots = 2, + MultiInstanceSettings = new MultiInstanceSettings("cmd /c echo coordinating") { - Username = "", - AutoUser = new AutoUserSpecification + NumberOfInstances = 3, + CommonResourceFiles = {new ResourceFile { - Scope = AutoUserScope.Task, - ElevationLevel = ElevationLevel.NonAdmin, - }, - }, - MultiInstanceSettings = new MultiInstanceSettings("") - { - NumberOfInstances = 1234, - CommonResourceFiles = {default}, - }, - DependsOn = new BatchTaskDependencies - { - TaskIds = {""}, - TaskIdRanges = {new BatchTaskIdRange(1234, 1234)}, - }, - ApplicationPackageReferences = {new BatchApplicationPackageReference("") - { - Version = "", - }}, - AuthenticationTokenSettings = new AuthenticationTokenSettings - { - Access = {AccessScope.Job}, + HttpUrl = "https://common.blob.core.windows.net/", + FilePath = "common.exe", + }}, }, - } + }, + new BatchTaskCreateContent("simple3", "cmd /c dir /s") }); -Response response = await client.CreateTaskCollectionAsync("", taskCollection, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +Response response = await client.CreateTaskCollectionAsync("jobId", taskCollection); ]]> This sample shows how to call CreateTaskCollection. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); BatchTaskGroup taskCollection = new BatchTaskGroup(new BatchTaskCreateContent[] { - new BatchTaskCreateContent("", "") + new BatchTaskCreateContent("simple1", "cmd /c dir /s"), + new BatchTaskCreateContent("simple2", "cmd /c dir /s") }); -Response response = client.CreateTaskCollection("", taskCollection); +Response response = client.CreateTaskCollection("jobId", taskCollection); ]]> -This sample shows how to call CreateTaskCollection with all parameters. +This sample shows how to call CreateTaskCollection. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); BatchTaskGroup taskCollection = new BatchTaskGroup(new BatchTaskCreateContent[] { - new BatchTaskCreateContent("", "") + new BatchTaskCreateContent("complex1", "cmd /c dir /s") { - DisplayName = "", - ExitConditions = new ExitConditions - { - ExitCodes = {new ExitCodeMapping(1234, new ExitOptions - { - JobAction = BatchJobAction.None, - DependencyAction = DependencyAction.Satisfy, - })}, - ExitCodeRanges = {new ExitCodeRangeMapping(1234, 1234, default)}, - PreProcessingError = default, - FileUploadError = default, - Default = default, - }, - ContainerSettings = new BatchTaskContainerSettings("") - { - ContainerRunOptions = "", - Registry = new ContainerRegistryReference - { - Username = "", - Password = "", - RegistryServer = "", - IdentityReference = new BatchNodeIdentityReference - { - ResourceId = "", - }, - }, - WorkingDirectory = ContainerWorkingDirectory.TaskWorkingDirectory, - }, ResourceFiles = {new ResourceFile { - AutoStorageContainerName = "", - StorageContainerUrl = "", - HttpUrl = "", - BlobPrefix = "", - FilePath = "", - FileMode = "", - IdentityReference = default, + AutoStorageContainerName = "containerName", + FilePath = "data", }}, - OutputFiles = {new OutputFile("", new OutputFileDestination + EnvironmentSettings = {new EnvironmentSetting("env1") { - Container = new OutputFileBlobContainerDestination("") - { - Path = "", - IdentityReference = default, - UploadHeaders = {new HttpHeader("") - { - Value = "", - }}, - }, - }, new OutputFileUploadConfig(OutputFileUploadCondition.TaskSuccess))}, - EnvironmentSettings = {new EnvironmentSetting("") + Value = "value1", + }, new EnvironmentSetting("env2") { - Value = "", + Value = "value2", }}, - AffinityInfo = new AffinityInfo(""), + AffinityInfo = new AffinityInfo("affinityId"), Constraints = new BatchTaskConstraints { - MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - RetentionTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - MaxTaskRetryCount = 1234, + MaxWallClockTime = XmlConvert.ToTimeSpan("P1D"), + RetentionTime = XmlConvert.ToTimeSpan("P2D"), + MaxTaskRetryCount = 5, }, - RequiredSlots = 1234, - UserIdentity = new UserIdentity + RequiredSlots = 2, + MultiInstanceSettings = new MultiInstanceSettings("cmd /c echo coordinating") { - Username = "", - AutoUser = new AutoUserSpecification + NumberOfInstances = 3, + CommonResourceFiles = {new ResourceFile { - Scope = AutoUserScope.Task, - ElevationLevel = ElevationLevel.NonAdmin, - }, - }, - MultiInstanceSettings = new MultiInstanceSettings("") - { - NumberOfInstances = 1234, - CommonResourceFiles = {default}, - }, - DependsOn = new BatchTaskDependencies - { - TaskIds = {""}, - TaskIdRanges = {new BatchTaskIdRange(1234, 1234)}, - }, - ApplicationPackageReferences = {new BatchApplicationPackageReference("") - { - Version = "", - }}, - AuthenticationTokenSettings = new AuthenticationTokenSettings - { - Access = {AccessScope.Job}, + HttpUrl = "https://common.blob.core.windows.net/", + FilePath = "common.exe", + }}, }, - } + }, + new BatchTaskCreateContent("simple3", "cmd /c dir /s") }); -Response response = client.CreateTaskCollection("", taskCollection, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +Response response = client.CreateTaskCollection("jobId", taskCollection); ]]> This sample shows how to call CreateTaskCollectionAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); @@ -13151,19 +4539,24 @@ using RequestContent content = RequestContent.Create(new { new { - id = "", - commandLine = "", + id = "simple1", + commandLine = "cmd /c dir /s", + }, + new + { + id = "simple2", + commandLine = "cmd /c dir /s", } }, }); -Response response = await client.CreateTaskCollectionAsync("", content); +Response response = await client.CreateTaskCollectionAsync("jobId", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateTaskCollectionAsync with all parameters and request content and parse the result. +This sample shows how to call CreateTaskCollectionAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); @@ -13173,180 +4566,72 @@ using RequestContent content = RequestContent.Create(new { new { - id = "", - displayName = "", - exitConditions = new Dictionary - { - ["exitCodes"] = new object[] - { - new - { - code = 1234, - exitOptions = new - { - jobAction = "none", - dependencyAction = "satisfy", - }, - } - }, - ["exitCodeRanges"] = new object[] - { - new - { - start = 1234, - end = 1234, - } - }, - ["preProcessingError"] = null, - ["fileUploadError"] = null, - ["default"] = null - }, - commandLine = "", - containerSettings = new - { - containerRunOptions = "", - imageName = "", - registry = new - { - username = "", - password = "", - registryServer = "", - identityReference = new - { - resourceId = "", - }, - }, - workingDirectory = "taskWorkingDirectory", - }, + id = "complex1", + commandLine = "cmd /c dir /s", resourceFiles = new object[] { new { - autoStorageContainerName = "", - storageContainerUrl = "", - httpUrl = "", - blobPrefix = "", - filePath = "", - fileMode = "", + autoStorageContainerName = "containerName", + filePath = "data", } }, - outputFiles = new object[] + environmentSettings = new object[] { new { - filePattern = "", - destination = new - { - container = new - { - path = "", - containerUrl = "", - uploadHeaders = new object[] - { - new - { - name = "", - value = "", - } - }, - }, - }, - uploadOptions = new - { - uploadCondition = "tasksuccess", - }, - } - }, - environmentSettings = new object[] - { + name = "env1", + value = "value1", + }, new { - name = "", - value = "", + name = "env2", + value = "value2", } }, affinityInfo = new { - affinityId = "", + affinityId = "affinityId", }, constraints = new { - maxWallClockTime = "PT1H23M45S", - retentionTime = "PT1H23M45S", - maxTaskRetryCount = 1234, - }, - requiredSlots = 1234, - userIdentity = new - { - username = "", - autoUser = new - { - scope = "task", - elevationLevel = "nonadmin", - }, + maxWallClockTime = "P1D", + retentionTime = "P2D", + maxTaskRetryCount = 5, }, + requiredSlots = 2, multiInstanceSettings = new { - numberOfInstances = 1234, - coordinationCommandLine = "", + numberOfInstances = 3, + coordinationCommandLine = "cmd /c echo coordinating", commonResourceFiles = new object[] - { - null - }, - }, - dependsOn = new - { - taskIds = new object[] - { - "" - }, - taskIdRanges = new object[] { new { - start = 1234, - end = 1234, + httpUrl = "https://common.blob.core.windows.net/", + filePath = "common.exe", } }, }, - applicationPackageReferences = new object[] - { - new - { - applicationId = "", - version = "", - } - }, - authenticationTokenSettings = new - { - access = new object[] - { - "job" - }, - }, + }, + new + { + id = "simple3", + commandLine = "cmd /c dir /s", } }, }); -Response response = await client.CreateTaskCollectionAsync("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +Response response = await client.CreateTaskCollectionAsync("jobId", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("value")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("taskId").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("eTag").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("lastModified").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("location").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("error").GetProperty("code").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("error").GetProperty("message").GetProperty("lang").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("error").GetProperty("message").GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("error").GetProperty("values")[0].GetProperty("key").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("error").GetProperty("values")[0].GetProperty("value").ToString()); +Console.WriteLine(result.ToString()); ]]> This sample shows how to call CreateTaskCollection and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); @@ -13356,216 +4641,103 @@ using RequestContent content = RequestContent.Create(new { new { - id = "", - commandLine = "", + id = "simple1", + commandLine = "cmd /c dir /s", + }, + new + { + id = "simple2", + commandLine = "cmd /c dir /s", } }, }); -Response response = client.CreateTaskCollection("", content); +Response response = client.CreateTaskCollection("jobId", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateTaskCollection with all parameters and request content and parse the result. +This sample shows how to call CreateTaskCollection and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); using RequestContent content = RequestContent.Create(new -{ - value = new object[] - { - new - { - id = "", - displayName = "", - exitConditions = new Dictionary - { - ["exitCodes"] = new object[] - { - new - { - code = 1234, - exitOptions = new - { - jobAction = "none", - dependencyAction = "satisfy", - }, - } - }, - ["exitCodeRanges"] = new object[] - { - new - { - start = 1234, - end = 1234, - } - }, - ["preProcessingError"] = null, - ["fileUploadError"] = null, - ["default"] = null - }, - commandLine = "", - containerSettings = new - { - containerRunOptions = "", - imageName = "", - registry = new - { - username = "", - password = "", - registryServer = "", - identityReference = new - { - resourceId = "", - }, - }, - workingDirectory = "taskWorkingDirectory", - }, +{ + value = new object[] + { + new + { + id = "complex1", + commandLine = "cmd /c dir /s", resourceFiles = new object[] { new { - autoStorageContainerName = "", - storageContainerUrl = "", - httpUrl = "", - blobPrefix = "", - filePath = "", - fileMode = "", + autoStorageContainerName = "containerName", + filePath = "data", } }, - outputFiles = new object[] + environmentSettings = new object[] { new { - filePattern = "", - destination = new - { - container = new - { - path = "", - containerUrl = "", - uploadHeaders = new object[] - { - new - { - name = "", - value = "", - } - }, - }, - }, - uploadOptions = new - { - uploadCondition = "tasksuccess", - }, - } - }, - environmentSettings = new object[] - { + name = "env1", + value = "value1", + }, new { - name = "", - value = "", + name = "env2", + value = "value2", } }, affinityInfo = new { - affinityId = "", + affinityId = "affinityId", }, constraints = new { - maxWallClockTime = "PT1H23M45S", - retentionTime = "PT1H23M45S", - maxTaskRetryCount = 1234, - }, - requiredSlots = 1234, - userIdentity = new - { - username = "", - autoUser = new - { - scope = "task", - elevationLevel = "nonadmin", - }, + maxWallClockTime = "P1D", + retentionTime = "P2D", + maxTaskRetryCount = 5, }, + requiredSlots = 2, multiInstanceSettings = new { - numberOfInstances = 1234, - coordinationCommandLine = "", + numberOfInstances = 3, + coordinationCommandLine = "cmd /c echo coordinating", commonResourceFiles = new object[] - { - null - }, - }, - dependsOn = new - { - taskIds = new object[] - { - "" - }, - taskIdRanges = new object[] { new { - start = 1234, - end = 1234, + httpUrl = "https://common.blob.core.windows.net/", + filePath = "common.exe", } }, }, - applicationPackageReferences = new object[] - { - new - { - applicationId = "", - version = "", - } - }, - authenticationTokenSettings = new - { - access = new object[] - { - "job" - }, - }, + }, + new + { + id = "simple3", + commandLine = "cmd /c dir /s", } }, }); -Response response = client.CreateTaskCollection("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +Response response = client.CreateTaskCollection("jobId", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("value")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("taskId").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("eTag").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("lastModified").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("location").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("error").GetProperty("code").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("error").GetProperty("message").GetProperty("lang").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("error").GetProperty("message").GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("error").GetProperty("values")[0].GetProperty("key").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("error").GetProperty("values")[0].GetProperty("value").ToString()); +Console.WriteLine(result.ToString()); ]]> This sample shows how to call DeleteTaskAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -Response response = await client.DeleteTaskAsync("", ""); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call DeleteTaskAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -Response response = await client.DeleteTaskAsync("", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); +Response response = await client.DeleteTaskAsync("jobId", "taskId"); Console.WriteLine(response.Status); ]]> @@ -13574,21 +4746,11 @@ Console.WriteLine(response.Status); This sample shows how to call DeleteTask. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -Response response = client.DeleteTask("", ""); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call DeleteTask with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -Response response = client.DeleteTask("", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); +Response response = client.DeleteTask("jobId", "taskId"); Console.WriteLine(response.Status); ]]> @@ -13597,308 +4759,57 @@ Console.WriteLine(response.Status); This sample shows how to call GetTaskAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -Response response = await client.GetTaskAsync("", ""); -]]> -This sample shows how to call GetTaskAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -Response response = await client.GetTaskAsync("", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), select: new string[] { "" }, expand: new string[] { "" }, requestConditions: null); +Response response = client.GetTask("jobId", "taskId"); ]]> This sample shows how to call GetTaskAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -Response response = await client.GetTaskAsync("", "", null, null, null, null, null, null); +Response response = await client.GetTaskAsync("jobId", "taskId", null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null, null, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetTaskAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -Response response = await client.GetTaskAsync("", "", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), new string[] { "" }, new string[] { "" }, null, null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("url").ToString()); -Console.WriteLine(result.GetProperty("eTag").ToString()); -Console.WriteLine(result.GetProperty("lastModified").ToString()); -Console.WriteLine(result.GetProperty("creationTime").ToString()); -Console.WriteLine(result.GetProperty("exitConditions").GetProperty("exitCodes")[0].GetProperty("code").ToString()); -Console.WriteLine(result.GetProperty("exitConditions").GetProperty("exitCodes")[0].GetProperty("exitOptions").GetProperty("jobAction").ToString()); -Console.WriteLine(result.GetProperty("exitConditions").GetProperty("exitCodes")[0].GetProperty("exitOptions").GetProperty("dependencyAction").ToString()); -Console.WriteLine(result.GetProperty("exitConditions").GetProperty("exitCodeRanges")[0].GetProperty("start").ToString()); -Console.WriteLine(result.GetProperty("exitConditions").GetProperty("exitCodeRanges")[0].GetProperty("end").ToString()); -Console.WriteLine(result.GetProperty("exitConditions").GetProperty("exitCodeRanges")[0].GetProperty("exitOptions").GetProperty("jobAction").ToString()); -Console.WriteLine(result.GetProperty("exitConditions").GetProperty("exitCodeRanges")[0].GetProperty("exitOptions").GetProperty("dependencyAction").ToString()); -Console.WriteLine(result.GetProperty("exitConditions").GetProperty("preProcessingError").GetProperty("jobAction").ToString()); -Console.WriteLine(result.GetProperty("exitConditions").GetProperty("preProcessingError").GetProperty("dependencyAction").ToString()); -Console.WriteLine(result.GetProperty("exitConditions").GetProperty("fileUploadError").GetProperty("jobAction").ToString()); -Console.WriteLine(result.GetProperty("exitConditions").GetProperty("fileUploadError").GetProperty("dependencyAction").ToString()); -Console.WriteLine(result.GetProperty("exitConditions").GetProperty("default").GetProperty("jobAction").ToString()); -Console.WriteLine(result.GetProperty("exitConditions").GetProperty("default").GetProperty("dependencyAction").ToString()); -Console.WriteLine(result.GetProperty("state").ToString()); -Console.WriteLine(result.GetProperty("stateTransitionTime").ToString()); -Console.WriteLine(result.GetProperty("previousState").ToString()); -Console.WriteLine(result.GetProperty("previousStateTransitionTime").ToString()); -Console.WriteLine(result.GetProperty("commandLine").ToString()); -Console.WriteLine(result.GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); -Console.WriteLine(result.GetProperty("containerSettings").GetProperty("imageName").ToString()); -Console.WriteLine(result.GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); -Console.WriteLine(result.GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); -Console.WriteLine(result.GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); -Console.WriteLine(result.GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); -Console.WriteLine(result.GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); -Console.WriteLine(result.GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); -Console.WriteLine(result.GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); -Console.WriteLine(result.GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); -Console.WriteLine(result.GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); -Console.WriteLine(result.GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); -Console.WriteLine(result.GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); -Console.WriteLine(result.GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); -Console.WriteLine(result.GetProperty("outputFiles")[0].GetProperty("filePattern").ToString()); -Console.WriteLine(result.GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("path").ToString()); -Console.WriteLine(result.GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("containerUrl").ToString()); -Console.WriteLine(result.GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("identityReference").GetProperty("resourceId").ToString()); -Console.WriteLine(result.GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("uploadHeaders")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("uploadHeaders")[0].GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("outputFiles")[0].GetProperty("uploadOptions").GetProperty("uploadCondition").ToString()); -Console.WriteLine(result.GetProperty("environmentSettings")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("environmentSettings")[0].GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("affinityInfo").GetProperty("affinityId").ToString()); -Console.WriteLine(result.GetProperty("constraints").GetProperty("maxWallClockTime").ToString()); -Console.WriteLine(result.GetProperty("constraints").GetProperty("retentionTime").ToString()); -Console.WriteLine(result.GetProperty("constraints").GetProperty("maxTaskRetryCount").ToString()); -Console.WriteLine(result.GetProperty("requiredSlots").ToString()); -Console.WriteLine(result.GetProperty("userIdentity").GetProperty("username").ToString()); -Console.WriteLine(result.GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); -Console.WriteLine(result.GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); -Console.WriteLine(result.GetProperty("executionInfo").GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("executionInfo").GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("executionInfo").GetProperty("exitCode").ToString()); -Console.WriteLine(result.GetProperty("executionInfo").GetProperty("containerInfo").GetProperty("containerId").ToString()); -Console.WriteLine(result.GetProperty("executionInfo").GetProperty("containerInfo").GetProperty("state").ToString()); -Console.WriteLine(result.GetProperty("executionInfo").GetProperty("containerInfo").GetProperty("error").ToString()); -Console.WriteLine(result.GetProperty("executionInfo").GetProperty("failureInfo").GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("executionInfo").GetProperty("failureInfo").GetProperty("code").ToString()); -Console.WriteLine(result.GetProperty("executionInfo").GetProperty("failureInfo").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("executionInfo").GetProperty("failureInfo").GetProperty("details")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("executionInfo").GetProperty("failureInfo").GetProperty("details")[0].GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("executionInfo").GetProperty("retryCount").ToString()); -Console.WriteLine(result.GetProperty("executionInfo").GetProperty("lastRetryTime").ToString()); -Console.WriteLine(result.GetProperty("executionInfo").GetProperty("requeueCount").ToString()); -Console.WriteLine(result.GetProperty("executionInfo").GetProperty("lastRequeueTime").ToString()); -Console.WriteLine(result.GetProperty("executionInfo").GetProperty("result").ToString()); -Console.WriteLine(result.GetProperty("nodeInfo").GetProperty("affinityId").ToString()); -Console.WriteLine(result.GetProperty("nodeInfo").GetProperty("nodeUrl").ToString()); -Console.WriteLine(result.GetProperty("nodeInfo").GetProperty("poolId").ToString()); -Console.WriteLine(result.GetProperty("nodeInfo").GetProperty("nodeId").ToString()); -Console.WriteLine(result.GetProperty("nodeInfo").GetProperty("taskRootDirectory").ToString()); -Console.WriteLine(result.GetProperty("nodeInfo").GetProperty("taskRootDirectoryUrl").ToString()); -Console.WriteLine(result.GetProperty("multiInstanceSettings").GetProperty("numberOfInstances").ToString()); -Console.WriteLine(result.GetProperty("multiInstanceSettings").GetProperty("coordinationCommandLine").ToString()); -Console.WriteLine(result.GetProperty("multiInstanceSettings").GetProperty("commonResourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); -Console.WriteLine(result.GetProperty("multiInstanceSettings").GetProperty("commonResourceFiles")[0].GetProperty("storageContainerUrl").ToString()); -Console.WriteLine(result.GetProperty("multiInstanceSettings").GetProperty("commonResourceFiles")[0].GetProperty("httpUrl").ToString()); -Console.WriteLine(result.GetProperty("multiInstanceSettings").GetProperty("commonResourceFiles")[0].GetProperty("blobPrefix").ToString()); -Console.WriteLine(result.GetProperty("multiInstanceSettings").GetProperty("commonResourceFiles")[0].GetProperty("filePath").ToString()); -Console.WriteLine(result.GetProperty("multiInstanceSettings").GetProperty("commonResourceFiles")[0].GetProperty("fileMode").ToString()); -Console.WriteLine(result.GetProperty("multiInstanceSettings").GetProperty("commonResourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); -Console.WriteLine(result.GetProperty("stats").GetProperty("url").ToString()); -Console.WriteLine(result.GetProperty("stats").GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("stats").GetProperty("lastUpdateTime").ToString()); -Console.WriteLine(result.GetProperty("stats").GetProperty("userCPUTime").ToString()); -Console.WriteLine(result.GetProperty("stats").GetProperty("kernelCPUTime").ToString()); -Console.WriteLine(result.GetProperty("stats").GetProperty("wallClockTime").ToString()); -Console.WriteLine(result.GetProperty("stats").GetProperty("readIOps").ToString()); -Console.WriteLine(result.GetProperty("stats").GetProperty("writeIOps").ToString()); -Console.WriteLine(result.GetProperty("stats").GetProperty("readIOGiB").ToString()); -Console.WriteLine(result.GetProperty("stats").GetProperty("writeIOGiB").ToString()); -Console.WriteLine(result.GetProperty("stats").GetProperty("waitTime").ToString()); -Console.WriteLine(result.GetProperty("dependsOn").GetProperty("taskIds")[0].ToString()); -Console.WriteLine(result.GetProperty("dependsOn").GetProperty("taskIdRanges")[0].GetProperty("start").ToString()); -Console.WriteLine(result.GetProperty("dependsOn").GetProperty("taskIdRanges")[0].GetProperty("end").ToString()); -Console.WriteLine(result.GetProperty("applicationPackageReferences")[0].GetProperty("applicationId").ToString()); -Console.WriteLine(result.GetProperty("applicationPackageReferences")[0].GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("authenticationTokenSettings").GetProperty("access")[0].ToString()); ]]> This sample shows how to call ReplaceTaskAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -BatchTask task = new BatchTask(); -Response response = await client.ReplaceTaskAsync("", "", task); -]]> -This sample shows how to call ReplaceTaskAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); @@ -13906,28 +4817,19 @@ BatchTask task = new BatchTask { Constraints = new BatchTaskConstraints { - MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - RetentionTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - MaxTaskRetryCount = 1234, + MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H"), + RetentionTime = XmlConvert.ToTimeSpan("PT1H"), + MaxTaskRetryCount = 3, }, }; -Response response = await client.ReplaceTaskAsync("", "", task, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); +Response response = await client.ReplaceTaskAsync("jobId", "taskId", task); ]]> This sample shows how to call ReplaceTask. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -BatchTask task = new BatchTask(); -Response response = client.ReplaceTask("", "", task); -]]> -This sample shows how to call ReplaceTask with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); @@ -13935,30 +4837,19 @@ BatchTask task = new BatchTask { Constraints = new BatchTaskConstraints { - MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - RetentionTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - MaxTaskRetryCount = 1234, + MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H"), + RetentionTime = XmlConvert.ToTimeSpan("PT1H"), + MaxTaskRetryCount = 3, }, }; -Response response = client.ReplaceTask("", "", task, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); +Response response = client.ReplaceTask("jobId", "taskId", task); ]]> This sample shows how to call ReplaceTaskAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new object()); -Response response = await client.ReplaceTaskAsync("", "", content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call ReplaceTaskAsync with all parameters and request content. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); @@ -13966,12 +4857,12 @@ using RequestContent content = RequestContent.Create(new { constraints = new { - maxWallClockTime = "PT1H23M45S", - retentionTime = "PT1H23M45S", - maxTaskRetryCount = 1234, + maxWallClockTime = "PT1H", + maxTaskRetryCount = 3, + retentionTime = "PT1H", }, }); -Response response = await client.ReplaceTaskAsync("", "", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); +Response response = await client.ReplaceTaskAsync("jobId", "taskId", content); Console.WriteLine(response.Status); ]]> @@ -13980,18 +4871,7 @@ Console.WriteLine(response.Status); This sample shows how to call ReplaceTask. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new object()); -Response response = client.ReplaceTask("", "", content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call ReplaceTask with all parameters and request content. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); @@ -13999,12 +4879,12 @@ using RequestContent content = RequestContent.Create(new { constraints = new { - maxWallClockTime = "PT1H23M45S", - retentionTime = "PT1H23M45S", - maxTaskRetryCount = 1234, + maxWallClockTime = "PT1H", + maxTaskRetryCount = 3, + retentionTime = "PT1H", }, }); -Response response = client.ReplaceTask("", "", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); +Response response = client.ReplaceTask("jobId", "taskId", content); Console.WriteLine(response.Status); ]]> @@ -14013,21 +4893,11 @@ Console.WriteLine(response.Status); This sample shows how to call TerminateTaskAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -Response response = await client.TerminateTaskAsync("", ""); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call TerminateTaskAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -Response response = await client.TerminateTaskAsync("", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); +Response response = await client.TerminateTaskAsync("jobId", "taskId"); Console.WriteLine(response.Status); ]]> @@ -14036,21 +4906,11 @@ Console.WriteLine(response.Status); This sample shows how to call TerminateTask. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -Response response = client.TerminateTask("", ""); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call TerminateTask with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -Response response = client.TerminateTask("", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); +Response response = client.TerminateTask("jobId", "taskId"); Console.WriteLine(response.Status); ]]> @@ -14059,21 +4919,11 @@ Console.WriteLine(response.Status); This sample shows how to call ReactivateTaskAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -Response response = await client.ReactivateTaskAsync("", ""); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call ReactivateTaskAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -Response response = await client.ReactivateTaskAsync("", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); +Response response = await client.ReactivateTaskAsync("jobId", "taskId"); Console.WriteLine(response.Status); ]]> @@ -14082,21 +4932,11 @@ Console.WriteLine(response.Status); This sample shows how to call ReactivateTask. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -Response response = client.ReactivateTask("", ""); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call ReactivateTask with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -Response response = client.ReactivateTask("", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); +Response response = client.ReactivateTask("jobId", "taskId"); Console.WriteLine(response.Status); ]]> @@ -14105,21 +4945,11 @@ Console.WriteLine(response.Status); This sample shows how to call DeleteTaskFileAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -Response response = await client.DeleteTaskFileAsync("", "", ""); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call DeleteTaskFileAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -Response response = await client.DeleteTaskFileAsync("", "", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), recursive: true); +Response response = await client.DeleteTaskFileAsync("jobId", "task1", "wd\\testFile.txt"); Console.WriteLine(response.Status); ]]> @@ -14128,21 +4958,11 @@ Console.WriteLine(response.Status); This sample shows how to call DeleteTaskFile. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -Response response = client.DeleteTaskFile("", "", ""); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call DeleteTaskFile with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -Response response = client.DeleteTaskFile("", "", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), recursive: true); +Response response = client.DeleteTaskFile("jobId", "task1", "wd\\testFile.txt"); Console.WriteLine(response.Status); ]]> @@ -14151,60 +4971,33 @@ Console.WriteLine(response.Status); This sample shows how to call GetTaskFileAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -Response response = await client.GetTaskFileAsync("", "", ""); -]]> -This sample shows how to call GetTaskFileAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -Response response = await client.GetTaskFileAsync("", "", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), ocpRange: "", requestConditions: null); +Response response = await client.GetTaskFileAsync("jobId", "task1", "wd\\testFile.txt"); ]]> This sample shows how to call GetTaskFile. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -Response response = client.GetTaskFile("", "", ""); -]]> -This sample shows how to call GetTaskFile with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -Response response = client.GetTaskFile("", "", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), ocpRange: "", requestConditions: null); +Response response = client.GetTaskFile("jobId", "task1", "wd\\testFile.txt"); ]]> This sample shows how to call GetTaskFileAsync and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -Response response = await client.GetTaskFileAsync("", "", "", null, null, null, null, null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetTaskFileAsync with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -Response response = await client.GetTaskFileAsync("", "", "", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), "", null, null); +Response response = await client.GetTaskFileAsync("jobId", "task1", "wd\\testFile.txt", null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -14214,22 +5007,11 @@ Console.WriteLine(result.ToString()); This sample shows how to call GetTaskFile and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -Response response = client.GetTaskFile("", "", "", null, null, null, null, null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetTaskFile with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -Response response = client.GetTaskFile("", "", "", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), "", null, null); +Response response = client.GetTaskFile("jobId", "task1", "wd\\testFile.txt", null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -14239,87 +5021,52 @@ Console.WriteLine(result.ToString()); This sample shows how to call CreateNodeUserAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -BatchNodeUserCreateContent user = new BatchNodeUserCreateContent(""); -Response response = await client.CreateNodeUserAsync("", "", user); -]]> -This sample shows how to call CreateNodeUserAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -BatchNodeUserCreateContent user = new BatchNodeUserCreateContent("") +BatchNodeUserCreateContent user = new BatchNodeUserCreateContent("userName") { - IsAdmin = true, - ExpiryTime = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), - Password = "", - SshPublicKey = "", + IsAdmin = false, + ExpiryTime = DateTimeOffset.Parse("2017-08-01T00:00:00Z"), + Password = "Password", }; -Response response = await client.CreateNodeUserAsync("", "", user, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +Response response = await client.CreateNodeUserAsync("poolId", "tvm-1695681911_1-20161121t182739z", user); ]]> This sample shows how to call CreateNodeUser. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -BatchNodeUserCreateContent user = new BatchNodeUserCreateContent(""); -Response response = client.CreateNodeUser("", "", user); -]]> -This sample shows how to call CreateNodeUser with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -BatchNodeUserCreateContent user = new BatchNodeUserCreateContent("") +BatchNodeUserCreateContent user = new BatchNodeUserCreateContent("userName") { - IsAdmin = true, - ExpiryTime = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), - Password = "", - SshPublicKey = "", + IsAdmin = false, + ExpiryTime = DateTimeOffset.Parse("2017-08-01T00:00:00Z"), + Password = "Password", }; -Response response = client.CreateNodeUser("", "", user, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +Response response = client.CreateNodeUser("poolId", "tvm-1695681911_1-20161121t182739z", user); ]]> This sample shows how to call CreateNodeUserAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - name = "", -}); -Response response = await client.CreateNodeUserAsync("", "", content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call CreateNodeUserAsync with all parameters and request content. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - name = "", - isAdmin = true, - expiryTime = "2022-05-10T18:57:31.2311892Z", - password = "", - sshPublicKey = "", + name = "userName", + isAdmin = false, + expiryTime = "2017-08-01T00:00:00Z", + password = "Password", }); -Response response = await client.CreateNodeUserAsync("", "", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +Response response = await client.CreateNodeUserAsync("poolId", "tvm-1695681911_1-20161121t182739z", content); Console.WriteLine(response.Status); ]]> @@ -14328,33 +5075,18 @@ Console.WriteLine(response.Status); This sample shows how to call CreateNodeUser. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - name = "", -}); -Response response = client.CreateNodeUser("", "", content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call CreateNodeUser with all parameters and request content. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - name = "", - isAdmin = true, - expiryTime = "2022-05-10T18:57:31.2311892Z", - password = "", - sshPublicKey = "", + name = "userName", + isAdmin = false, + expiryTime = "2017-08-01T00:00:00Z", + password = "Password", }); -Response response = client.CreateNodeUser("", "", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +Response response = client.CreateNodeUser("poolId", "tvm-1695681911_1-20161121t182739z", content); Console.WriteLine(response.Status); ]]> @@ -14363,21 +5095,11 @@ Console.WriteLine(response.Status); This sample shows how to call DeleteNodeUserAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -Response response = await client.DeleteNodeUserAsync("", "", ""); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call DeleteNodeUserAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -Response response = await client.DeleteNodeUserAsync("", "", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +Response response = await client.DeleteNodeUserAsync("poolId", "tvm-1695681911_1-20161121t182739z", "userName"); Console.WriteLine(response.Status); ]]> @@ -14386,21 +5108,11 @@ Console.WriteLine(response.Status); This sample shows how to call DeleteNodeUser. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -Response response = client.DeleteNodeUser("", "", ""); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call DeleteNodeUser with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -Response response = client.DeleteNodeUser("", "", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +Response response = client.DeleteNodeUser("poolId", "tvm-1695681911_1-20161121t182739z", "userName"); Console.WriteLine(response.Status); ]]> @@ -14409,80 +5121,48 @@ Console.WriteLine(response.Status); This sample shows how to call ReplaceNodeUserAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -BatchNodeUserUpdateContent content = new BatchNodeUserUpdateContent(); -Response response = await client.ReplaceNodeUserAsync("", "", "", content); -]]> -This sample shows how to call ReplaceNodeUserAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); BatchNodeUserUpdateContent content = new BatchNodeUserUpdateContent { - Password = "", - ExpiryTime = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), - SshPublicKey = "", + Password = "12345", + ExpiryTime = DateTimeOffset.Parse("2016-11-27T00:45:48.7320857Z"), }; -Response response = await client.ReplaceNodeUserAsync("", "", "", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +Response response = await client.ReplaceNodeUserAsync("poolId", "tvm-1695681911_1-20161121t182739z", "userName", content); ]]> This sample shows how to call ReplaceNodeUser. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -BatchNodeUserUpdateContent content = new BatchNodeUserUpdateContent(); -Response response = client.ReplaceNodeUser("", "", "", content); -]]> -This sample shows how to call ReplaceNodeUser with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); BatchNodeUserUpdateContent content = new BatchNodeUserUpdateContent { - Password = "", - ExpiryTime = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), - SshPublicKey = "", + Password = "12345", + ExpiryTime = DateTimeOffset.Parse("2016-11-27T00:45:48.7320857Z"), }; -Response response = client.ReplaceNodeUser("", "", "", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +Response response = client.ReplaceNodeUser("poolId", "tvm-1695681911_1-20161121t182739z", "userName", content); ]]> This sample shows how to call ReplaceNodeUserAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new object()); -Response response = await client.ReplaceNodeUserAsync("", "", "", content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call ReplaceNodeUserAsync with all parameters and request content. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - password = "", - expiryTime = "2022-05-10T18:57:31.2311892Z", - sshPublicKey = "", + password = "12345", + expiryTime = "2016-11-27T00:45:48.7320857Z", }); -Response response = await client.ReplaceNodeUserAsync("", "", "", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +Response response = await client.ReplaceNodeUserAsync("poolId", "tvm-1695681911_1-20161121t182739z", "userName", content); Console.WriteLine(response.Status); ]]> @@ -14491,372 +5171,102 @@ Console.WriteLine(response.Status); This sample shows how to call ReplaceNodeUser. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new object()); -Response response = client.ReplaceNodeUser("", "", "", content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call ReplaceNodeUser with all parameters and request content. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - password = "", - expiryTime = "2022-05-10T18:57:31.2311892Z", - sshPublicKey = "", + password = "12345", + expiryTime = "2016-11-27T00:45:48.7320857Z", }); -Response response = client.ReplaceNodeUser("", "", "", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +Response response = client.ReplaceNodeUser("poolId", "tvm-1695681911_1-20161121t182739z", "userName", content); Console.WriteLine(response.Status); ]]> - - -This sample shows how to call GetNodeAsync. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -Response response = await client.GetNodeAsync("", ""); -]]> -This sample shows how to call GetNodeAsync with all parameters. + + +This sample shows how to call GetNodeAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -Response response = await client.GetNodeAsync("", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), select: new string[] { "" }); +Response response = client.GetNode("poolId", "tvm-1695681911_2-20161122t193202z"); ]]> This sample shows how to call GetNodeAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -Response response = await client.GetNodeAsync("", "", null, null, null, null); +Response response = await client.GetNodeAsync("poolId", "tvm-1695681911_2-20161122t193202z", null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetNodeAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -Response response = await client.GetNodeAsync("", "", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), new string[] { "" }, null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("url").ToString()); -Console.WriteLine(result.GetProperty("state").ToString()); -Console.WriteLine(result.GetProperty("schedulingState").ToString()); -Console.WriteLine(result.GetProperty("stateTransitionTime").ToString()); -Console.WriteLine(result.GetProperty("lastBootTime").ToString()); -Console.WriteLine(result.GetProperty("allocationTime").ToString()); -Console.WriteLine(result.GetProperty("ipAddress").ToString()); -Console.WriteLine(result.GetProperty("affinityId").ToString()); -Console.WriteLine(result.GetProperty("vmSize").ToString()); -Console.WriteLine(result.GetProperty("totalTasksRun").ToString()); -Console.WriteLine(result.GetProperty("runningTasksCount").ToString()); -Console.WriteLine(result.GetProperty("runningTaskSlotsCount").ToString()); -Console.WriteLine(result.GetProperty("totalTasksSucceeded").ToString()); -Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("taskUrl").ToString()); -Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("jobId").ToString()); -Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("taskId").ToString()); -Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("subtaskId").ToString()); -Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("taskState").ToString()); -Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("exitCode").ToString()); -Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("containerInfo").GetProperty("containerId").ToString()); -Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("containerInfo").GetProperty("state").ToString()); -Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("containerInfo").GetProperty("error").ToString()); -Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("failureInfo").GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("failureInfo").GetProperty("code").ToString()); -Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("failureInfo").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("failureInfo").GetProperty("details")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("failureInfo").GetProperty("details")[0].GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("retryCount").ToString()); -Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("lastRetryTime").ToString()); -Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("requeueCount").ToString()); -Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("lastRequeueTime").ToString()); -Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("result").ToString()); -Console.WriteLine(result.GetProperty("startTask").GetProperty("commandLine").ToString()); -Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); -Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); -Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); -Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); -Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); -Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); -Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); -Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); -Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); -Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); -Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); -Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); -Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); -Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); -Console.WriteLine(result.GetProperty("startTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("startTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("startTask").GetProperty("userIdentity").GetProperty("username").ToString()); -Console.WriteLine(result.GetProperty("startTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); -Console.WriteLine(result.GetProperty("startTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); -Console.WriteLine(result.GetProperty("startTask").GetProperty("maxTaskRetryCount").ToString()); -Console.WriteLine(result.GetProperty("startTask").GetProperty("waitForSuccess").ToString()); -Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("state").ToString()); -Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("exitCode").ToString()); -Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("containerInfo").GetProperty("containerId").ToString()); -Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("containerInfo").GetProperty("state").ToString()); -Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("containerInfo").GetProperty("error").ToString()); -Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("failureInfo").GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("failureInfo").GetProperty("code").ToString()); -Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("failureInfo").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("failureInfo").GetProperty("details")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("failureInfo").GetProperty("details")[0].GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("retryCount").ToString()); -Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("lastRetryTime").ToString()); -Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("result").ToString()); -Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); -Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("errors")[0].GetProperty("errorDetails")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("errors")[0].GetProperty("errorDetails")[0].GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("isDedicated").ToString()); -Console.WriteLine(result.GetProperty("endpointConfiguration").GetProperty("inboundEndpoints")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("endpointConfiguration").GetProperty("inboundEndpoints")[0].GetProperty("protocol").ToString()); -Console.WriteLine(result.GetProperty("endpointConfiguration").GetProperty("inboundEndpoints")[0].GetProperty("publicIPAddress").ToString()); -Console.WriteLine(result.GetProperty("endpointConfiguration").GetProperty("inboundEndpoints")[0].GetProperty("publicFQDN").ToString()); -Console.WriteLine(result.GetProperty("endpointConfiguration").GetProperty("inboundEndpoints")[0].GetProperty("frontendPort").ToString()); -Console.WriteLine(result.GetProperty("endpointConfiguration").GetProperty("inboundEndpoints")[0].GetProperty("backendPort").ToString()); -Console.WriteLine(result.GetProperty("nodeAgentInfo").GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("nodeAgentInfo").GetProperty("lastUpdateTime").ToString()); -Console.WriteLine(result.GetProperty("virtualMachineInfo").GetProperty("imageReference").GetProperty("publisher").ToString()); -Console.WriteLine(result.GetProperty("virtualMachineInfo").GetProperty("imageReference").GetProperty("offer").ToString()); -Console.WriteLine(result.GetProperty("virtualMachineInfo").GetProperty("imageReference").GetProperty("sku").ToString()); -Console.WriteLine(result.GetProperty("virtualMachineInfo").GetProperty("imageReference").GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("virtualMachineInfo").GetProperty("imageReference").GetProperty("virtualMachineImageId").ToString()); -Console.WriteLine(result.GetProperty("virtualMachineInfo").GetProperty("imageReference").GetProperty("exactVersion").ToString()); -Console.WriteLine(result.GetProperty("virtualMachineInfo").GetProperty("scaleSetVmResourceId").ToString()); ]]> This sample shows how to call RebootNodeAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -Response response = await client.RebootNodeAsync("", ""); -]]> -This sample shows how to call RebootNodeAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -BatchNodeRebootContent parameters = new BatchNodeRebootContent -{ - NodeRebootOption = BatchNodeRebootOption.Requeue, -}; -Response response = await client.RebootNodeAsync("", "", parameters: parameters, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +Response response = await client.RebootNodeAsync("poolId", "tvm-1695681911_1-20161122t193202z"); ]]> This sample shows how to call RebootNode. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -Response response = client.RebootNode("", ""); -]]> -This sample shows how to call RebootNode with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -BatchNodeRebootContent parameters = new BatchNodeRebootContent -{ - NodeRebootOption = BatchNodeRebootOption.Requeue, -}; -Response response = client.RebootNode("", "", parameters: parameters, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +Response response = client.RebootNode("poolId", "tvm-1695681911_1-20161122t193202z"); ]]> This sample shows how to call RebootNodeAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); using RequestContent content = null; -Response response = await client.RebootNodeAsync("", "", content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call RebootNodeAsync with all parameters and request content. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - nodeRebootOption = "requeue", -}); -Response response = await client.RebootNodeAsync("", "", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +Response response = await client.RebootNodeAsync("poolId", "tvm-1695681911_1-20161122t193202z", content); Console.WriteLine(response.Status); ]]> @@ -14865,26 +5275,12 @@ Console.WriteLine(response.Status); This sample shows how to call RebootNode. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); using RequestContent content = null; -Response response = client.RebootNode("", "", content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call RebootNode with all parameters and request content. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - nodeRebootOption = "requeue", -}); -Response response = client.RebootNode("", "", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +Response response = client.RebootNode("poolId", "tvm-1695681911_1-20161122t193202z", content); Console.WriteLine(response.Status); ]]> @@ -14893,72 +5289,34 @@ Console.WriteLine(response.Status); This sample shows how to call DisableNodeSchedulingAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -Response response = await client.DisableNodeSchedulingAsync("", ""); -]]> -This sample shows how to call DisableNodeSchedulingAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -BatchNodeDisableSchedulingContent parameters = new BatchNodeDisableSchedulingContent -{ - NodeDisableSchedulingOption = BatchNodeDisableSchedulingOption.Requeue, -}; -Response response = await client.DisableNodeSchedulingAsync("", "", parameters: parameters, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +Response response = await client.DisableNodeSchedulingAsync("poolId", "tvm-1695681911_1-20161122t193202z"); ]]> This sample shows how to call DisableNodeScheduling. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -Response response = client.DisableNodeScheduling("", ""); -]]> -This sample shows how to call DisableNodeScheduling with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -BatchNodeDisableSchedulingContent parameters = new BatchNodeDisableSchedulingContent -{ - NodeDisableSchedulingOption = BatchNodeDisableSchedulingOption.Requeue, -}; -Response response = client.DisableNodeScheduling("", "", parameters: parameters, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +Response response = client.DisableNodeScheduling("poolId", "tvm-1695681911_1-20161122t193202z"); ]]> This sample shows how to call DisableNodeSchedulingAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); using RequestContent content = null; -Response response = await client.DisableNodeSchedulingAsync("", "", content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call DisableNodeSchedulingAsync with all parameters and request content. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - nodeDisableSchedulingOption = "requeue", -}); -Response response = await client.DisableNodeSchedulingAsync("", "", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +Response response = await client.DisableNodeSchedulingAsync("poolId", "tvm-1695681911_1-20161122t193202z", content); Console.WriteLine(response.Status); ]]> @@ -14967,26 +5325,12 @@ Console.WriteLine(response.Status); This sample shows how to call DisableNodeScheduling. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); using RequestContent content = null; -Response response = client.DisableNodeScheduling("", "", content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call DisableNodeScheduling with all parameters and request content. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - nodeDisableSchedulingOption = "requeue", -}); -Response response = client.DisableNodeScheduling("", "", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +Response response = client.DisableNodeScheduling("poolId", "tvm-1695681911_1-20161122t193202z", content); Console.WriteLine(response.Status); ]]> @@ -14995,21 +5339,11 @@ Console.WriteLine(response.Status); This sample shows how to call EnableNodeSchedulingAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -Response response = await client.EnableNodeSchedulingAsync("", ""); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call EnableNodeSchedulingAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -Response response = await client.EnableNodeSchedulingAsync("", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +Response response = await client.EnableNodeSchedulingAsync("poolId", "tvm-1695681911_1-20161122t193202z"); Console.WriteLine(response.Status); ]]> @@ -15018,21 +5352,11 @@ Console.WriteLine(response.Status); This sample shows how to call EnableNodeScheduling. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -Response response = client.EnableNodeScheduling("", ""); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call EnableNodeScheduling with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -Response response = client.EnableNodeScheduling("", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +Response response = client.EnableNodeScheduling("poolId", "tvm-1695681911_1-20161122t193202z"); Console.WriteLine(response.Status); ]]> @@ -15041,61 +5365,33 @@ Console.WriteLine(response.Status); This sample shows how to call GetNodeRemoteLoginSettingsAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -Response response = await client.GetNodeRemoteLoginSettingsAsync("", ""); -]]> -This sample shows how to call GetNodeRemoteLoginSettingsAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -Response response = await client.GetNodeRemoteLoginSettingsAsync("", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +Response response = await client.GetNodeRemoteLoginSettingsAsync("poolId", "tvm-1695681911_1-20161121t182739z"); ]]> This sample shows how to call GetNodeRemoteLoginSettings. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -Response response = client.GetNodeRemoteLoginSettings("", ""); -]]> -This sample shows how to call GetNodeRemoteLoginSettings with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -Response response = client.GetNodeRemoteLoginSettings("", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +Response response = client.GetNodeRemoteLoginSettings("poolId", "tvm-1695681911_1-20161121t182739z"); ]]> This sample shows how to call GetNodeRemoteLoginSettingsAsync and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -Response response = await client.GetNodeRemoteLoginSettingsAsync("", "", null, null, null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("remoteLoginIPAddress").ToString()); -Console.WriteLine(result.GetProperty("remoteLoginPort").ToString()); -]]> -This sample shows how to call GetNodeRemoteLoginSettingsAsync with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -Response response = await client.GetNodeRemoteLoginSettingsAsync("", "", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), null); +Response response = await client.GetNodeRemoteLoginSettingsAsync("poolId", "tvm-1695681911_1-20161121t182739z", null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("remoteLoginIPAddress").ToString()); @@ -15106,23 +5402,11 @@ Console.WriteLine(result.GetProperty("remoteLoginPort").ToString()); This sample shows how to call GetNodeRemoteLoginSettings and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -Response response = client.GetNodeRemoteLoginSettings("", "", null, null, null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("remoteLoginIPAddress").ToString()); -Console.WriteLine(result.GetProperty("remoteLoginPort").ToString()); -]]> -This sample shows how to call GetNodeRemoteLoginSettings with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -Response response = client.GetNodeRemoteLoginSettings("", "", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), null); +Response response = client.GetNodeRemoteLoginSettings("poolId", "tvm-1695681911_1-20161121t182739z", null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("remoteLoginIPAddress").ToString()); @@ -15133,94 +5417,40 @@ Console.WriteLine(result.GetProperty("remoteLoginPort").ToString()); This sample shows how to call UploadNodeLogsAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -UploadBatchServiceLogsContent content = new UploadBatchServiceLogsContent("", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); -Response response = await client.UploadNodeLogsAsync("", "", content); -]]> -This sample shows how to call UploadNodeLogsAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -UploadBatchServiceLogsContent content = new UploadBatchServiceLogsContent("", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")) -{ - EndTime = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), - IdentityReference = new BatchNodeIdentityReference - { - ResourceId = "", - }, -}; -Response response = await client.UploadNodeLogsAsync("", "", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +UploadBatchServiceLogsContent content = new UploadBatchServiceLogsContent("https://somestorageacct.blob.core.windows.net/batch-compute-node-logs?se=2017-12-09T18%3A51%3A00Z&sp=w&sv=2016-05-31&sr=c&sig", DateTimeOffset.Parse("2017-11-27T00:00:00Z")); +Response response = await client.UploadNodeLogsAsync("poolId", "tvm-1695681911_1-20161121t182739z", content); ]]> This sample shows how to call UploadNodeLogs. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -UploadBatchServiceLogsContent content = new UploadBatchServiceLogsContent("", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); -Response response = client.UploadNodeLogs("", "", content); -]]> -This sample shows how to call UploadNodeLogs with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -UploadBatchServiceLogsContent content = new UploadBatchServiceLogsContent("", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")) -{ - EndTime = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), - IdentityReference = new BatchNodeIdentityReference - { - ResourceId = "", - }, -}; -Response response = client.UploadNodeLogs("", "", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +UploadBatchServiceLogsContent content = new UploadBatchServiceLogsContent("https://somestorageacct.blob.core.windows.net/batch-compute-node-logs?se=2017-12-09T18%3A51%3A00Z&sp=w&sv=2016-05-31&sr=c&sig", DateTimeOffset.Parse("2017-11-27T00:00:00Z")); +Response response = client.UploadNodeLogs("poolId", "tvm-1695681911_1-20161121t182739z", content); ]]> This sample shows how to call UploadNodeLogsAsync and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - containerUrl = "", - startTime = "2022-05-10T18:57:31.2311892Z", -}); -Response response = await client.UploadNodeLogsAsync("", "", content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("virtualDirectoryName").ToString()); -Console.WriteLine(result.GetProperty("numberOfFilesUploaded").ToString()); -]]> -This sample shows how to call UploadNodeLogsAsync with all parameters and request content and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - containerUrl = "", - startTime = "2022-05-10T18:57:31.2311892Z", - endTime = "2022-05-10T18:57:31.2311892Z", - identityReference = new - { - resourceId = "", - }, + containerUrl = "https://somestorageacct.blob.core.windows.net/batch-compute-node-logs?se=2017-12-09T18%3A51%3A00Z&sp=w&sv=2016-05-31&sr=c&sig", + startTime = "2017-11-27T00:00:00Z", }); -Response response = await client.UploadNodeLogsAsync("", "", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +Response response = await client.UploadNodeLogsAsync("poolId", "tvm-1695681911_1-20161121t182739z", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("virtualDirectoryName").ToString()); @@ -15231,38 +5461,16 @@ Console.WriteLine(result.GetProperty("numberOfFilesUploaded").ToString()); This sample shows how to call UploadNodeLogs and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - containerUrl = "", - startTime = "2022-05-10T18:57:31.2311892Z", -}); -Response response = client.UploadNodeLogs("", "", content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("virtualDirectoryName").ToString()); -Console.WriteLine(result.GetProperty("numberOfFilesUploaded").ToString()); -]]> -This sample shows how to call UploadNodeLogs with all parameters and request content and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - containerUrl = "", - startTime = "2022-05-10T18:57:31.2311892Z", - endTime = "2022-05-10T18:57:31.2311892Z", - identityReference = new - { - resourceId = "", - }, + containerUrl = "https://somestorageacct.blob.core.windows.net/batch-compute-node-logs?se=2017-12-09T18%3A51%3A00Z&sp=w&sv=2016-05-31&sr=c&sig", + startTime = "2017-11-27T00:00:00Z", }); -Response response = client.UploadNodeLogs("", "", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +Response response = client.UploadNodeLogs("poolId", "tvm-1695681911_1-20161121t182739z", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("virtualDirectoryName").ToString()); @@ -15273,149 +5481,61 @@ Console.WriteLine(result.GetProperty("numberOfFilesUploaded").ToString()); This sample shows how to call GetNodeExtensionAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -Response response = await client.GetNodeExtensionAsync("", "", ""); -]]> -This sample shows how to call GetNodeExtensionAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -Response response = await client.GetNodeExtensionAsync("", "", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), select: new string[] { "" }); +Response response = client.GetNodeExtension("poolId", "tvm-1695681911_2-20161122t193202z", "batchNodeExtension"); ]]> This sample shows how to call GetNodeExtensionAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -Response response = await client.GetNodeExtensionAsync("", "", "", null, null, null, null); +Response response = await client.GetNodeExtensionAsync("poolId", "tvm-1695681911_2-20161122t193202z", "batchNodeExtension", null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetNodeExtensionAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -Response response = await client.GetNodeExtensionAsync("", "", "", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), new string[] { "" }, null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("provisioningState").ToString()); -Console.WriteLine(result.GetProperty("vmExtension").GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("vmExtension").GetProperty("publisher").ToString()); -Console.WriteLine(result.GetProperty("vmExtension").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("vmExtension").GetProperty("typeHandlerVersion").ToString()); -Console.WriteLine(result.GetProperty("vmExtension").GetProperty("autoUpgradeMinorVersion").ToString()); -Console.WriteLine(result.GetProperty("vmExtension").GetProperty("enableAutomaticUpgrade").ToString()); -Console.WriteLine(result.GetProperty("vmExtension").GetProperty("settings").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("vmExtension").GetProperty("protectedSettings").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("vmExtension").GetProperty("provisionAfterExtensions")[0].ToString()); -Console.WriteLine(result.GetProperty("instanceView").GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("instanceView").GetProperty("statuses")[0].GetProperty("code").ToString()); -Console.WriteLine(result.GetProperty("instanceView").GetProperty("statuses")[0].GetProperty("displayStatus").ToString()); -Console.WriteLine(result.GetProperty("instanceView").GetProperty("statuses")[0].GetProperty("level").ToString()); -Console.WriteLine(result.GetProperty("instanceView").GetProperty("statuses")[0].GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("instanceView").GetProperty("statuses")[0].GetProperty("time").ToString()); -Console.WriteLine(result.GetProperty("instanceView").GetProperty("subStatuses")[0].GetProperty("code").ToString()); -Console.WriteLine(result.GetProperty("instanceView").GetProperty("subStatuses")[0].GetProperty("displayStatus").ToString()); -Console.WriteLine(result.GetProperty("instanceView").GetProperty("subStatuses")[0].GetProperty("level").ToString()); -Console.WriteLine(result.GetProperty("instanceView").GetProperty("subStatuses")[0].GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("instanceView").GetProperty("subStatuses")[0].GetProperty("time").ToString()); ]]> This sample shows how to call DeleteNodeFileAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -Response response = await client.DeleteNodeFileAsync("", "", ""); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call DeleteNodeFileAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -Response response = await client.DeleteNodeFileAsync("", "", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), recursive: true); +Response response = await client.DeleteNodeFileAsync("poolId", "tvm-1695681911_1-20161122t193202z", "workitems\\jobId\\job-1\\task1\\wd\\testFile.txt"); Console.WriteLine(response.Status); ]]> @@ -15424,21 +5544,11 @@ Console.WriteLine(response.Status); This sample shows how to call DeleteNodeFile. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -Response response = client.DeleteNodeFile("", "", ""); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call DeleteNodeFile with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -Response response = client.DeleteNodeFile("", "", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), recursive: true); +Response response = client.DeleteNodeFile("poolId", "tvm-1695681911_1-20161122t193202z", "workitems\\jobId\\job-1\\task1\\wd\\testFile.txt"); Console.WriteLine(response.Status); ]]> @@ -15447,60 +5557,33 @@ Console.WriteLine(response.Status); This sample shows how to call GetNodeFileAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -Response response = await client.GetNodeFileAsync("", "", ""); -]]> -This sample shows how to call GetNodeFileAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -Response response = await client.GetNodeFileAsync("", "", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), ocpRange: "", requestConditions: null); +Response response = await client.GetNodeFileAsync("poolId", "nodeId", "workitems\\jobId\\job-1\\task1\\wd\\testFile.txt"); ]]> This sample shows how to call GetNodeFile. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -Response response = client.GetNodeFile("", "", ""); -]]> -This sample shows how to call GetNodeFile with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -Response response = client.GetNodeFile("", "", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), ocpRange: "", requestConditions: null); +Response response = client.GetNodeFile("poolId", "nodeId", "workitems\\jobId\\job-1\\task1\\wd\\testFile.txt"); ]]> This sample shows how to call GetNodeFileAsync and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -Response response = await client.GetNodeFileAsync("", "", "", null, null, null, null, null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetNodeFileAsync with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -Response response = await client.GetNodeFileAsync("", "", "", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), "", null, null); +Response response = await client.GetNodeFileAsync("poolId", "nodeId", "workitems\\jobId\\job-1\\task1\\wd\\testFile.txt", null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -15510,46 +5593,25 @@ Console.WriteLine(result.ToString()); This sample shows how to call GetNodeFile and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -Response response = client.GetNodeFile("", "", "", null, null, null, null, null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetNodeFile with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -Response response = client.GetNodeFile("", "", "", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), "", null, null); +Response response = client.GetNodeFile("poolId", "nodeId", "workitems\\jobId\\job-1\\task1\\wd\\testFile.txt", null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> - - - -This sample shows how to call GetApplicationsAsync. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -await foreach (BatchApplication item in client.GetApplicationsAsync()) -{ -} -]]> -This sample shows how to call GetApplicationsAsync with all parameters. + + + +This sample shows how to call GetApplicationsAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -await foreach (BatchApplication item in client.GetApplicationsAsync(timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), maxresults: 1234)) +await foreach (BatchApplication item in client.GetApplicationsAsync()) { } ]]> @@ -15558,48 +5620,24 @@ await foreach (BatchApplication item in client.GetApplicationsAsync(timeOutInSec This sample shows how to call GetApplications. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); foreach (BatchApplication item in client.GetApplications()) { } -]]> -This sample shows how to call GetApplications with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -foreach (BatchApplication item in client.GetApplications(timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), maxresults: 1234)) -{ -} ]]> This sample shows how to call GetApplicationsAsync and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -await foreach (BinaryData item in client.GetApplicationsAsync(null, null, null, null)) -{ - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("versions")[0].ToString()); -} -]]> -This sample shows how to call GetApplicationsAsync with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -await foreach (BinaryData item in client.GetApplicationsAsync(1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), 1234, null)) +await foreach (BinaryData item in client.GetApplicationsAsync(null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); @@ -15612,25 +5650,11 @@ await foreach (BinaryData item in client.GetApplicationsAsync(1234, DateTimeOffs This sample shows how to call GetApplications and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -foreach (BinaryData item in client.GetApplications(null, null, null, null)) -{ - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("versions")[0].ToString()); -} -]]> -This sample shows how to call GetApplications with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -foreach (BinaryData item in client.GetApplications(1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), 1234, null)) +foreach (BinaryData item in client.GetApplications(null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); @@ -15643,73 +5667,37 @@ foreach (BinaryData item in client.GetApplications(1234, DateTimeOffset.Parse("T This sample shows how to call GetPoolUsageMetricsAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); await foreach (BatchPoolUsageMetrics item in client.GetPoolUsageMetricsAsync()) { } -]]> -This sample shows how to call GetPoolUsageMetricsAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -await foreach (BatchPoolUsageMetrics item in client.GetPoolUsageMetricsAsync(timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), maxresults: 1234, starttime: DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), endtime: DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), filter: "")) -{ -} ]]> This sample shows how to call GetPoolUsageMetrics. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); foreach (BatchPoolUsageMetrics item in client.GetPoolUsageMetrics()) { } -]]> -This sample shows how to call GetPoolUsageMetrics with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -foreach (BatchPoolUsageMetrics item in client.GetPoolUsageMetrics(timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), maxresults: 1234, starttime: DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), endtime: DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), filter: "")) -{ -} ]]> This sample shows how to call GetPoolUsageMetricsAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -await foreach (BinaryData item in client.GetPoolUsageMetricsAsync(null, null, null, null, null, null, null)) -{ - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("poolId").ToString()); - Console.WriteLine(result.GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("vmSize").ToString()); - Console.WriteLine(result.GetProperty("totalCoreHours").ToString()); -} -]]> -This sample shows how to call GetPoolUsageMetricsAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -await foreach (BinaryData item in client.GetPoolUsageMetricsAsync(1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), 1234, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), "", null)) +await foreach (BinaryData item in client.GetPoolUsageMetricsAsync(null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("poolId").ToString()); @@ -15724,27 +5712,11 @@ await foreach (BinaryData item in client.GetPoolUsageMetricsAsync(1234, DateTime This sample shows how to call GetPoolUsageMetrics and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -foreach (BinaryData item in client.GetPoolUsageMetrics(null, null, null, null, null, null, null)) -{ - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("poolId").ToString()); - Console.WriteLine(result.GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("vmSize").ToString()); - Console.WriteLine(result.GetProperty("totalCoreHours").ToString()); -} -]]> -This sample shows how to call GetPoolUsageMetrics with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -foreach (BinaryData item in client.GetPoolUsageMetrics(1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), 1234, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), "", null)) +foreach (BinaryData item in client.GetPoolUsageMetrics(null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("poolId").ToString()); @@ -15759,509 +5731,93 @@ foreach (BinaryData item in client.GetPoolUsageMetrics(1234, DateTimeOffset.Pars This sample shows how to call GetPoolsAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); await foreach (BatchPool item in client.GetPoolsAsync()) { } -]]> -This sample shows how to call GetPoolsAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -await foreach (BatchPool item in client.GetPoolsAsync(timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), maxresults: 1234, filter: "", select: new string[] { "" }, expand: new string[] { "" })) -{ -} ]]> This sample shows how to call GetPoolsAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -await foreach (BinaryData item in client.GetPoolsAsync(null, null, null, null, null, null, null)) +await foreach (BinaryData item in client.GetPoolsAsync(null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.ToString()); } -]]> -This sample shows how to call GetPoolsAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -await foreach (BinaryData item in client.GetPoolsAsync(1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), 1234, "", new string[] { "" }, new string[] { "" }, null)) -{ - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("url").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("lastModified").ToString()); - Console.WriteLine(result.GetProperty("creationTime").ToString()); - Console.WriteLine(result.GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("stateTransitionTime").ToString()); - Console.WriteLine(result.GetProperty("allocationState").ToString()); - Console.WriteLine(result.GetProperty("allocationStateTransitionTime").ToString()); - Console.WriteLine(result.GetProperty("vmSize").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("publisher").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("offer").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("sku").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("virtualMachineImageId").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("exactVersion").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("nodeAgentSKUId").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("windowsConfiguration").GetProperty("enableAutomaticUpdates").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("lun").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("caching").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("diskSizeGB").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("storageAccountType").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("licenseType").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerImageNames")[0].ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("password").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("registryServer").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("diskEncryptionConfiguration").GetProperty("targets")[0].ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("nodePlacementConfiguration").GetProperty("policy").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("publisher").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("typeHandlerVersion").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("autoUpgradeMinorVersion").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("enableAutomaticUpgrade").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("settings").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("protectedSettings").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("provisionAfterExtensions")[0].ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("ephemeralOSDiskSettings").GetProperty("placement").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("caching").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("managedDisk").GetProperty("storageAccountType").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("writeAcceleratorEnabled").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("encryptionAtHost").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("securityType").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("uefiSettings").GetProperty("secureBootEnabled").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("uefiSettings").GetProperty("vTpmEnabled").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("serviceArtifactReference").GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("resizeTimeout").ToString()); - Console.WriteLine(result.GetProperty("resizeErrors")[0].GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("resizeErrors")[0].GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("resizeErrors")[0].GetProperty("values")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("resizeErrors")[0].GetProperty("values")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("resourceTags").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("currentDedicatedNodes").ToString()); - Console.WriteLine(result.GetProperty("currentLowPriorityNodes").ToString()); - Console.WriteLine(result.GetProperty("targetDedicatedNodes").ToString()); - Console.WriteLine(result.GetProperty("targetLowPriorityNodes").ToString()); - Console.WriteLine(result.GetProperty("enableAutoScale").ToString()); - Console.WriteLine(result.GetProperty("autoScaleFormula").ToString()); - Console.WriteLine(result.GetProperty("autoScaleEvaluationInterval").ToString()); - Console.WriteLine(result.GetProperty("autoScaleRun").GetProperty("timestamp").ToString()); - Console.WriteLine(result.GetProperty("autoScaleRun").GetProperty("results").ToString()); - Console.WriteLine(result.GetProperty("autoScaleRun").GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("autoScaleRun").GetProperty("error").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("autoScaleRun").GetProperty("error").GetProperty("values")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("autoScaleRun").GetProperty("error").GetProperty("values")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("enableInterNodeCommunication").ToString()); - Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("subnetId").ToString()); - Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("dynamicVNetAssignmentScope").ToString()); - Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("protocol").ToString()); - Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("backendPort").ToString()); - Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("frontendPortRangeStart").ToString()); - Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("frontendPortRangeEnd").ToString()); - Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("priority").ToString()); - Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("access").ToString()); - Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("sourceAddressPrefix").ToString()); - Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("sourcePortRanges")[0].ToString()); - Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("publicIPAddressConfiguration").GetProperty("provision").ToString()); - Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("publicIPAddressConfiguration").GetProperty("ipAddressIds")[0].ToString()); - Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("enableAcceleratedNetworking").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("commandLine").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("userIdentity").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("maxTaskRetryCount").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("waitForSuccess").ToString()); - Console.WriteLine(result.GetProperty("applicationPackageReferences")[0].GetProperty("applicationId").ToString()); - Console.WriteLine(result.GetProperty("applicationPackageReferences")[0].GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("taskSlotsPerNode").ToString()); - Console.WriteLine(result.GetProperty("taskSchedulingPolicy").GetProperty("nodeFillType").ToString()); - Console.WriteLine(result.GetProperty("userAccounts")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("userAccounts")[0].GetProperty("password").ToString()); - Console.WriteLine(result.GetProperty("userAccounts")[0].GetProperty("elevationLevel").ToString()); - Console.WriteLine(result.GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("uid").ToString()); - Console.WriteLine(result.GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("gid").ToString()); - Console.WriteLine(result.GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("sshPrivateKey").ToString()); - Console.WriteLine(result.GetProperty("userAccounts")[0].GetProperty("windowsUserConfiguration").GetProperty("loginMode").ToString()); - Console.WriteLine(result.GetProperty("metadata")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("metadata")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("url").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("lastUpdateTime").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("usageStats").GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("usageStats").GetProperty("lastUpdateTime").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("usageStats").GetProperty("dedicatedCoreTime").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("lastUpdateTime").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("avgCPUPercentage").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("avgMemoryGiB").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("peakMemoryGiB").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("avgDiskGiB").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("peakDiskGiB").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("diskReadIOps").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("diskWriteIOps").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("diskReadGiB").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("diskWriteGiB").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("networkReadGiB").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("networkWriteGiB").ToString()); - Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("accountName").ToString()); - Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("containerName").ToString()); - Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("accountKey").ToString()); - Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("sasKey").ToString()); - Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("blobfuseOptions").ToString()); - Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("relativeMountPath").ToString()); - Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("relativeMountPath").ToString()); - Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("mountOptions").ToString()); - Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("relativeMountPath").ToString()); - Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("mountOptions").ToString()); - Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("password").ToString()); - Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("accountName").ToString()); - Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("azureFileUrl").ToString()); - Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("accountKey").ToString()); - Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("relativeMountPath").ToString()); - Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("mountOptions").ToString()); - Console.WriteLine(result.GetProperty("identity").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("identity").GetProperty("userAssignedIdentities")[0].GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("identity").GetProperty("userAssignedIdentities")[0].GetProperty("clientId").ToString()); - Console.WriteLine(result.GetProperty("identity").GetProperty("userAssignedIdentities")[0].GetProperty("principalId").ToString()); - Console.WriteLine(result.GetProperty("targetNodeCommunicationMode").ToString()); - Console.WriteLine(result.GetProperty("currentNodeCommunicationMode").ToString()); - Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("mode").ToString()); - Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("disableAutomaticRollback").ToString()); - Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("enableAutomaticOSUpgrade").ToString()); - Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("useRollingUpgradePolicy").ToString()); - Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("osRollingUpgradeDeferral").ToString()); - Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("enableCrossZoneUpgrade").ToString()); - Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxBatchInstancePercent").ToString()); - Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxUnhealthyInstancePercent").ToString()); - Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxUnhealthyUpgradedInstancePercent").ToString()); - Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("pauseTimeBetweenBatches").ToString()); - Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("prioritizeUnhealthyInstances").ToString()); - Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("rollbackFailedInstancesOnPolicyBreach").ToString()); -} ]]> This sample shows how to call GetSupportedImagesAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); await foreach (BatchSupportedImage item in client.GetSupportedImagesAsync()) { } -]]> -This sample shows how to call GetSupportedImagesAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -await foreach (BatchSupportedImage item in client.GetSupportedImagesAsync(timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), maxresults: 1234, filter: "")) -{ -} ]]> This sample shows how to call GetSupportedImages. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); foreach (BatchSupportedImage item in client.GetSupportedImages()) { } -]]> -This sample shows how to call GetSupportedImages with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -foreach (BatchSupportedImage item in client.GetSupportedImages(timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), maxresults: 1234, filter: "")) -{ -} ]]> This sample shows how to call GetSupportedImagesAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -await foreach (BinaryData item in client.GetSupportedImagesAsync(null, null, null, null, null)) +await foreach (BinaryData item in client.GetSupportedImagesAsync(null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("nodeAgentSKUId").ToString()); @@ -16269,39 +5825,17 @@ await foreach (BinaryData item in client.GetSupportedImagesAsync(null, null, nul Console.WriteLine(result.GetProperty("osType").ToString()); Console.WriteLine(result.GetProperty("verificationType").ToString()); } -]]> -This sample shows how to call GetSupportedImagesAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -await foreach (BinaryData item in client.GetSupportedImagesAsync(1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), 1234, "", null)) -{ - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("nodeAgentSKUId").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("publisher").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("offer").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("sku").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("virtualMachineImageId").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("exactVersion").ToString()); - Console.WriteLine(result.GetProperty("osType").ToString()); - Console.WriteLine(result.GetProperty("capabilities")[0].ToString()); - Console.WriteLine(result.GetProperty("batchSupportEndOfLife").ToString()); - Console.WriteLine(result.GetProperty("verificationType").ToString()); -} ]]> This sample shows how to call GetSupportedImages and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -foreach (BinaryData item in client.GetSupportedImages(null, null, null, null, null)) +foreach (BinaryData item in client.GetSupportedImages(null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("nodeAgentSKUId").ToString()); @@ -16309,187 +5843,61 @@ foreach (BinaryData item in client.GetSupportedImages(null, null, null, null, nu Console.WriteLine(result.GetProperty("osType").ToString()); Console.WriteLine(result.GetProperty("verificationType").ToString()); } -]]> -This sample shows how to call GetSupportedImages with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -foreach (BinaryData item in client.GetSupportedImages(1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), 1234, "", null)) -{ - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("nodeAgentSKUId").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("publisher").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("offer").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("sku").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("virtualMachineImageId").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("exactVersion").ToString()); - Console.WriteLine(result.GetProperty("osType").ToString()); - Console.WriteLine(result.GetProperty("capabilities")[0].ToString()); - Console.WriteLine(result.GetProperty("batchSupportEndOfLife").ToString()); - Console.WriteLine(result.GetProperty("verificationType").ToString()); -} ]]> This sample shows how to call GetPoolNodeCountsAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); await foreach (BatchPoolNodeCounts item in client.GetPoolNodeCountsAsync()) { } -]]> -This sample shows how to call GetPoolNodeCountsAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -await foreach (BatchPoolNodeCounts item in client.GetPoolNodeCountsAsync(timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), maxresults: 1234, filter: "")) -{ -} ]]> This sample shows how to call GetPoolNodeCounts. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); foreach (BatchPoolNodeCounts item in client.GetPoolNodeCounts()) { } -]]> -This sample shows how to call GetPoolNodeCounts with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -foreach (BatchPoolNodeCounts item in client.GetPoolNodeCounts(timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), maxresults: 1234, filter: "")) -{ -} ]]> This sample shows how to call GetPoolNodeCountsAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -await foreach (BinaryData item in client.GetPoolNodeCountsAsync(null, null, null, null, null)) +await foreach (BinaryData item in client.GetPoolNodeCountsAsync(null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("poolId").ToString()); } -]]> -This sample shows how to call GetPoolNodeCountsAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -await foreach (BinaryData item in client.GetPoolNodeCountsAsync(1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), 1234, "", null)) -{ - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("poolId").ToString()); - Console.WriteLine(result.GetProperty("dedicated").GetProperty("creating").ToString()); - Console.WriteLine(result.GetProperty("dedicated").GetProperty("idle").ToString()); - Console.WriteLine(result.GetProperty("dedicated").GetProperty("offline").ToString()); - Console.WriteLine(result.GetProperty("dedicated").GetProperty("preempted").ToString()); - Console.WriteLine(result.GetProperty("dedicated").GetProperty("rebooting").ToString()); - Console.WriteLine(result.GetProperty("dedicated").GetProperty("reimaging").ToString()); - Console.WriteLine(result.GetProperty("dedicated").GetProperty("running").ToString()); - Console.WriteLine(result.GetProperty("dedicated").GetProperty("starting").ToString()); - Console.WriteLine(result.GetProperty("dedicated").GetProperty("startTaskFailed").ToString()); - Console.WriteLine(result.GetProperty("dedicated").GetProperty("leavingPool").ToString()); - Console.WriteLine(result.GetProperty("dedicated").GetProperty("unknown").ToString()); - Console.WriteLine(result.GetProperty("dedicated").GetProperty("unusable").ToString()); - Console.WriteLine(result.GetProperty("dedicated").GetProperty("waitingForStartTask").ToString()); - Console.WriteLine(result.GetProperty("dedicated").GetProperty("total").ToString()); - Console.WriteLine(result.GetProperty("dedicated").GetProperty("upgradingOS").ToString()); - Console.WriteLine(result.GetProperty("lowPriority").GetProperty("creating").ToString()); - Console.WriteLine(result.GetProperty("lowPriority").GetProperty("idle").ToString()); - Console.WriteLine(result.GetProperty("lowPriority").GetProperty("offline").ToString()); - Console.WriteLine(result.GetProperty("lowPriority").GetProperty("preempted").ToString()); - Console.WriteLine(result.GetProperty("lowPriority").GetProperty("rebooting").ToString()); - Console.WriteLine(result.GetProperty("lowPriority").GetProperty("reimaging").ToString()); - Console.WriteLine(result.GetProperty("lowPriority").GetProperty("running").ToString()); - Console.WriteLine(result.GetProperty("lowPriority").GetProperty("starting").ToString()); - Console.WriteLine(result.GetProperty("lowPriority").GetProperty("startTaskFailed").ToString()); - Console.WriteLine(result.GetProperty("lowPriority").GetProperty("leavingPool").ToString()); - Console.WriteLine(result.GetProperty("lowPriority").GetProperty("unknown").ToString()); - Console.WriteLine(result.GetProperty("lowPriority").GetProperty("unusable").ToString()); - Console.WriteLine(result.GetProperty("lowPriority").GetProperty("waitingForStartTask").ToString()); - Console.WriteLine(result.GetProperty("lowPriority").GetProperty("total").ToString()); - Console.WriteLine(result.GetProperty("lowPriority").GetProperty("upgradingOS").ToString()); -} ]]> This sample shows how to call GetPoolNodeCounts and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -foreach (BinaryData item in client.GetPoolNodeCounts(null, null, null, null, null)) -{ - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("poolId").ToString()); -} -]]> -This sample shows how to call GetPoolNodeCounts with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -foreach (BinaryData item in client.GetPoolNodeCounts(1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), 1234, "", null)) +foreach (BinaryData item in client.GetPoolNodeCounts(null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("poolId").ToString()); - Console.WriteLine(result.GetProperty("dedicated").GetProperty("creating").ToString()); - Console.WriteLine(result.GetProperty("dedicated").GetProperty("idle").ToString()); - Console.WriteLine(result.GetProperty("dedicated").GetProperty("offline").ToString()); - Console.WriteLine(result.GetProperty("dedicated").GetProperty("preempted").ToString()); - Console.WriteLine(result.GetProperty("dedicated").GetProperty("rebooting").ToString()); - Console.WriteLine(result.GetProperty("dedicated").GetProperty("reimaging").ToString()); - Console.WriteLine(result.GetProperty("dedicated").GetProperty("running").ToString()); - Console.WriteLine(result.GetProperty("dedicated").GetProperty("starting").ToString()); - Console.WriteLine(result.GetProperty("dedicated").GetProperty("startTaskFailed").ToString()); - Console.WriteLine(result.GetProperty("dedicated").GetProperty("leavingPool").ToString()); - Console.WriteLine(result.GetProperty("dedicated").GetProperty("unknown").ToString()); - Console.WriteLine(result.GetProperty("dedicated").GetProperty("unusable").ToString()); - Console.WriteLine(result.GetProperty("dedicated").GetProperty("waitingForStartTask").ToString()); - Console.WriteLine(result.GetProperty("dedicated").GetProperty("total").ToString()); - Console.WriteLine(result.GetProperty("dedicated").GetProperty("upgradingOS").ToString()); - Console.WriteLine(result.GetProperty("lowPriority").GetProperty("creating").ToString()); - Console.WriteLine(result.GetProperty("lowPriority").GetProperty("idle").ToString()); - Console.WriteLine(result.GetProperty("lowPriority").GetProperty("offline").ToString()); - Console.WriteLine(result.GetProperty("lowPriority").GetProperty("preempted").ToString()); - Console.WriteLine(result.GetProperty("lowPriority").GetProperty("rebooting").ToString()); - Console.WriteLine(result.GetProperty("lowPriority").GetProperty("reimaging").ToString()); - Console.WriteLine(result.GetProperty("lowPriority").GetProperty("running").ToString()); - Console.WriteLine(result.GetProperty("lowPriority").GetProperty("starting").ToString()); - Console.WriteLine(result.GetProperty("lowPriority").GetProperty("startTaskFailed").ToString()); - Console.WriteLine(result.GetProperty("lowPriority").GetProperty("leavingPool").ToString()); - Console.WriteLine(result.GetProperty("lowPriority").GetProperty("unknown").ToString()); - Console.WriteLine(result.GetProperty("lowPriority").GetProperty("unusable").ToString()); - Console.WriteLine(result.GetProperty("lowPriority").GetProperty("waitingForStartTask").ToString()); - Console.WriteLine(result.GetProperty("lowPriority").GetProperty("total").ToString()); - Console.WriteLine(result.GetProperty("lowPriority").GetProperty("upgradingOS").ToString()); } ]]> @@ -16497,659 +5905,67 @@ foreach (BinaryData item in client.GetPoolNodeCounts(1234, DateTimeOffset.Parse( This sample shows how to call GetJobsAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); await foreach (BatchJob item in client.GetJobsAsync()) { } -]]> -This sample shows how to call GetJobsAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -await foreach (BatchJob item in client.GetJobsAsync(timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), maxresults: 1234, filter: "", select: new string[] { "" }, expand: new string[] { "" })) -{ -} ]]> This sample shows how to call GetJobsAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -await foreach (BinaryData item in client.GetJobsAsync(null, null, null, null, null, null, null)) +await foreach (BinaryData item in client.GetJobsAsync(null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("poolInfo").ToString()); } -]]> -This sample shows how to call GetJobsAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -await foreach (BinaryData item in client.GetJobsAsync(1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), 1234, "", new string[] { "" }, new string[] { "" }, null)) -{ - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("usesTaskDependencies").ToString()); - Console.WriteLine(result.GetProperty("url").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("lastModified").ToString()); - Console.WriteLine(result.GetProperty("creationTime").ToString()); - Console.WriteLine(result.GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("stateTransitionTime").ToString()); - Console.WriteLine(result.GetProperty("previousState").ToString()); - Console.WriteLine(result.GetProperty("previousStateTransitionTime").ToString()); - Console.WriteLine(result.GetProperty("priority").ToString()); - Console.WriteLine(result.GetProperty("allowTaskPreemption").ToString()); - Console.WriteLine(result.GetProperty("maxParallelTasks").ToString()); - Console.WriteLine(result.GetProperty("constraints").GetProperty("maxWallClockTime").ToString()); - Console.WriteLine(result.GetProperty("constraints").GetProperty("maxTaskRetryCount").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("commandLine").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("filePattern").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("path").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("containerUrl").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("uploadHeaders")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("uploadHeaders")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("uploadOptions").GetProperty("uploadCondition").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("constraints").GetProperty("maxWallClockTime").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("constraints").GetProperty("retentionTime").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("constraints").GetProperty("maxTaskRetryCount").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("requiredSlots").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("killJobOnCompletion").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("userIdentity").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("runExclusive").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("applicationPackageReferences")[0].GetProperty("applicationId").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("applicationPackageReferences")[0].GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("authenticationTokenSettings").GetProperty("access")[0].ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("allowLowPriorityNode").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("commandLine").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("constraints").GetProperty("maxWallClockTime").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("constraints").GetProperty("retentionTime").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("constraints").GetProperty("maxTaskRetryCount").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("waitForSuccess").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("userIdentity").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("rerunOnNodeRebootAfterSuccess").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("commandLine").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("maxWallClockTime").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("retentionTime").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("userIdentity").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); - Console.WriteLine(result.GetProperty("commonEnvironmentSettings")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("commonEnvironmentSettings")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("poolId").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("autoPoolIdPrefix").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("poolLifetimeOption").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("keepAlive").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("vmSize").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("publisher").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("offer").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("sku").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("virtualMachineImageId").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("exactVersion").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("nodeAgentSKUId").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("windowsConfiguration").GetProperty("enableAutomaticUpdates").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("lun").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("caching").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("diskSizeGB").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("storageAccountType").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("licenseType").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerImageNames")[0].ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("password").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("registryServer").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("diskEncryptionConfiguration").GetProperty("targets")[0].ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("nodePlacementConfiguration").GetProperty("policy").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("publisher").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("typeHandlerVersion").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("autoUpgradeMinorVersion").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("enableAutomaticUpgrade").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("settings").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("protectedSettings").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("provisionAfterExtensions")[0].ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("ephemeralOSDiskSettings").GetProperty("placement").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("caching").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("managedDisk").GetProperty("storageAccountType").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("writeAcceleratorEnabled").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("encryptionAtHost").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("securityType").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("uefiSettings").GetProperty("secureBootEnabled").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("uefiSettings").GetProperty("vTpmEnabled").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("serviceArtifactReference").GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("taskSlotsPerNode").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("taskSchedulingPolicy").GetProperty("nodeFillType").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("resizeTimeout").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("resourceTags").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("targetDedicatedNodes").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("targetLowPriorityNodes").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("enableAutoScale").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("autoScaleFormula").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("autoScaleEvaluationInterval").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("enableInterNodeCommunication").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("subnetId").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("dynamicVNetAssignmentScope").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("protocol").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("backendPort").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("frontendPortRangeStart").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("frontendPortRangeEnd").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("priority").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("access").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("sourceAddressPrefix").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("sourcePortRanges")[0].ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("publicIPAddressConfiguration").GetProperty("provision").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("publicIPAddressConfiguration").GetProperty("ipAddressIds")[0].ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("enableAcceleratedNetworking").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("commandLine").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("userIdentity").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("maxTaskRetryCount").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("waitForSuccess").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("applicationPackageReferences")[0].GetProperty("applicationId").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("applicationPackageReferences")[0].GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("password").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("elevationLevel").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("uid").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("gid").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("sshPrivateKey").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("windowsUserConfiguration").GetProperty("loginMode").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("metadata")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("metadata")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("accountName").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("containerName").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("accountKey").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("sasKey").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("blobfuseOptions").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("relativeMountPath").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("relativeMountPath").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("mountOptions").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("relativeMountPath").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("mountOptions").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("password").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("accountName").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("azureFileUrl").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("accountKey").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("relativeMountPath").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("mountOptions").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("targetNodeCommunicationMode").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("mode").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("disableAutomaticRollback").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("enableAutomaticOSUpgrade").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("useRollingUpgradePolicy").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("osRollingUpgradeDeferral").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("enableCrossZoneUpgrade").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxBatchInstancePercent").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxUnhealthyInstancePercent").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxUnhealthyUpgradedInstancePercent").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("pauseTimeBetweenBatches").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("prioritizeUnhealthyInstances").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("rollbackFailedInstancesOnPolicyBreach").ToString()); - Console.WriteLine(result.GetProperty("onAllTasksComplete").ToString()); - Console.WriteLine(result.GetProperty("onTaskFailure").ToString()); - Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("subnetId").ToString()); - Console.WriteLine(result.GetProperty("metadata")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("metadata")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("poolId").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("schedulingError").GetProperty("category").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("schedulingError").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("schedulingError").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("schedulingError").GetProperty("details")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("schedulingError").GetProperty("details")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("terminateReason").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("url").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("lastUpdateTime").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("userCPUTime").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("kernelCPUTime").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("wallClockTime").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("readIOps").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("writeIOps").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("readIOGiB").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("writeIOGiB").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("numSucceededTasks").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("numFailedTasks").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("numTaskRetries").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("waitTime").ToString()); -} ]]> This sample shows how to call GetJobsFromSchedulesAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -await foreach (BatchJob item in client.GetJobsFromSchedulesAsync("")) -{ -} -]]> -This sample shows how to call GetJobsFromSchedulesAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -await foreach (BatchJob item in client.GetJobsFromSchedulesAsync("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), maxresults: 1234, filter: "", select: new string[] { "" }, expand: new string[] { "" })) +foreach (BatchJob item in client.GetJobsFromSchedules("jobScheduleId")) { } ]]> @@ -17181,613 +5987,41 @@ foreach (BatchJob item in client.GetJobsFromSchedules("", timeOut This sample shows how to call GetJobsFromSchedulesAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -await foreach (BinaryData item in client.GetJobsFromSchedulesAsync("", null, null, null, null, null, null, null)) +await foreach (BinaryData item in client.GetJobsFromSchedulesAsync("jobScheduleId", null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("poolInfo").ToString()); } -]]> -This sample shows how to call GetJobsFromSchedulesAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -await foreach (BinaryData item in client.GetJobsFromSchedulesAsync("", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), 1234, "", new string[] { "" }, new string[] { "" }, null)) -{ - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("usesTaskDependencies").ToString()); - Console.WriteLine(result.GetProperty("url").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("lastModified").ToString()); - Console.WriteLine(result.GetProperty("creationTime").ToString()); - Console.WriteLine(result.GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("stateTransitionTime").ToString()); - Console.WriteLine(result.GetProperty("previousState").ToString()); - Console.WriteLine(result.GetProperty("previousStateTransitionTime").ToString()); - Console.WriteLine(result.GetProperty("priority").ToString()); - Console.WriteLine(result.GetProperty("allowTaskPreemption").ToString()); - Console.WriteLine(result.GetProperty("maxParallelTasks").ToString()); - Console.WriteLine(result.GetProperty("constraints").GetProperty("maxWallClockTime").ToString()); - Console.WriteLine(result.GetProperty("constraints").GetProperty("maxTaskRetryCount").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("commandLine").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("filePattern").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("path").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("containerUrl").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("uploadHeaders")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("uploadHeaders")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("uploadOptions").GetProperty("uploadCondition").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("constraints").GetProperty("maxWallClockTime").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("constraints").GetProperty("retentionTime").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("constraints").GetProperty("maxTaskRetryCount").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("requiredSlots").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("killJobOnCompletion").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("userIdentity").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("runExclusive").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("applicationPackageReferences")[0].GetProperty("applicationId").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("applicationPackageReferences")[0].GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("authenticationTokenSettings").GetProperty("access")[0].ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("allowLowPriorityNode").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("commandLine").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("constraints").GetProperty("maxWallClockTime").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("constraints").GetProperty("retentionTime").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("constraints").GetProperty("maxTaskRetryCount").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("waitForSuccess").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("userIdentity").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("rerunOnNodeRebootAfterSuccess").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("commandLine").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("maxWallClockTime").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("retentionTime").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("userIdentity").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); - Console.WriteLine(result.GetProperty("commonEnvironmentSettings")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("commonEnvironmentSettings")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("poolId").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("autoPoolIdPrefix").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("poolLifetimeOption").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("keepAlive").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("vmSize").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("publisher").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("offer").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("sku").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("virtualMachineImageId").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("exactVersion").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("nodeAgentSKUId").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("windowsConfiguration").GetProperty("enableAutomaticUpdates").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("lun").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("caching").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("diskSizeGB").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("storageAccountType").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("licenseType").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerImageNames")[0].ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("password").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("registryServer").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("diskEncryptionConfiguration").GetProperty("targets")[0].ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("nodePlacementConfiguration").GetProperty("policy").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("publisher").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("typeHandlerVersion").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("autoUpgradeMinorVersion").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("enableAutomaticUpgrade").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("settings").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("protectedSettings").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("provisionAfterExtensions")[0].ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("ephemeralOSDiskSettings").GetProperty("placement").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("caching").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("managedDisk").GetProperty("storageAccountType").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("writeAcceleratorEnabled").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("encryptionAtHost").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("securityType").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("uefiSettings").GetProperty("secureBootEnabled").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("uefiSettings").GetProperty("vTpmEnabled").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("serviceArtifactReference").GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("taskSlotsPerNode").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("taskSchedulingPolicy").GetProperty("nodeFillType").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("resizeTimeout").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("resourceTags").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("targetDedicatedNodes").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("targetLowPriorityNodes").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("enableAutoScale").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("autoScaleFormula").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("autoScaleEvaluationInterval").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("enableInterNodeCommunication").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("subnetId").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("dynamicVNetAssignmentScope").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("protocol").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("backendPort").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("frontendPortRangeStart").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("frontendPortRangeEnd").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("priority").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("access").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("sourceAddressPrefix").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("sourcePortRanges")[0].ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("publicIPAddressConfiguration").GetProperty("provision").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("publicIPAddressConfiguration").GetProperty("ipAddressIds")[0].ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("enableAcceleratedNetworking").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("commandLine").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("userIdentity").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("maxTaskRetryCount").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("waitForSuccess").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("applicationPackageReferences")[0].GetProperty("applicationId").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("applicationPackageReferences")[0].GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("password").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("elevationLevel").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("uid").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("gid").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("sshPrivateKey").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("windowsUserConfiguration").GetProperty("loginMode").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("metadata")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("metadata")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("accountName").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("containerName").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("accountKey").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("sasKey").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("blobfuseOptions").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("relativeMountPath").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("relativeMountPath").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("mountOptions").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("relativeMountPath").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("mountOptions").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("password").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("accountName").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("azureFileUrl").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("accountKey").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("relativeMountPath").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("mountOptions").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("targetNodeCommunicationMode").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("mode").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("disableAutomaticRollback").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("enableAutomaticOSUpgrade").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("useRollingUpgradePolicy").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("osRollingUpgradeDeferral").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("enableCrossZoneUpgrade").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxBatchInstancePercent").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxUnhealthyInstancePercent").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxUnhealthyUpgradedInstancePercent").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("pauseTimeBetweenBatches").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("prioritizeUnhealthyInstances").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("rollbackFailedInstancesOnPolicyBreach").ToString()); - Console.WriteLine(result.GetProperty("onAllTasksComplete").ToString()); - Console.WriteLine(result.GetProperty("onTaskFailure").ToString()); - Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("subnetId").ToString()); - Console.WriteLine(result.GetProperty("metadata")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("metadata")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("poolId").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("schedulingError").GetProperty("category").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("schedulingError").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("schedulingError").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("schedulingError").GetProperty("details")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("schedulingError").GetProperty("details")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("terminateReason").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("url").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("lastUpdateTime").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("userCPUTime").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("kernelCPUTime").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("wallClockTime").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("readIOps").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("writeIOps").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("readIOGiB").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("writeIOGiB").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("numSucceededTasks").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("numFailedTasks").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("numTaskRetries").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("waitTime").ToString()); -} ]]> - - -This sample shows how to call GetJobPreparationAndReleaseTaskStatusesAsync. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -await foreach (BatchJobPreparationAndReleaseTaskStatus item in client.GetJobPreparationAndReleaseTaskStatusesAsync("")) -{ -} -]]> -This sample shows how to call GetJobPreparationAndReleaseTaskStatusesAsync with all parameters. + + +This sample shows how to call GetJobPreparationAndReleaseTaskStatusesAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -await foreach (BatchJobPreparationAndReleaseTaskStatus item in client.GetJobPreparationAndReleaseTaskStatusesAsync("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), maxresults: 1234, filter: "", select: new string[] { "" })) +foreach (BatchJobPreparationAndReleaseTaskStatus item in client.GetJobPreparationAndReleaseTaskStatuses("jobId")) { } ]]> @@ -17819,785 +6043,97 @@ foreach (BatchJobPreparationAndReleaseTaskStatus item in client.GetJobPreparatio This sample shows how to call GetJobPreparationAndReleaseTaskStatusesAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -await foreach (BinaryData item in client.GetJobPreparationAndReleaseTaskStatusesAsync("", null, null, null, null, null, null)) +await foreach (BinaryData item in client.GetJobPreparationAndReleaseTaskStatusesAsync("jobId", null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.ToString()); } -]]> -This sample shows how to call GetJobPreparationAndReleaseTaskStatusesAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -await foreach (BinaryData item in client.GetJobPreparationAndReleaseTaskStatusesAsync("", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), 1234, "", new string[] { "" }, null)) -{ - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("poolId").ToString()); - Console.WriteLine(result.GetProperty("nodeId").ToString()); - Console.WriteLine(result.GetProperty("nodeUrl").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTaskExecutionInfo").GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTaskExecutionInfo").GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTaskExecutionInfo").GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTaskExecutionInfo").GetProperty("taskRootDirectory").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTaskExecutionInfo").GetProperty("taskRootDirectoryUrl").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTaskExecutionInfo").GetProperty("exitCode").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTaskExecutionInfo").GetProperty("containerInfo").GetProperty("containerId").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTaskExecutionInfo").GetProperty("containerInfo").GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTaskExecutionInfo").GetProperty("containerInfo").GetProperty("error").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTaskExecutionInfo").GetProperty("failureInfo").GetProperty("category").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTaskExecutionInfo").GetProperty("failureInfo").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTaskExecutionInfo").GetProperty("failureInfo").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTaskExecutionInfo").GetProperty("failureInfo").GetProperty("details")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTaskExecutionInfo").GetProperty("failureInfo").GetProperty("details")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTaskExecutionInfo").GetProperty("retryCount").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTaskExecutionInfo").GetProperty("lastRetryTime").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTaskExecutionInfo").GetProperty("result").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTaskExecutionInfo").GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTaskExecutionInfo").GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTaskExecutionInfo").GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTaskExecutionInfo").GetProperty("taskRootDirectory").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTaskExecutionInfo").GetProperty("taskRootDirectoryUrl").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTaskExecutionInfo").GetProperty("exitCode").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTaskExecutionInfo").GetProperty("containerInfo").GetProperty("containerId").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTaskExecutionInfo").GetProperty("containerInfo").GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTaskExecutionInfo").GetProperty("containerInfo").GetProperty("error").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTaskExecutionInfo").GetProperty("failureInfo").GetProperty("category").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTaskExecutionInfo").GetProperty("failureInfo").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTaskExecutionInfo").GetProperty("failureInfo").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTaskExecutionInfo").GetProperty("failureInfo").GetProperty("details")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTaskExecutionInfo").GetProperty("failureInfo").GetProperty("details")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTaskExecutionInfo").GetProperty("result").ToString()); -} ]]> This sample shows how to call GetJobSchedulesAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); await foreach (BatchJobSchedule item in client.GetJobSchedulesAsync()) { } -]]> -This sample shows how to call GetJobSchedulesAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -await foreach (BatchJobSchedule item in client.GetJobSchedulesAsync(timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), maxresults: 1234, filter: "", select: new string[] { "" }, expand: new string[] { "" })) -{ -} ]]> This sample shows how to call GetJobSchedulesAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -await foreach (BinaryData item in client.GetJobSchedulesAsync(null, null, null, null, null, null, null)) +await foreach (BinaryData item in client.GetJobSchedulesAsync(null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").ToString()); } -]]> -This sample shows how to call GetJobSchedulesAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -await foreach (BinaryData item in client.GetJobSchedulesAsync(1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), 1234, "", new string[] { "" }, new string[] { "" }, null)) -{ - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("url").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("lastModified").ToString()); - Console.WriteLine(result.GetProperty("creationTime").ToString()); - Console.WriteLine(result.GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("stateTransitionTime").ToString()); - Console.WriteLine(result.GetProperty("previousState").ToString()); - Console.WriteLine(result.GetProperty("previousStateTransitionTime").ToString()); - Console.WriteLine(result.GetProperty("schedule").GetProperty("doNotRunUntil").ToString()); - Console.WriteLine(result.GetProperty("schedule").GetProperty("doNotRunAfter").ToString()); - Console.WriteLine(result.GetProperty("schedule").GetProperty("startWindow").ToString()); - Console.WriteLine(result.GetProperty("schedule").GetProperty("recurrenceInterval").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("priority").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("allowTaskPreemption").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("maxParallelTasks").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("usesTaskDependencies").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("onAllTasksComplete").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("onTaskFailure").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("networkConfiguration").GetProperty("subnetId").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("constraints").GetProperty("maxWallClockTime").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("constraints").GetProperty("maxTaskRetryCount").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("commandLine").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("filePattern").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("path").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("containerUrl").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("uploadHeaders")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("uploadHeaders")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("uploadOptions").GetProperty("uploadCondition").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("constraints").GetProperty("maxWallClockTime").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("constraints").GetProperty("retentionTime").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("constraints").GetProperty("maxTaskRetryCount").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("requiredSlots").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("killJobOnCompletion").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("userIdentity").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("runExclusive").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("applicationPackageReferences")[0].GetProperty("applicationId").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("applicationPackageReferences")[0].GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("authenticationTokenSettings").GetProperty("access")[0].ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("allowLowPriorityNode").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("commandLine").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("constraints").GetProperty("maxWallClockTime").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("constraints").GetProperty("retentionTime").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("constraints").GetProperty("maxTaskRetryCount").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("waitForSuccess").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("userIdentity").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("rerunOnNodeRebootAfterSuccess").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("commandLine").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("maxWallClockTime").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("retentionTime").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("userIdentity").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("commonEnvironmentSettings")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("commonEnvironmentSettings")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("poolId").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("autoPoolIdPrefix").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("poolLifetimeOption").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("keepAlive").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("vmSize").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("publisher").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("offer").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("sku").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("virtualMachineImageId").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("exactVersion").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("nodeAgentSKUId").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("windowsConfiguration").GetProperty("enableAutomaticUpdates").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("lun").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("caching").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("diskSizeGB").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("storageAccountType").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("licenseType").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerImageNames")[0].ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("password").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("registryServer").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("diskEncryptionConfiguration").GetProperty("targets")[0].ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("nodePlacementConfiguration").GetProperty("policy").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("publisher").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("typeHandlerVersion").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("autoUpgradeMinorVersion").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("enableAutomaticUpgrade").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("settings").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("protectedSettings").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("provisionAfterExtensions")[0].ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("ephemeralOSDiskSettings").GetProperty("placement").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("caching").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("managedDisk").GetProperty("storageAccountType").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("writeAcceleratorEnabled").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("encryptionAtHost").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("securityType").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("uefiSettings").GetProperty("secureBootEnabled").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("uefiSettings").GetProperty("vTpmEnabled").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("serviceArtifactReference").GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("taskSlotsPerNode").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("taskSchedulingPolicy").GetProperty("nodeFillType").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("resizeTimeout").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("resourceTags").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("targetDedicatedNodes").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("targetLowPriorityNodes").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("enableAutoScale").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("autoScaleFormula").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("autoScaleEvaluationInterval").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("enableInterNodeCommunication").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("subnetId").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("dynamicVNetAssignmentScope").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("protocol").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("backendPort").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("frontendPortRangeStart").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("frontendPortRangeEnd").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("priority").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("access").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("sourceAddressPrefix").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("sourcePortRanges")[0].ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("publicIPAddressConfiguration").GetProperty("provision").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("publicIPAddressConfiguration").GetProperty("ipAddressIds")[0].ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("enableAcceleratedNetworking").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("commandLine").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("userIdentity").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("maxTaskRetryCount").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("waitForSuccess").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("applicationPackageReferences")[0].GetProperty("applicationId").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("applicationPackageReferences")[0].GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("password").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("elevationLevel").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("uid").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("gid").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("sshPrivateKey").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("windowsUserConfiguration").GetProperty("loginMode").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("metadata")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("metadata")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("accountName").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("containerName").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("accountKey").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("sasKey").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("blobfuseOptions").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("relativeMountPath").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("relativeMountPath").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("mountOptions").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("relativeMountPath").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("mountOptions").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("password").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("accountName").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("azureFileUrl").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("accountKey").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("relativeMountPath").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("mountOptions").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("targetNodeCommunicationMode").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("mode").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("disableAutomaticRollback").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("enableAutomaticOSUpgrade").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("useRollingUpgradePolicy").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("osRollingUpgradeDeferral").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("enableCrossZoneUpgrade").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxBatchInstancePercent").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxUnhealthyInstancePercent").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxUnhealthyUpgradedInstancePercent").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("pauseTimeBetweenBatches").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("prioritizeUnhealthyInstances").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("rollbackFailedInstancesOnPolicyBreach").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("metadata")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("metadata")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("nextRunTime").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("recentJob").GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("recentJob").GetProperty("url").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("metadata")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("metadata")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("url").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("lastUpdateTime").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("userCPUTime").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("kernelCPUTime").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("wallClockTime").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("readIOps").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("writeIOps").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("readIOGiB").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("writeIOGiB").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("numSucceededTasks").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("numFailedTasks").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("numTaskRetries").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("waitTime").ToString()); -} ]]> This sample shows how to call GetTasksAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -await foreach (BatchTask item in client.GetTasksAsync("")) -{ -} -]]> -This sample shows how to call GetTasksAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -await foreach (BatchTask item in client.GetTasksAsync("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), maxresults: 1234, filter: "", select: new string[] { "" }, expand: new string[] { "" })) +foreach (BatchTask item in client.GetTasks("jobId")) { } ]]> @@ -18629,279 +6155,41 @@ foreach (BatchTask item in client.GetTasks("", timeOutInSeconds: 1234, oc This sample shows how to call GetTasksAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -await foreach (BinaryData item in client.GetTasksAsync("", null, null, null, null, null, null, null)) +await foreach (BinaryData item in client.GetTasksAsync("jobId", null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.ToString()); } -]]> -This sample shows how to call GetTasksAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -await foreach (BinaryData item in client.GetTasksAsync("", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), 1234, "", new string[] { "" }, new string[] { "" }, null)) -{ - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("url").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("lastModified").ToString()); - Console.WriteLine(result.GetProperty("creationTime").ToString()); - Console.WriteLine(result.GetProperty("exitConditions").GetProperty("exitCodes")[0].GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("exitConditions").GetProperty("exitCodes")[0].GetProperty("exitOptions").GetProperty("jobAction").ToString()); - Console.WriteLine(result.GetProperty("exitConditions").GetProperty("exitCodes")[0].GetProperty("exitOptions").GetProperty("dependencyAction").ToString()); - Console.WriteLine(result.GetProperty("exitConditions").GetProperty("exitCodeRanges")[0].GetProperty("start").ToString()); - Console.WriteLine(result.GetProperty("exitConditions").GetProperty("exitCodeRanges")[0].GetProperty("end").ToString()); - Console.WriteLine(result.GetProperty("exitConditions").GetProperty("exitCodeRanges")[0].GetProperty("exitOptions").GetProperty("jobAction").ToString()); - Console.WriteLine(result.GetProperty("exitConditions").GetProperty("exitCodeRanges")[0].GetProperty("exitOptions").GetProperty("dependencyAction").ToString()); - Console.WriteLine(result.GetProperty("exitConditions").GetProperty("preProcessingError").GetProperty("jobAction").ToString()); - Console.WriteLine(result.GetProperty("exitConditions").GetProperty("preProcessingError").GetProperty("dependencyAction").ToString()); - Console.WriteLine(result.GetProperty("exitConditions").GetProperty("fileUploadError").GetProperty("jobAction").ToString()); - Console.WriteLine(result.GetProperty("exitConditions").GetProperty("fileUploadError").GetProperty("dependencyAction").ToString()); - Console.WriteLine(result.GetProperty("exitConditions").GetProperty("default").GetProperty("jobAction").ToString()); - Console.WriteLine(result.GetProperty("exitConditions").GetProperty("default").GetProperty("dependencyAction").ToString()); - Console.WriteLine(result.GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("stateTransitionTime").ToString()); - Console.WriteLine(result.GetProperty("previousState").ToString()); - Console.WriteLine(result.GetProperty("previousStateTransitionTime").ToString()); - Console.WriteLine(result.GetProperty("commandLine").ToString()); - Console.WriteLine(result.GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); - Console.WriteLine(result.GetProperty("containerSettings").GetProperty("imageName").ToString()); - Console.WriteLine(result.GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); - Console.WriteLine(result.GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); - Console.WriteLine(result.GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); - Console.WriteLine(result.GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); - Console.WriteLine(result.GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); - Console.WriteLine(result.GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); - Console.WriteLine(result.GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); - Console.WriteLine(result.GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); - Console.WriteLine(result.GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); - Console.WriteLine(result.GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("outputFiles")[0].GetProperty("filePattern").ToString()); - Console.WriteLine(result.GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("path").ToString()); - Console.WriteLine(result.GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("containerUrl").ToString()); - Console.WriteLine(result.GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("uploadHeaders")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("uploadHeaders")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("outputFiles")[0].GetProperty("uploadOptions").GetProperty("uploadCondition").ToString()); - Console.WriteLine(result.GetProperty("environmentSettings")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("environmentSettings")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("affinityInfo").GetProperty("affinityId").ToString()); - Console.WriteLine(result.GetProperty("constraints").GetProperty("maxWallClockTime").ToString()); - Console.WriteLine(result.GetProperty("constraints").GetProperty("retentionTime").ToString()); - Console.WriteLine(result.GetProperty("constraints").GetProperty("maxTaskRetryCount").ToString()); - Console.WriteLine(result.GetProperty("requiredSlots").ToString()); - Console.WriteLine(result.GetProperty("userIdentity").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); - Console.WriteLine(result.GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("exitCode").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("containerInfo").GetProperty("containerId").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("containerInfo").GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("containerInfo").GetProperty("error").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("failureInfo").GetProperty("category").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("failureInfo").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("failureInfo").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("failureInfo").GetProperty("details")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("failureInfo").GetProperty("details")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("retryCount").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("lastRetryTime").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("requeueCount").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("lastRequeueTime").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("result").ToString()); - Console.WriteLine(result.GetProperty("nodeInfo").GetProperty("affinityId").ToString()); - Console.WriteLine(result.GetProperty("nodeInfo").GetProperty("nodeUrl").ToString()); - Console.WriteLine(result.GetProperty("nodeInfo").GetProperty("poolId").ToString()); - Console.WriteLine(result.GetProperty("nodeInfo").GetProperty("nodeId").ToString()); - Console.WriteLine(result.GetProperty("nodeInfo").GetProperty("taskRootDirectory").ToString()); - Console.WriteLine(result.GetProperty("nodeInfo").GetProperty("taskRootDirectoryUrl").ToString()); - Console.WriteLine(result.GetProperty("multiInstanceSettings").GetProperty("numberOfInstances").ToString()); - Console.WriteLine(result.GetProperty("multiInstanceSettings").GetProperty("coordinationCommandLine").ToString()); - Console.WriteLine(result.GetProperty("multiInstanceSettings").GetProperty("commonResourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); - Console.WriteLine(result.GetProperty("multiInstanceSettings").GetProperty("commonResourceFiles")[0].GetProperty("storageContainerUrl").ToString()); - Console.WriteLine(result.GetProperty("multiInstanceSettings").GetProperty("commonResourceFiles")[0].GetProperty("httpUrl").ToString()); - Console.WriteLine(result.GetProperty("multiInstanceSettings").GetProperty("commonResourceFiles")[0].GetProperty("blobPrefix").ToString()); - Console.WriteLine(result.GetProperty("multiInstanceSettings").GetProperty("commonResourceFiles")[0].GetProperty("filePath").ToString()); - Console.WriteLine(result.GetProperty("multiInstanceSettings").GetProperty("commonResourceFiles")[0].GetProperty("fileMode").ToString()); - Console.WriteLine(result.GetProperty("multiInstanceSettings").GetProperty("commonResourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("url").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("lastUpdateTime").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("userCPUTime").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("kernelCPUTime").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("wallClockTime").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("readIOps").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("writeIOps").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("readIOGiB").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("writeIOGiB").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("waitTime").ToString()); - Console.WriteLine(result.GetProperty("dependsOn").GetProperty("taskIds")[0].ToString()); - Console.WriteLine(result.GetProperty("dependsOn").GetProperty("taskIdRanges")[0].GetProperty("start").ToString()); - Console.WriteLine(result.GetProperty("dependsOn").GetProperty("taskIdRanges")[0].GetProperty("end").ToString()); - Console.WriteLine(result.GetProperty("applicationPackageReferences")[0].GetProperty("applicationId").ToString()); - Console.WriteLine(result.GetProperty("applicationPackageReferences")[0].GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("authenticationTokenSettings").GetProperty("access")[0].ToString()); -} ]]> This sample shows how to call GetSubTasksAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -await foreach (BatchSubtask item in client.GetSubTasksAsync("", "")) -{ -} -]]> -This sample shows how to call GetSubTasksAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -await foreach (BatchSubtask item in client.GetSubTasksAsync("", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), select: new string[] { "" })) +foreach (BatchSubtask item in client.GetSubTasks("jobId", "taskId")) { } ]]> @@ -18933,119 +6211,41 @@ foreach (BatchSubtask item in client.GetSubTasks("", "", timeOutI This sample shows how to call GetSubTasksAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -await foreach (BinaryData item in client.GetSubTasksAsync("", "", null, null, null, null)) +await foreach (BinaryData item in client.GetSubTasksAsync("jobId", "taskId", null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.ToString()); } -]]> -This sample shows how to call GetSubTasksAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -await foreach (BinaryData item in client.GetSubTasksAsync("", "", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), new string[] { "" }, null)) -{ - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("nodeInfo").GetProperty("affinityId").ToString()); - Console.WriteLine(result.GetProperty("nodeInfo").GetProperty("nodeUrl").ToString()); - Console.WriteLine(result.GetProperty("nodeInfo").GetProperty("poolId").ToString()); - Console.WriteLine(result.GetProperty("nodeInfo").GetProperty("nodeId").ToString()); - Console.WriteLine(result.GetProperty("nodeInfo").GetProperty("taskRootDirectory").ToString()); - Console.WriteLine(result.GetProperty("nodeInfo").GetProperty("taskRootDirectoryUrl").ToString()); - Console.WriteLine(result.GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("exitCode").ToString()); - Console.WriteLine(result.GetProperty("containerInfo").GetProperty("containerId").ToString()); - Console.WriteLine(result.GetProperty("containerInfo").GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("containerInfo").GetProperty("error").ToString()); - Console.WriteLine(result.GetProperty("failureInfo").GetProperty("category").ToString()); - Console.WriteLine(result.GetProperty("failureInfo").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("failureInfo").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("failureInfo").GetProperty("details")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("failureInfo").GetProperty("details")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("stateTransitionTime").ToString()); - Console.WriteLine(result.GetProperty("previousState").ToString()); - Console.WriteLine(result.GetProperty("previousStateTransitionTime").ToString()); - Console.WriteLine(result.GetProperty("result").ToString()); -} ]]> This sample shows how to call GetTaskFilesAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -await foreach (BatchNodeFile item in client.GetTaskFilesAsync("", "")) -{ -} -]]> -This sample shows how to call GetTaskFilesAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -await foreach (BatchNodeFile item in client.GetTaskFilesAsync("", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), maxresults: 1234, filter: "", recursive: true)) +await foreach (BatchNodeFile item in client.GetTaskFilesAsync("jobId", "taskId")) { } ]]> @@ -19054,21 +6254,11 @@ await foreach (BatchNodeFile item in client.GetTaskFilesAsync("", " This sample shows how to call GetTaskFiles. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -foreach (BatchNodeFile item in client.GetTaskFiles("", "")) -{ -} -]]> -This sample shows how to call GetTaskFiles with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -foreach (BatchNodeFile item in client.GetTaskFiles("", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), maxresults: 1234, filter: "", recursive: true)) +foreach (BatchNodeFile item in client.GetTaskFiles("jobId", "taskId")) { } ]]> @@ -19077,89 +6267,41 @@ foreach (BatchNodeFile item in client.GetTaskFiles("", "", timeOu This sample shows how to call GetTaskFilesAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -await foreach (BinaryData item in client.GetTaskFilesAsync("", "", null, null, null, null, null, null)) +await foreach (BinaryData item in client.GetTaskFilesAsync("jobId", "taskId", null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null, null, false, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.ToString()); } -]]> -This sample shows how to call GetTaskFilesAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -await foreach (BinaryData item in client.GetTaskFilesAsync("", "", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), 1234, "", true, null)) -{ - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("url").ToString()); - Console.WriteLine(result.GetProperty("isDirectory").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("creationTime").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("lastModified").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("contentLength").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("contentType").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("fileMode").ToString()); -} ]]> This sample shows how to call GetTaskFiles and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -foreach (BinaryData item in client.GetTaskFiles("", "", null, null, null, null, null, null)) +foreach (BinaryData item in client.GetTaskFiles("jobId", "taskId", null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null, null, false, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.ToString()); } -]]> -This sample shows how to call GetTaskFiles with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -foreach (BinaryData item in client.GetTaskFiles("", "", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), 1234, "", true, null)) -{ - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("url").ToString()); - Console.WriteLine(result.GetProperty("isDirectory").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("creationTime").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("lastModified").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("contentLength").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("contentType").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("fileMode").ToString()); -} ]]> This sample shows how to call GetNodesAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -await foreach (BatchNode item in client.GetNodesAsync("")) -{ -} -]]> -This sample shows how to call GetNodesAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -await foreach (BatchNode item in client.GetNodesAsync("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), maxresults: 1234, filter: "", select: new string[] { "" })) +foreach (BatchNode item in client.GetNodes("poolId")) { } ]]> @@ -19191,257 +6323,41 @@ foreach (BatchNode item in client.GetNodes("", timeOutInSeconds: 1234, o This sample shows how to call GetNodesAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -await foreach (BinaryData item in client.GetNodesAsync("", null, null, null, null, null, null)) +await foreach (BinaryData item in client.GetNodesAsync("poolId", null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.ToString()); } -]]> -This sample shows how to call GetNodesAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -await foreach (BinaryData item in client.GetNodesAsync("", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), 1234, "", new string[] { "" }, null)) -{ - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("url").ToString()); - Console.WriteLine(result.GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("schedulingState").ToString()); - Console.WriteLine(result.GetProperty("stateTransitionTime").ToString()); - Console.WriteLine(result.GetProperty("lastBootTime").ToString()); - Console.WriteLine(result.GetProperty("allocationTime").ToString()); - Console.WriteLine(result.GetProperty("ipAddress").ToString()); - Console.WriteLine(result.GetProperty("affinityId").ToString()); - Console.WriteLine(result.GetProperty("vmSize").ToString()); - Console.WriteLine(result.GetProperty("totalTasksRun").ToString()); - Console.WriteLine(result.GetProperty("runningTasksCount").ToString()); - Console.WriteLine(result.GetProperty("runningTaskSlotsCount").ToString()); - Console.WriteLine(result.GetProperty("totalTasksSucceeded").ToString()); - Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("taskUrl").ToString()); - Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("jobId").ToString()); - Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("taskId").ToString()); - Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("subtaskId").ToString()); - Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("taskState").ToString()); - Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("exitCode").ToString()); - Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("containerInfo").GetProperty("containerId").ToString()); - Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("containerInfo").GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("containerInfo").GetProperty("error").ToString()); - Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("failureInfo").GetProperty("category").ToString()); - Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("failureInfo").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("failureInfo").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("failureInfo").GetProperty("details")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("failureInfo").GetProperty("details")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("retryCount").ToString()); - Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("lastRetryTime").ToString()); - Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("requeueCount").ToString()); - Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("lastRequeueTime").ToString()); - Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("result").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("commandLine").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("userIdentity").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("maxTaskRetryCount").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("waitForSuccess").ToString()); - Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("exitCode").ToString()); - Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("containerInfo").GetProperty("containerId").ToString()); - Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("containerInfo").GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("containerInfo").GetProperty("error").ToString()); - Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("failureInfo").GetProperty("category").ToString()); - Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("failureInfo").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("failureInfo").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("failureInfo").GetProperty("details")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("failureInfo").GetProperty("details")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("retryCount").ToString()); - Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("lastRetryTime").ToString()); - Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("result").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("errorDetails")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("errorDetails")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("isDedicated").ToString()); - Console.WriteLine(result.GetProperty("endpointConfiguration").GetProperty("inboundEndpoints")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("endpointConfiguration").GetProperty("inboundEndpoints")[0].GetProperty("protocol").ToString()); - Console.WriteLine(result.GetProperty("endpointConfiguration").GetProperty("inboundEndpoints")[0].GetProperty("publicIPAddress").ToString()); - Console.WriteLine(result.GetProperty("endpointConfiguration").GetProperty("inboundEndpoints")[0].GetProperty("publicFQDN").ToString()); - Console.WriteLine(result.GetProperty("endpointConfiguration").GetProperty("inboundEndpoints")[0].GetProperty("frontendPort").ToString()); - Console.WriteLine(result.GetProperty("endpointConfiguration").GetProperty("inboundEndpoints")[0].GetProperty("backendPort").ToString()); - Console.WriteLine(result.GetProperty("nodeAgentInfo").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("nodeAgentInfo").GetProperty("lastUpdateTime").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineInfo").GetProperty("imageReference").GetProperty("publisher").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineInfo").GetProperty("imageReference").GetProperty("offer").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineInfo").GetProperty("imageReference").GetProperty("sku").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineInfo").GetProperty("imageReference").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineInfo").GetProperty("imageReference").GetProperty("virtualMachineImageId").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineInfo").GetProperty("imageReference").GetProperty("exactVersion").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineInfo").GetProperty("scaleSetVmResourceId").ToString()); -} ]]> This sample shows how to call GetNodeExtensionsAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -await foreach (BatchNodeVMExtension item in client.GetNodeExtensionsAsync("", "")) -{ -} -]]> -This sample shows how to call GetNodeExtensionsAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -await foreach (BatchNodeVMExtension item in client.GetNodeExtensionsAsync("", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), maxresults: 1234, select: new string[] { "" })) +foreach (BatchNodeVMExtension item in client.GetNodeExtensions("poolId", "tvm-1695681911_2-20161122t193202z")) { } ]]> @@ -19473,115 +6379,41 @@ foreach (BatchNodeVMExtension item in client.GetNodeExtensions("", " This sample shows how to call GetNodeExtensionsAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -await foreach (BinaryData item in client.GetNodeExtensionsAsync("", "", null, null, null, null, null)) +await foreach (BinaryData item in client.GetNodeExtensionsAsync("poolId", "tvm-1695681911_2-20161122t193202z", null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.ToString()); } -]]> -This sample shows how to call GetNodeExtensionsAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -await foreach (BinaryData item in client.GetNodeExtensionsAsync("", "", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), 1234, new string[] { "" }, null)) -{ - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("provisioningState").ToString()); - Console.WriteLine(result.GetProperty("vmExtension").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("vmExtension").GetProperty("publisher").ToString()); - Console.WriteLine(result.GetProperty("vmExtension").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("vmExtension").GetProperty("typeHandlerVersion").ToString()); - Console.WriteLine(result.GetProperty("vmExtension").GetProperty("autoUpgradeMinorVersion").ToString()); - Console.WriteLine(result.GetProperty("vmExtension").GetProperty("enableAutomaticUpgrade").ToString()); - Console.WriteLine(result.GetProperty("vmExtension").GetProperty("settings").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("vmExtension").GetProperty("protectedSettings").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("vmExtension").GetProperty("provisionAfterExtensions")[0].ToString()); - Console.WriteLine(result.GetProperty("instanceView").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("instanceView").GetProperty("statuses")[0].GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("instanceView").GetProperty("statuses")[0].GetProperty("displayStatus").ToString()); - Console.WriteLine(result.GetProperty("instanceView").GetProperty("statuses")[0].GetProperty("level").ToString()); - Console.WriteLine(result.GetProperty("instanceView").GetProperty("statuses")[0].GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("instanceView").GetProperty("statuses")[0].GetProperty("time").ToString()); - Console.WriteLine(result.GetProperty("instanceView").GetProperty("subStatuses")[0].GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("instanceView").GetProperty("subStatuses")[0].GetProperty("displayStatus").ToString()); - Console.WriteLine(result.GetProperty("instanceView").GetProperty("subStatuses")[0].GetProperty("level").ToString()); - Console.WriteLine(result.GetProperty("instanceView").GetProperty("subStatuses")[0].GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("instanceView").GetProperty("subStatuses")[0].GetProperty("time").ToString()); -} ]]> This sample shows how to call GetNodeFilesAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -await foreach (BatchNodeFile item in client.GetNodeFilesAsync("", "")) -{ -} -]]> -This sample shows how to call GetNodeFilesAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -await foreach (BatchNodeFile item in client.GetNodeFilesAsync("", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), maxresults: 1234, filter: "", recursive: true)) +await foreach (BatchNodeFile item in client.GetNodeFilesAsync("poolId", "tvm-1695681911_1-20161122t193202z")) { } ]]> @@ -19590,21 +6422,11 @@ await foreach (BatchNodeFile item in client.GetNodeFilesAsync("", " This sample shows how to call GetNodeFiles. "); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -foreach (BatchNodeFile item in client.GetNodeFiles("", "")) -{ -} -]]> -This sample shows how to call GetNodeFiles with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -foreach (BatchNodeFile item in client.GetNodeFiles("", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), maxresults: 1234, filter: "", recursive: true)) +foreach (BatchNodeFile item in client.GetNodeFiles("poolId", "tvm-1695681911_1-20161122t193202z")) { } ]]> @@ -19613,68 +6435,30 @@ foreach (BatchNodeFile item in client.GetNodeFiles("", "", timeO This sample shows how to call GetNodeFilesAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -await foreach (BinaryData item in client.GetNodeFilesAsync("", "", null, null, null, null, null, null)) +await foreach (BinaryData item in client.GetNodeFilesAsync("poolId", "tvm-1695681911_1-20161122t193202z", null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null, null, false, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.ToString()); } -]]> -This sample shows how to call GetNodeFilesAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -await foreach (BinaryData item in client.GetNodeFilesAsync("", "", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), 1234, "", true, null)) -{ - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("url").ToString()); - Console.WriteLine(result.GetProperty("isDirectory").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("creationTime").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("lastModified").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("contentLength").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("contentType").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("fileMode").ToString()); -} ]]> This sample shows how to call GetNodeFiles and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); -foreach (BinaryData item in client.GetNodeFiles("", "", null, null, null, null, null, null)) +foreach (BinaryData item in client.GetNodeFiles("poolId", "tvm-1695681911_1-20161122t193202z", null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null, null, false, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.ToString()); } -]]> -This sample shows how to call GetNodeFiles with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -BatchClient client = new BatchClient(endpoint, credential); - -foreach (BinaryData item in client.GetNodeFiles("", "", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), 1234, "", true, null)) -{ - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("url").ToString()); - Console.WriteLine(result.GetProperty("isDirectory").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("creationTime").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("lastModified").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("contentLength").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("contentType").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("fileMode").ToString()); -} ]]> diff --git a/sdk/batch/Azure.Compute.Batch/tests/Generated/Samples/Samples_BatchClient.cs b/sdk/batch/Azure.Compute.Batch/tests/Generated/Samples/Samples_BatchClient.cs index 60acc2870e92..274be47c20ed 100644 --- a/sdk/batch/Azure.Compute.Batch/tests/Generated/Samples/Samples_BatchClient.cs +++ b/sdk/batch/Azure.Compute.Batch/tests/Generated/Samples/Samples_BatchClient.cs @@ -20,13 +20,13 @@ public partial class Samples_BatchClient { [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetApplication_ShortVersion() + public void Example_Batch_GetApplication_GetApplications() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - Response response = client.GetApplication("", null, null, null); + Response response = client.GetApplication("my_application_id", null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); @@ -36,13 +36,13 @@ public void Example_Batch_GetApplication_ShortVersion() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetApplication_ShortVersion_Async() + public async Task Example_Batch_GetApplication_GetApplications_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - Response response = await client.GetApplicationAsync("", null, null, null); + Response response = await client.GetApplicationAsync("my_application_id", null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); @@ -52,92 +52,54 @@ public async Task Example_Batch_GetApplication_ShortVersion_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetApplication_ShortVersion_Convenience() + public void Example_Batch_GetApplication_GetApplications_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - Response response = client.GetApplication(""); + Response response = client.GetApplication("my_application_id"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetApplication_ShortVersion_Convenience_Async() + public async Task Example_Batch_GetApplication_GetApplications_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - Response response = await client.GetApplicationAsync(""); + Response response = await client.GetApplicationAsync("my_application_id"); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetApplication_AllParameters() + public void Example_Batch_CreatePool_CreatesAPoolWithAcceleratedNetworking() { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - Response response = client.GetApplication("", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("versions")[0].ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetApplication_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - Response response = await client.GetApplicationAsync("", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("versions")[0].ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetApplication_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - Response response = client.GetApplication("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetApplication_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - Response response = await client.GetApplicationAsync("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_CreatePool_ShortVersion() - { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - id = "", - vmSize = "", + id = "mypool01", + vmSize = "Standard_D1_v2", + virtualMachineConfiguration = new + { + imageReference = new + { + publisher = "MicrosoftWindowsServer", + offer = "WindowsServer", + sku = "2016-datacenter-smalldisk", + version = "latest", + }, + nodeAgentSKUId = "batch.node.windows amd64", + }, + targetDedicatedNodes = 2, + networkConfiguration = new + { + enableAcceleratedNetworking = true, + }, }); Response response = client.CreatePool(content); @@ -146,16 +108,32 @@ public void Example_Batch_CreatePool_ShortVersion() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_CreatePool_ShortVersion_Async() + public async Task Example_Batch_CreatePool_CreatesAPoolWithAcceleratedNetworking_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - id = "", - vmSize = "", + id = "mypool01", + vmSize = "Standard_D1_v2", + virtualMachineConfiguration = new + { + imageReference = new + { + publisher = "MicrosoftWindowsServer", + offer = "WindowsServer", + sku = "2016-datacenter-smalldisk", + version = "latest", + }, + nodeAgentSKUId = "batch.node.windows amd64", + }, + targetDedicatedNodes = 2, + networkConfiguration = new + { + enableAcceleratedNetworking = true, + }, }); Response response = await client.CreatePoolAsync(content); @@ -164,2395 +142,1723 @@ public async Task Example_Batch_CreatePool_ShortVersion_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_CreatePool_ShortVersion_Convenience() + public void Example_Batch_CreatePool_CreatesAPoolWithAcceleratedNetworking_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - BatchPoolCreateContent pool = new BatchPoolCreateContent("", ""); + BatchPoolCreateContent pool = new BatchPoolCreateContent("mypool01", "Standard_D1_v2") + { + VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference + { + Publisher = "MicrosoftWindowsServer", + Offer = "WindowsServer", + Sku = "2016-datacenter-smalldisk", + Version = "latest", + }, "batch.node.windows amd64"), + TargetDedicatedNodes = 2, + NetworkConfiguration = new NetworkConfiguration + { + EnableAcceleratedNetworking = true, + }, + }; Response response = client.CreatePool(pool); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_CreatePool_ShortVersion_Convenience_Async() + public async Task Example_Batch_CreatePool_CreatesAPoolWithAcceleratedNetworking_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - BatchPoolCreateContent pool = new BatchPoolCreateContent("", ""); + BatchPoolCreateContent pool = new BatchPoolCreateContent("mypool01", "Standard_D1_v2") + { + VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference + { + Publisher = "MicrosoftWindowsServer", + Offer = "WindowsServer", + Sku = "2016-datacenter-smalldisk", + Version = "latest", + }, "batch.node.windows amd64"), + TargetDedicatedNodes = 2, + NetworkConfiguration = new NetworkConfiguration + { + EnableAcceleratedNetworking = true, + }, + }; Response response = await client.CreatePoolAsync(pool); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_CreatePool_AllParameters() + public void Example_Batch_CreatePool_CreatesAPoolWithMountDriveSpecified() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - id = "", - displayName = "", - vmSize = "", + id = "pool2", + vmSize = "standard_a1", virtualMachineConfiguration = new { imageReference = new { - publisher = "", - offer = "", - sku = "", - version = "", - virtualMachineImageId = "", - }, - nodeAgentSKUId = "", - windowsConfiguration = new - { - enableAutomaticUpdates = true, + publisher = "Canonical", + offer = "UbuntuServer", + sku = "20_04-lts", }, - dataDisks = new object[] + nodeAgentSKUId = "batch.node.ubuntu 20.04", + }, + mountConfiguration = new object[] { new { -lun = 1234, -caching = "none", -diskSizeGB = 1234, -storageAccountType = "standard_lrs", -} - }, - licenseType = "", - containerConfiguration = new - { - type = "dockerCompatible", - containerImageNames = new object[] - { -"" - }, - containerRegistries = new object[] - { +azureBlobFileSystemConfiguration = new +{ +accountName = "accountName", +containerName = "blobContainerName", +accountKey = "accountKey", +relativeMountPath = "bfusepath", +}, +}, new { -username = "", -password = "", -registryServer = "", -identityReference = new +azureFileShareConfiguration = new { -resourceId = "", +accountName = "accountName", +azureFileUrl = "https://myaccount.file.core.windows.net/fileshare", +accountKey = "accountKey", +relativeMountPath = "filesharepath", +mountOptions = "mount options ver=1.0", +}, }, -} - }, - }, - diskEncryptionConfiguration = new - { - targets = new object[] - { -"osdisk" - }, - }, - nodePlacementConfiguration = new - { - policy = "regional", - }, - extensions = new object[] - { new { -name = "", -publisher = "", -type = "", -typeHandlerVersion = "", -autoUpgradeMinorVersion = true, -enableAutomaticUpgrade = true, -settings = new +nfsMountConfiguration = new { -key = "", +source = "somesource nfs url", +relativeMountPath = "mountpath", +mountOptions = "mount options ver=1.0", }, -protectedSettings = new -{ -key = "", }, -provisionAfterExtensions = new object[] +new +{ +cifsMountConfiguration = new { -"" +username = "accountName", +password = "password", +source = "//myaccount.file.core.windows.net/file", +relativeMountPath = "mountpath", +mountOptions = "mount options ver=1.0", }, } }, - osDisk = new - { - ephemeralOSDiskSettings = new - { - placement = "cachedisk", - }, - caching = "none", - diskSizeGB = 1234, - managedDisk = new - { - storageAccountType = "standard_lrs", - }, - writeAcceleratorEnabled = true, - }, - securityProfile = new - { - encryptionAtHost = true, - securityType = "trustedLaunch", - uefiSettings = new - { - secureBootEnabled = true, - vTpmEnabled = true, - }, - }, - serviceArtifactReference = new - { - id = "", - }, - }, - resizeTimeout = "PT1H23M45S", - resourceTags = new + resizeTimeout = "PT15M", + targetDedicatedNodes = 5, + targetLowPriorityNodes = 0, + taskSlotsPerNode = 3, + taskSchedulingPolicy = new { - key = "", + nodeFillType = "spread", }, - targetDedicatedNodes = 1234, - targetLowPriorityNodes = 1234, - enableAutoScale = true, - autoScaleFormula = "", - autoScaleEvaluationInterval = "PT1H23M45S", - enableInterNodeCommunication = true, - networkConfiguration = new + enableAutoScale = false, + }); + Response response = client.CreatePool(content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_CreatePool_CreatesAPoolWithMountDriveSpecified_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + id = "pool2", + vmSize = "standard_a1", + virtualMachineConfiguration = new { - subnetId = "", - dynamicVNetAssignmentScope = "none", - endpointConfiguration = new + imageReference = new { - inboundNATPools = new object[] + publisher = "Canonical", + offer = "UbuntuServer", + sku = "20_04-lts", + }, + nodeAgentSKUId = "batch.node.ubuntu 20.04", + }, + mountConfiguration = new object[] { new { -name = "", -protocol = "tcp", -backendPort = 1234, -frontendPortRangeStart = 1234, -frontendPortRangeEnd = 1234, -networkSecurityGroupRules = new object[] +azureBlobFileSystemConfiguration = new { +accountName = "accountName", +containerName = "blobContainerName", +accountKey = "accountKey", +relativeMountPath = "bfusepath", +}, +}, new { -priority = 1234, -access = "allow", -sourceAddressPrefix = "", -sourcePortRanges = new object[] +azureFileShareConfiguration = new { -"" +accountName = "accountName", +azureFileUrl = "https://myaccount.file.core.windows.net/fileshare", +accountKey = "accountKey", +relativeMountPath = "filesharepath", +mountOptions = "mount options ver=1.0", }, -} }, -} - }, - }, - publicIPAddressConfiguration = new - { - provision = "batchmanaged", - ipAddressIds = new object[] - { -"" - }, - }, - enableAcceleratedNetworking = true, - }, - startTask = new - { - commandLine = "", - containerSettings = new - { - containerRunOptions = "", - imageName = "", - workingDirectory = "taskWorkingDirectory", - }, - resourceFiles = new object[] - { new { -autoStorageContainerName = "", -storageContainerUrl = "", -httpUrl = "", -blobPrefix = "", -filePath = "", -fileMode = "", -} - }, - environmentSettings = new object[] - { -new +nfsMountConfiguration = new { -name = "", -value = "", -} - }, - userIdentity = new - { - username = "", - autoUser = new - { - scope = "task", - elevationLevel = "nonadmin", - }, - }, - maxTaskRetryCount = 1234, - waitForSuccess = true, - }, - applicationPackageReferences = new object[] - { +source = "somesource nfs url", +relativeMountPath = "mountpath", +mountOptions = "mount options ver=1.0", +}, +}, new { -applicationId = "", -version = "", +cifsMountConfiguration = new +{ +username = "accountName", +password = "password", +source = "//myaccount.file.core.windows.net/file", +relativeMountPath = "mountpath", +mountOptions = "mount options ver=1.0", +}, } }, - taskSlotsPerNode = 1234, + resizeTimeout = "PT15M", + targetDedicatedNodes = 5, + targetLowPriorityNodes = 0, + taskSlotsPerNode = 3, taskSchedulingPolicy = new { nodeFillType = "spread", }, - userAccounts = new object[] + enableAutoScale = false, + }); + Response response = await client.CreatePoolAsync(content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_CreatePool_CreatesAPoolWithMountDriveSpecified_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchPoolCreateContent pool = new BatchPoolCreateContent("pool2", "standard_a1") { -new -{ -name = "", -password = "", -elevationLevel = "nonadmin", -linuxUserConfiguration = new + VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference + { + Publisher = "Canonical", + Offer = "UbuntuServer", + Sku = "20_04-lts", + }, "batch.node.ubuntu 20.04"), + ResizeTimeout = XmlConvert.ToTimeSpan("PT15M"), + TargetDedicatedNodes = 5, + TargetLowPriorityNodes = 0, + EnableAutoScale = false, + TaskSlotsPerNode = 3, + TaskSchedulingPolicy = new BatchTaskSchedulingPolicy(BatchNodeFillType.Spread), + MountConfiguration = {new MountConfiguration { -uid = 1234, -gid = 1234, -sshPrivateKey = "", -}, -windowsUserConfiguration = new +AzureBlobFileSystemConfiguration = new AzureBlobFileSystemConfiguration("accountName", "blobContainerName", "bfusepath") { -loginMode = "batch", +AccountKey = "accountKey", }, -} - }, - metadata = new object[] - { -new -{ -name = "", -value = "", -} - }, - mountConfiguration = new object[] - { -new +}, new MountConfiguration { -azureBlobFileSystemConfiguration = new +AzureFileShareConfiguration = new AzureFileShareConfiguration("accountName", "https://myaccount.file.core.windows.net/fileshare", "accountKey", "filesharepath") { -accountName = "", -containerName = "", -accountKey = "", -sasKey = "", -blobfuseOptions = "", -relativeMountPath = "", +MountOptions = "mount options ver=1.0", }, -nfsMountConfiguration = new +}, new MountConfiguration { -source = "", -relativeMountPath = "", -mountOptions = "", -}, -cifsMountConfiguration = new +NfsMountConfiguration = new NfsMountConfiguration("somesource nfs url", "mountpath") { -username = "", -source = "", -relativeMountPath = "", -mountOptions = "", -password = "", +MountOptions = "mount options ver=1.0", }, -azureFileShareConfiguration = new +}, new MountConfiguration { -accountName = "", -azureFileUrl = "", -accountKey = "", -relativeMountPath = "", -mountOptions = "", +CifsMountConfiguration = new CifsMountConfiguration("accountName", "//myaccount.file.core.windows.net/file", "mountpath", "password") +{ +MountOptions = "mount options ver=1.0", }, -} - }, - targetNodeCommunicationMode = "default", - upgradePolicy = new - { - mode = "automatic", - automaticOSUpgradePolicy = new - { - disableAutomaticRollback = true, - enableAutomaticOSUpgrade = true, - useRollingUpgradePolicy = true, - osRollingUpgradeDeferral = true, - }, - rollingUpgradePolicy = new - { - enableCrossZoneUpgrade = true, - maxBatchInstancePercent = 1234, - maxUnhealthyInstancePercent = 1234, - maxUnhealthyUpgradedInstancePercent = 1234, - pauseTimeBetweenBatches = "PT1H23M45S", - prioritizeUnhealthyInstances = true, - rollbackFailedInstancesOnPolicyBreach = true, - }, - }, - }); - Response response = client.CreatePool(content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); - - Console.WriteLine(response.Status); +}}, + }; + Response response = client.CreatePool(pool); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_CreatePool_AllParameters_Async() + public async Task Example_Batch_CreatePool_CreatesAPoolWithMountDriveSpecified_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - using RequestContent content = RequestContent.Create(new + BatchPoolCreateContent pool = new BatchPoolCreateContent("pool2", "standard_a1") { - id = "", - displayName = "", - vmSize = "", - virtualMachineConfiguration = new + VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference { - imageReference = new - { - publisher = "", - offer = "", - sku = "", - version = "", - virtualMachineImageId = "", - }, - nodeAgentSKUId = "", - windowsConfiguration = new - { - enableAutomaticUpdates = true, - }, - dataDisks = new object[] - { -new -{ -lun = 1234, -caching = "none", -diskSizeGB = 1234, -storageAccountType = "standard_lrs", -} - }, - licenseType = "", - containerConfiguration = new - { - type = "dockerCompatible", - containerImageNames = new object[] - { -"" - }, - containerRegistries = new object[] - { -new + Publisher = "Canonical", + Offer = "UbuntuServer", + Sku = "20_04-lts", + }, "batch.node.ubuntu 20.04"), + ResizeTimeout = XmlConvert.ToTimeSpan("PT15M"), + TargetDedicatedNodes = 5, + TargetLowPriorityNodes = 0, + EnableAutoScale = false, + TaskSlotsPerNode = 3, + TaskSchedulingPolicy = new BatchTaskSchedulingPolicy(BatchNodeFillType.Spread), + MountConfiguration = {new MountConfiguration { -username = "", -password = "", -registryServer = "", -identityReference = new +AzureBlobFileSystemConfiguration = new AzureBlobFileSystemConfiguration("accountName", "blobContainerName", "bfusepath") { -resourceId = "", +AccountKey = "accountKey", }, -} - }, - }, - diskEncryptionConfiguration = new - { - targets = new object[] - { -"osdisk" - }, - }, - nodePlacementConfiguration = new - { - policy = "regional", - }, - extensions = new object[] - { -new +}, new MountConfiguration { -name = "", -publisher = "", -type = "", -typeHandlerVersion = "", -autoUpgradeMinorVersion = true, -enableAutomaticUpgrade = true, -settings = new +AzureFileShareConfiguration = new AzureFileShareConfiguration("accountName", "https://myaccount.file.core.windows.net/fileshare", "accountKey", "filesharepath") { -key = "", +MountOptions = "mount options ver=1.0", }, -protectedSettings = new +}, new MountConfiguration { -key = "", +NfsMountConfiguration = new NfsMountConfiguration("somesource nfs url", "mountpath") +{ +MountOptions = "mount options ver=1.0", }, -provisionAfterExtensions = new object[] +}, new MountConfiguration +{ +CifsMountConfiguration = new CifsMountConfiguration("accountName", "//myaccount.file.core.windows.net/file", "mountpath", "password") { -"" +MountOptions = "mount options ver=1.0", }, -} - }, +}}, + }; + Response response = await client.CreatePoolAsync(pool); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_CreatePool_CreatesAVirtualMachineConfigurationPoolWithOSDisk() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + id = "mypool001", + vmSize = "standard_d2s_v3", + virtualMachineConfiguration = new + { + imageReference = new + { + publisher = "Canonical", + offer = "0001-com-ubuntu-server-focal", + sku = "20_04-lts", + }, osDisk = new { - ephemeralOSDiskSettings = new - { - placement = "cachedisk", - }, - caching = "none", - diskSizeGB = 1234, + diskSizeGB = 100, managedDisk = new { - storageAccountType = "standard_lrs", + storageAccountType = "standardssd_lrs", }, - writeAcceleratorEnabled = true, - }, - securityProfile = new - { - encryptionAtHost = true, - securityType = "trustedLaunch", - uefiSettings = new + caching = "readwrite", + ephemeralOSDiskSettings = new { - secureBootEnabled = true, - vTpmEnabled = true, + placement = "cachedisk", }, }, - serviceArtifactReference = new - { - id = "", - }, - }, - resizeTimeout = "PT1H23M45S", - resourceTags = new - { - key = "", + nodeAgentSKUId = "batch.node.ubuntu 20.04", }, - targetDedicatedNodes = 1234, - targetLowPriorityNodes = 1234, - enableAutoScale = true, - autoScaleFormula = "", - autoScaleEvaluationInterval = "PT1H23M45S", - enableInterNodeCommunication = true, - networkConfiguration = new - { - subnetId = "", - dynamicVNetAssignmentScope = "none", - endpointConfiguration = new - { - inboundNATPools = new object[] - { -new -{ -name = "", -protocol = "tcp", -backendPort = 1234, -frontendPortRangeStart = 1234, -frontendPortRangeEnd = 1234, -networkSecurityGroupRules = new object[] -{ -new -{ -priority = 1234, -access = "allow", -sourceAddressPrefix = "", -sourcePortRanges = new object[] -{ -"" -}, -} -}, -} - }, - }, - publicIPAddressConfiguration = new - { - provision = "batchmanaged", - ipAddressIds = new object[] + resizeTimeout = "PT15M", + targetDedicatedNodes = 1, + targetLowPriorityNodes = 0, + taskSlotsPerNode = 1, + enableAutoScale = false, + }); + Response response = client.CreatePool(content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_CreatePool_CreatesAVirtualMachineConfigurationPoolWithOSDisk_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new { -"" - }, - }, - enableAcceleratedNetworking = true, - }, - startTask = new + id = "mypool001", + vmSize = "standard_d2s_v3", + virtualMachineConfiguration = new { - commandLine = "", - containerSettings = new + imageReference = new { - containerRunOptions = "", - imageName = "", - workingDirectory = "taskWorkingDirectory", + publisher = "Canonical", + offer = "0001-com-ubuntu-server-focal", + sku = "20_04-lts", }, - resourceFiles = new object[] - { -new -{ -autoStorageContainerName = "", -storageContainerUrl = "", -httpUrl = "", -blobPrefix = "", -filePath = "", -fileMode = "", -} - }, - environmentSettings = new object[] - { -new -{ -name = "", -value = "", -} - }, - userIdentity = new + osDisk = new { - username = "", - autoUser = new + diskSizeGB = 100, + managedDisk = new { - scope = "task", - elevationLevel = "nonadmin", + storageAccountType = "standardssd_lrs", + }, + caching = "readwrite", + ephemeralOSDiskSettings = new + { + placement = "cachedisk", }, }, - maxTaskRetryCount = 1234, - waitForSuccess = true, + nodeAgentSKUId = "batch.node.ubuntu 20.04", }, - applicationPackageReferences = new object[] + resizeTimeout = "PT15M", + targetDedicatedNodes = 1, + targetLowPriorityNodes = 0, + taskSlotsPerNode = 1, + enableAutoScale = false, + }); + Response response = await client.CreatePoolAsync(content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_CreatePool_CreatesAVirtualMachineConfigurationPoolWithOSDisk_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchPoolCreateContent pool = new BatchPoolCreateContent("mypool001", "standard_d2s_v3") { -new -{ -applicationId = "", -version = "", -} - }, - taskSlotsPerNode = 1234, - taskSchedulingPolicy = new + VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference { - nodeFillType = "spread", - }, - userAccounts = new object[] - { -new -{ -name = "", -password = "", -elevationLevel = "nonadmin", -linuxUserConfiguration = new -{ -uid = 1234, -gid = 1234, -sshPrivateKey = "", -}, -windowsUserConfiguration = new -{ -loginMode = "batch", -}, -} - }, - metadata = new object[] - { -new -{ -name = "", -value = "", -} - }, - mountConfiguration = new object[] - { -new -{ -azureBlobFileSystemConfiguration = new -{ -accountName = "", -containerName = "", -accountKey = "", -sasKey = "", -blobfuseOptions = "", -relativeMountPath = "", -}, -nfsMountConfiguration = new -{ -source = "", -relativeMountPath = "", -mountOptions = "", -}, -cifsMountConfiguration = new -{ -username = "", -source = "", -relativeMountPath = "", -mountOptions = "", -password = "", -}, -azureFileShareConfiguration = new -{ -accountName = "", -azureFileUrl = "", -accountKey = "", -relativeMountPath = "", -mountOptions = "", -}, -} - }, - targetNodeCommunicationMode = "default", - upgradePolicy = new + Publisher = "Canonical", + Offer = "0001-com-ubuntu-server-focal", + Sku = "20_04-lts", + }, "batch.node.ubuntu 20.04") { - mode = "automatic", - automaticOSUpgradePolicy = new - { - disableAutomaticRollback = true, - enableAutomaticOSUpgrade = true, - useRollingUpgradePolicy = true, - osRollingUpgradeDeferral = true, - }, - rollingUpgradePolicy = new + OsDisk = new OSDisk { - enableCrossZoneUpgrade = true, - maxBatchInstancePercent = 1234, - maxUnhealthyInstancePercent = 1234, - maxUnhealthyUpgradedInstancePercent = 1234, - pauseTimeBetweenBatches = "PT1H23M45S", - prioritizeUnhealthyInstances = true, - rollbackFailedInstancesOnPolicyBreach = true, + EphemeralOSDiskSettings = new DiffDiskSettings + { + Placement = DiffDiskPlacement.CacheDisk, + }, + Caching = CachingType.ReadWrite, + DiskSizeGB = 100, + ManagedDisk = new ManagedDisk(StorageAccountType.StandardSSDLRS), }, }, - }); - Response response = await client.CreatePoolAsync(content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); - - Console.WriteLine(response.Status); + ResizeTimeout = XmlConvert.ToTimeSpan("PT15M"), + TargetDedicatedNodes = 1, + TargetLowPriorityNodes = 0, + EnableAutoScale = false, + TaskSlotsPerNode = 1, + }; + Response response = client.CreatePool(pool); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_CreatePool_AllParameters_Convenience() + public async Task Example_Batch_CreatePool_CreatesAVirtualMachineConfigurationPoolWithOSDisk_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - BatchPoolCreateContent pool = new BatchPoolCreateContent("", "") + BatchPoolCreateContent pool = new BatchPoolCreateContent("mypool001", "standard_d2s_v3") { - DisplayName = "", VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference { - Publisher = "", - Offer = "", - Sku = "", - Version = "", - VirtualMachineImageId = "", - }, "") + Publisher = "Canonical", + Offer = "0001-com-ubuntu-server-focal", + Sku = "20_04-lts", + }, "batch.node.ubuntu 20.04") { - WindowsConfiguration = new WindowsConfiguration - { - EnableAutomaticUpdates = true, - }, - DataDisks = {new DataDisk(1234, 1234) -{ -Caching = CachingType.None, -StorageAccountType = StorageAccountType.StandardLRS, -}}, - LicenseType = "", - ContainerConfiguration = new ContainerConfiguration(ContainerType.DockerCompatible) - { - ContainerImageNames = { "" }, - ContainerRegistries = {new ContainerRegistryReference -{ -Username = "", -Password = "", -RegistryServer = "", -IdentityReference = new BatchNodeIdentityReference -{ -ResourceId = "", -}, -}}, - }, - DiskEncryptionConfiguration = new DiskEncryptionConfiguration - { - Targets = { DiskEncryptionTarget.OsDisk }, - }, - NodePlacementConfiguration = new BatchNodePlacementConfiguration - { - Policy = BatchNodePlacementPolicyType.Regional, - }, - Extensions = {new VMExtension("", "", "") -{ -TypeHandlerVersion = "", -AutoUpgradeMinorVersion = true, -EnableAutomaticUpgrade = true, -Settings = -{ -["key"] = "" -}, -ProtectedSettings = -{ -["key"] = "" -}, -ProvisionAfterExtensions = {""}, -}}, OsDisk = new OSDisk { EphemeralOSDiskSettings = new DiffDiskSettings { Placement = DiffDiskPlacement.CacheDisk, }, - Caching = CachingType.None, - DiskSizeGB = 1234, - ManagedDisk = new ManagedDisk(StorageAccountType.StandardLRS), - WriteAcceleratorEnabled = true, + Caching = CachingType.ReadWrite, + DiskSizeGB = 100, + ManagedDisk = new ManagedDisk(StorageAccountType.StandardSSDLRS), }, - SecurityProfile = new SecurityProfile(true, SecurityTypes.TrustedLaunch, new UefiSettings - { - SecureBootEnabled = true, - VTpmEnabled = true, - }), - ServiceArtifactReference = new ServiceArtifactReference(""), }, - ResizeTimeout = XmlConvert.ToTimeSpan("PT1H23M45S"), - ResourceTags = -{ -["key"] = "" -}, - TargetDedicatedNodes = 1234, - TargetLowPriorityNodes = 1234, - EnableAutoScale = true, - AutoScaleFormula = "", - AutoScaleEvaluationInterval = XmlConvert.ToTimeSpan("PT1H23M45S"), - EnableInterNodeCommunication = true, - NetworkConfiguration = new NetworkConfiguration - { - SubnetId = "", - DynamicVNetAssignmentScope = DynamicVNetAssignmentScope.None, - EndpointConfiguration = new BatchPoolEndpointConfiguration(new InboundNatPool[] + ResizeTimeout = XmlConvert.ToTimeSpan("PT15M"), + TargetDedicatedNodes = 1, + TargetLowPriorityNodes = 0, + EnableAutoScale = false, + TaskSlotsPerNode = 1, + }; + Response response = await client.CreatePoolAsync(pool); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_CreatePool_CreatesASimplePoolWithResourceTags() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new { -new InboundNatPool("", InboundEndpointProtocol.Tcp, 1234, 1234, 1234) -{ -NetworkSecurityGroupRules = {new NetworkSecurityGroupRule(1234, NetworkSecurityGroupRuleAccess.Allow, "") -{ -SourcePortRanges = {""}, -}}, -} - }), - PublicIpAddressConfiguration = new PublicIpAddressConfiguration + id = "mypool001", + vmSize = "STANDARD_DC2s_V2", + virtualMachineConfiguration = new + { + imageReference = new { - IpAddressProvisioningType = IpAddressProvisioningType.BatchManaged, - IpAddressIds = { "" }, + publisher = "Canonical", + offer = "UbuntuServer", + sku = "18_04-lts-gen2", + version = "latest", }, - EnableAcceleratedNetworking = true, + nodeAgentSKUId = "batch.node.ubuntu 18.04", }, - StartTask = new BatchStartTask("") + targetDedicatedNodes = 1, + resourceTags = new { - ContainerSettings = new BatchTaskContainerSettings("") - { - ContainerRunOptions = "", - Registry = default, - WorkingDirectory = ContainerWorkingDirectory.TaskWorkingDirectory, - }, - ResourceFiles = {new ResourceFile -{ -AutoStorageContainerName = "", -StorageContainerUrl = "", -HttpUrl = "", -BlobPrefix = "", -FilePath = "", -FileMode = "", -IdentityReference = default, -}}, - EnvironmentSettings = {new EnvironmentSetting("") -{ -Value = "", -}}, - UserIdentity = new UserIdentity - { - Username = "", - AutoUser = new AutoUserSpecification - { - Scope = AutoUserScope.Task, - ElevationLevel = ElevationLevel.NonAdmin, - }, - }, - MaxTaskRetryCount = 1234, - WaitForSuccess = true, - }, - ApplicationPackageReferences = {new BatchApplicationPackageReference("") -{ -Version = "", -}}, - TaskSlotsPerNode = 1234, - TaskSchedulingPolicy = new BatchTaskSchedulingPolicy(BatchNodeFillType.Spread), - UserAccounts = {new UserAccount("", "") -{ -ElevationLevel = ElevationLevel.NonAdmin, -LinuxUserConfiguration = new LinuxUserConfiguration -{ -Uid = 1234, -Gid = 1234, -SshPrivateKey = "", -}, -WindowsUserConfiguration = new WindowsUserConfiguration -{ -LoginMode = LoginMode.Batch, -}, -}}, - Metadata = { new MetadataItem("", "") }, - MountConfiguration = {new MountConfiguration -{ -AzureBlobFileSystemConfiguration = new AzureBlobFileSystemConfiguration("", "", "") -{ -AccountKey = "", -SasKey = "", -BlobfuseOptions = "", -IdentityReference = default, -}, -NfsMountConfiguration = new NfsMountConfiguration("", "") -{ -MountOptions = "", -}, -CifsMountConfiguration = new CifsMountConfiguration("", "", "", "") -{ -MountOptions = "", -}, -AzureFileShareConfiguration = new AzureFileShareConfiguration("", "", "", "") -{ -MountOptions = "", -}, -}}, - TargetNodeCommunicationMode = BatchNodeCommunicationMode.Default, - UpgradePolicy = new UpgradePolicy(UpgradeMode.Automatic) - { - AutomaticOsUpgradePolicy = new AutomaticOsUpgradePolicy - { - DisableAutomaticRollback = true, - EnableAutomaticOsUpgrade = true, - UseRollingUpgradePolicy = true, - OsRollingUpgradeDeferral = true, - }, - RollingUpgradePolicy = new RollingUpgradePolicy - { - EnableCrossZoneUpgrade = true, - MaxBatchInstancePercent = 1234, - MaxUnhealthyInstancePercent = 1234, - MaxUnhealthyUpgradedInstancePercent = 1234, - PauseTimeBetweenBatches = XmlConvert.ToTimeSpan("PT1H23M45S"), - PrioritizeUnhealthyInstances = true, - RollbackFailedInstancesOnPolicyBreach = true, - }, + TagName1 = "TagValue1", + TagName2 = "TagValue2", }, - }; - Response response = client.CreatePool(pool, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + }); + Response response = client.CreatePool(content); + + Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_CreatePool_AllParameters_Convenience_Async() + public async Task Example_Batch_CreatePool_CreatesASimplePoolWithResourceTags_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - BatchPoolCreateContent pool = new BatchPoolCreateContent("", "") - { - DisplayName = "", - VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference - { - Publisher = "", - Offer = "", - Sku = "", - Version = "", - VirtualMachineImageId = "", - }, "") - { - WindowsConfiguration = new WindowsConfiguration - { - EnableAutomaticUpdates = true, - }, - DataDisks = {new DataDisk(1234, 1234) -{ -Caching = CachingType.None, -StorageAccountType = StorageAccountType.StandardLRS, -}}, - LicenseType = "", - ContainerConfiguration = new ContainerConfiguration(ContainerType.DockerCompatible) - { - ContainerImageNames = { "" }, - ContainerRegistries = {new ContainerRegistryReference -{ -Username = "", -Password = "", -RegistryServer = "", -IdentityReference = new BatchNodeIdentityReference -{ -ResourceId = "", -}, -}}, - }, - DiskEncryptionConfiguration = new DiskEncryptionConfiguration - { - Targets = { DiskEncryptionTarget.OsDisk }, - }, - NodePlacementConfiguration = new BatchNodePlacementConfiguration - { - Policy = BatchNodePlacementPolicyType.Regional, - }, - Extensions = {new VMExtension("", "", "") -{ -TypeHandlerVersion = "", -AutoUpgradeMinorVersion = true, -EnableAutomaticUpgrade = true, -Settings = -{ -["key"] = "" -}, -ProtectedSettings = -{ -["key"] = "" -}, -ProvisionAfterExtensions = {""}, -}}, - OsDisk = new OSDisk - { - EphemeralOSDiskSettings = new DiffDiskSettings - { - Placement = DiffDiskPlacement.CacheDisk, - }, - Caching = CachingType.None, - DiskSizeGB = 1234, - ManagedDisk = new ManagedDisk(StorageAccountType.StandardLRS), - WriteAcceleratorEnabled = true, - }, - SecurityProfile = new SecurityProfile(true, SecurityTypes.TrustedLaunch, new UefiSettings - { - SecureBootEnabled = true, - VTpmEnabled = true, - }), - ServiceArtifactReference = new ServiceArtifactReference(""), - }, - ResizeTimeout = XmlConvert.ToTimeSpan("PT1H23M45S"), - ResourceTags = -{ -["key"] = "" -}, - TargetDedicatedNodes = 1234, - TargetLowPriorityNodes = 1234, - EnableAutoScale = true, - AutoScaleFormula = "", - AutoScaleEvaluationInterval = XmlConvert.ToTimeSpan("PT1H23M45S"), - EnableInterNodeCommunication = true, - NetworkConfiguration = new NetworkConfiguration - { - SubnetId = "", - DynamicVNetAssignmentScope = DynamicVNetAssignmentScope.None, - EndpointConfiguration = new BatchPoolEndpointConfiguration(new InboundNatPool[] + using RequestContent content = RequestContent.Create(new { -new InboundNatPool("", InboundEndpointProtocol.Tcp, 1234, 1234, 1234) -{ -NetworkSecurityGroupRules = {new NetworkSecurityGroupRule(1234, NetworkSecurityGroupRuleAccess.Allow, "") -{ -SourcePortRanges = {""}, -}}, -} - }), - PublicIpAddressConfiguration = new PublicIpAddressConfiguration - { - IpAddressProvisioningType = IpAddressProvisioningType.BatchManaged, - IpAddressIds = { "" }, - }, - EnableAcceleratedNetworking = true, - }, - StartTask = new BatchStartTask("") + id = "mypool001", + vmSize = "STANDARD_DC2s_V2", + virtualMachineConfiguration = new { - ContainerSettings = new BatchTaskContainerSettings("") - { - ContainerRunOptions = "", - Registry = default, - WorkingDirectory = ContainerWorkingDirectory.TaskWorkingDirectory, - }, - ResourceFiles = {new ResourceFile -{ -AutoStorageContainerName = "", -StorageContainerUrl = "", -HttpUrl = "", -BlobPrefix = "", -FilePath = "", -FileMode = "", -IdentityReference = default, -}}, - EnvironmentSettings = {new EnvironmentSetting("") -{ -Value = "", -}}, - UserIdentity = new UserIdentity + imageReference = new { - Username = "", - AutoUser = new AutoUserSpecification - { - Scope = AutoUserScope.Task, - ElevationLevel = ElevationLevel.NonAdmin, - }, + publisher = "Canonical", + offer = "UbuntuServer", + sku = "18_04-lts-gen2", + version = "latest", }, - MaxTaskRetryCount = 1234, - WaitForSuccess = true, + nodeAgentSKUId = "batch.node.ubuntu 18.04", }, - ApplicationPackageReferences = {new BatchApplicationPackageReference("") -{ -Version = "", -}}, - TaskSlotsPerNode = 1234, - TaskSchedulingPolicy = new BatchTaskSchedulingPolicy(BatchNodeFillType.Spread), - UserAccounts = {new UserAccount("", "") -{ -ElevationLevel = ElevationLevel.NonAdmin, -LinuxUserConfiguration = new LinuxUserConfiguration -{ -Uid = 1234, -Gid = 1234, -SshPrivateKey = "", -}, -WindowsUserConfiguration = new WindowsUserConfiguration -{ -LoginMode = LoginMode.Batch, -}, -}}, - Metadata = { new MetadataItem("", "") }, - MountConfiguration = {new MountConfiguration -{ -AzureBlobFileSystemConfiguration = new AzureBlobFileSystemConfiguration("", "", "") -{ -AccountKey = "", -SasKey = "", -BlobfuseOptions = "", -IdentityReference = default, -}, -NfsMountConfiguration = new NfsMountConfiguration("", "") -{ -MountOptions = "", -}, -CifsMountConfiguration = new CifsMountConfiguration("", "", "", "") -{ -MountOptions = "", -}, -AzureFileShareConfiguration = new AzureFileShareConfiguration("", "", "", "") -{ -MountOptions = "", -}, -}}, - TargetNodeCommunicationMode = BatchNodeCommunicationMode.Default, - UpgradePolicy = new UpgradePolicy(UpgradeMode.Automatic) + targetDedicatedNodes = 1, + resourceTags = new { - AutomaticOsUpgradePolicy = new AutomaticOsUpgradePolicy - { - DisableAutomaticRollback = true, - EnableAutomaticOsUpgrade = true, - UseRollingUpgradePolicy = true, - OsRollingUpgradeDeferral = true, - }, - RollingUpgradePolicy = new RollingUpgradePolicy - { - EnableCrossZoneUpgrade = true, - MaxBatchInstancePercent = 1234, - MaxUnhealthyInstancePercent = 1234, - MaxUnhealthyUpgradedInstancePercent = 1234, - PauseTimeBetweenBatches = XmlConvert.ToTimeSpan("PT1H23M45S"), - PrioritizeUnhealthyInstances = true, - RollbackFailedInstancesOnPolicyBreach = true, - }, + TagName1 = "TagValue1", + TagName2 = "TagValue2", }, - }; - Response response = await client.CreatePoolAsync(pool, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + }); + Response response = await client.CreatePoolAsync(content); + + Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_DeletePool_ShortVersion() + public void Example_Batch_CreatePool_CreatesASimplePoolWithResourceTags_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - Response response = client.DeletePool(""); - - Console.WriteLine(response.Status); + BatchPoolCreateContent pool = new BatchPoolCreateContent("mypool001", "STANDARD_DC2s_V2") + { + VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference + { + Publisher = "Canonical", + Offer = "UbuntuServer", + Sku = "18_04-lts-gen2", + Version = "latest", + }, "batch.node.ubuntu 18.04"), + ResourceTags = +{ +["TagName1"] = "TagValue1", +["TagName2"] = "TagValue2" +}, + TargetDedicatedNodes = 1, + }; + Response response = client.CreatePool(pool); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_DeletePool_ShortVersion_Async() + public async Task Example_Batch_CreatePool_CreatesASimplePoolWithResourceTags_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - Response response = await client.DeletePoolAsync(""); - - Console.WriteLine(response.Status); + BatchPoolCreateContent pool = new BatchPoolCreateContent("mypool001", "STANDARD_DC2s_V2") + { + VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference + { + Publisher = "Canonical", + Offer = "UbuntuServer", + Sku = "18_04-lts-gen2", + Version = "latest", + }, "batch.node.ubuntu 18.04"), + ResourceTags = +{ +["TagName1"] = "TagValue1", +["TagName2"] = "TagValue2" +}, + TargetDedicatedNodes = 1, + }; + Response response = await client.CreatePoolAsync(pool); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_DeletePool_AllParameters() + public void Example_Batch_CreatePool_CreatesAPoolWithSecurityProfile() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - Response response = client.DeletePool("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + using RequestContent content = RequestContent.Create(new + { + id = "mypool001", + vmSize = "STANDARD_DC2s_V2", + virtualMachineConfiguration = new + { + imageReference = new + { + publisher = "Canonical", + offer = "UbuntuServer", + sku = "18_04-lts-gen2", + version = "latest", + }, + nodeAgentSKUId = "batch.node.ubuntu 18.04", + securityProfile = new + { + securityType = "trustedLaunch", + encryptionAtHost = true, + uefiSettings = new + { + secureBootEnabled = false, + }, + }, + }, + targetDedicatedNodes = 1, + }); + Response response = client.CreatePool(content); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_DeletePool_AllParameters_Async() + public async Task Example_Batch_CreatePool_CreatesAPoolWithSecurityProfile_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - Response response = await client.DeletePoolAsync("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + using RequestContent content = RequestContent.Create(new + { + id = "mypool001", + vmSize = "STANDARD_DC2s_V2", + virtualMachineConfiguration = new + { + imageReference = new + { + publisher = "Canonical", + offer = "UbuntuServer", + sku = "18_04-lts-gen2", + version = "latest", + }, + nodeAgentSKUId = "batch.node.ubuntu 18.04", + securityProfile = new + { + securityType = "trustedLaunch", + encryptionAtHost = true, + uefiSettings = new + { + secureBootEnabled = false, + }, + }, + }, + targetDedicatedNodes = 1, + }); + Response response = await client.CreatePoolAsync(content); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetPool_ShortVersion() + public void Example_Batch_CreatePool_CreatesAPoolWithSecurityProfile_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - Response response = client.GetPool("", null, null, null, null, null, null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); + BatchPoolCreateContent pool = new BatchPoolCreateContent("mypool001", "STANDARD_DC2s_V2") + { + VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference + { + Publisher = "Canonical", + Offer = "UbuntuServer", + Sku = "18_04-lts-gen2", + Version = "latest", + }, "batch.node.ubuntu 18.04") + { + SecurityProfile = new SecurityProfile(true, SecurityTypes.TrustedLaunch, new UefiSettings + { + SecureBootEnabled = false, + }), + }, + TargetDedicatedNodes = 1, + }; + Response response = client.CreatePool(pool); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetPool_ShortVersion_Async() + public async Task Example_Batch_CreatePool_CreatesAPoolWithSecurityProfile_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - Response response = await client.GetPoolAsync("", null, null, null, null, null, null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); + BatchPoolCreateContent pool = new BatchPoolCreateContent("mypool001", "STANDARD_DC2s_V2") + { + VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference + { + Publisher = "Canonical", + Offer = "UbuntuServer", + Sku = "18_04-lts-gen2", + Version = "latest", + }, "batch.node.ubuntu 18.04") + { + SecurityProfile = new SecurityProfile(true, SecurityTypes.TrustedLaunch, new UefiSettings + { + SecureBootEnabled = false, + }), + }, + TargetDedicatedNodes = 1, + }; + Response response = await client.CreatePoolAsync(pool); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetPool_ShortVersion_Convenience() + public void Example_Batch_CreatePool_CreatesAVirtualMachineConfigurationPool() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - Response response = client.GetPool(""); + using RequestContent content = RequestContent.Create(new + { + id = "pool2", + vmSize = "standard_a1", + virtualMachineConfiguration = new + { + imageReference = new + { + publisher = "Canonical", + offer = "0001-com-ubuntu-server-focal", + sku = "20_04-lts", + }, + nodeAgentSKUId = "batch.node.ubuntu 20.04", + }, + resizeTimeout = "PT15M", + targetDedicatedNodes = 5, + targetLowPriorityNodes = 0, + taskSlotsPerNode = 3, + taskSchedulingPolicy = new + { + nodeFillType = "spread", + }, + enableAutoScale = false, + enableInterNodeCommunication = true, + metadata = new object[] + { +new +{ +name = "myproperty", +value = "myvalue", +} + }, + }); + Response response = client.CreatePool(content); + + Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetPool_ShortVersion_Convenience_Async() + public async Task Example_Batch_CreatePool_CreatesAVirtualMachineConfigurationPool_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - Response response = await client.GetPoolAsync(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetPool_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - Response response = client.GetPool("", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), new string[] { "" }, new string[] { "" }, null, null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("url").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("lastModified").ToString()); - Console.WriteLine(result.GetProperty("creationTime").ToString()); - Console.WriteLine(result.GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("stateTransitionTime").ToString()); - Console.WriteLine(result.GetProperty("allocationState").ToString()); - Console.WriteLine(result.GetProperty("allocationStateTransitionTime").ToString()); - Console.WriteLine(result.GetProperty("vmSize").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("publisher").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("offer").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("sku").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("virtualMachineImageId").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("exactVersion").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("nodeAgentSKUId").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("windowsConfiguration").GetProperty("enableAutomaticUpdates").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("lun").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("caching").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("diskSizeGB").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("storageAccountType").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("licenseType").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerImageNames")[0].ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("password").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("registryServer").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("diskEncryptionConfiguration").GetProperty("targets")[0].ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("nodePlacementConfiguration").GetProperty("policy").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("publisher").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("typeHandlerVersion").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("autoUpgradeMinorVersion").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("enableAutomaticUpgrade").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("settings").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("protectedSettings").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("provisionAfterExtensions")[0].ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("ephemeralOSDiskSettings").GetProperty("placement").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("caching").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("managedDisk").GetProperty("storageAccountType").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("writeAcceleratorEnabled").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("encryptionAtHost").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("securityType").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("uefiSettings").GetProperty("secureBootEnabled").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("uefiSettings").GetProperty("vTpmEnabled").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("serviceArtifactReference").GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("resizeTimeout").ToString()); - Console.WriteLine(result.GetProperty("resizeErrors")[0].GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("resizeErrors")[0].GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("resizeErrors")[0].GetProperty("values")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("resizeErrors")[0].GetProperty("values")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("resourceTags").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("currentDedicatedNodes").ToString()); - Console.WriteLine(result.GetProperty("currentLowPriorityNodes").ToString()); - Console.WriteLine(result.GetProperty("targetDedicatedNodes").ToString()); - Console.WriteLine(result.GetProperty("targetLowPriorityNodes").ToString()); - Console.WriteLine(result.GetProperty("enableAutoScale").ToString()); - Console.WriteLine(result.GetProperty("autoScaleFormula").ToString()); - Console.WriteLine(result.GetProperty("autoScaleEvaluationInterval").ToString()); - Console.WriteLine(result.GetProperty("autoScaleRun").GetProperty("timestamp").ToString()); - Console.WriteLine(result.GetProperty("autoScaleRun").GetProperty("results").ToString()); - Console.WriteLine(result.GetProperty("autoScaleRun").GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("autoScaleRun").GetProperty("error").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("autoScaleRun").GetProperty("error").GetProperty("values")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("autoScaleRun").GetProperty("error").GetProperty("values")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("enableInterNodeCommunication").ToString()); - Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("subnetId").ToString()); - Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("dynamicVNetAssignmentScope").ToString()); - Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("protocol").ToString()); - Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("backendPort").ToString()); - Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("frontendPortRangeStart").ToString()); - Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("frontendPortRangeEnd").ToString()); - Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("priority").ToString()); - Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("access").ToString()); - Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("sourceAddressPrefix").ToString()); - Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("sourcePortRanges")[0].ToString()); - Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("publicIPAddressConfiguration").GetProperty("provision").ToString()); - Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("publicIPAddressConfiguration").GetProperty("ipAddressIds")[0].ToString()); - Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("enableAcceleratedNetworking").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("commandLine").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("userIdentity").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("maxTaskRetryCount").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("waitForSuccess").ToString()); - Console.WriteLine(result.GetProperty("applicationPackageReferences")[0].GetProperty("applicationId").ToString()); - Console.WriteLine(result.GetProperty("applicationPackageReferences")[0].GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("taskSlotsPerNode").ToString()); - Console.WriteLine(result.GetProperty("taskSchedulingPolicy").GetProperty("nodeFillType").ToString()); - Console.WriteLine(result.GetProperty("userAccounts")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("userAccounts")[0].GetProperty("password").ToString()); - Console.WriteLine(result.GetProperty("userAccounts")[0].GetProperty("elevationLevel").ToString()); - Console.WriteLine(result.GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("uid").ToString()); - Console.WriteLine(result.GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("gid").ToString()); - Console.WriteLine(result.GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("sshPrivateKey").ToString()); - Console.WriteLine(result.GetProperty("userAccounts")[0].GetProperty("windowsUserConfiguration").GetProperty("loginMode").ToString()); - Console.WriteLine(result.GetProperty("metadata")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("metadata")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("url").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("lastUpdateTime").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("usageStats").GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("usageStats").GetProperty("lastUpdateTime").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("usageStats").GetProperty("dedicatedCoreTime").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("lastUpdateTime").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("avgCPUPercentage").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("avgMemoryGiB").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("peakMemoryGiB").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("avgDiskGiB").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("peakDiskGiB").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("diskReadIOps").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("diskWriteIOps").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("diskReadGiB").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("diskWriteGiB").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("networkReadGiB").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("networkWriteGiB").ToString()); - Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("accountName").ToString()); - Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("containerName").ToString()); - Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("accountKey").ToString()); - Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("sasKey").ToString()); - Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("blobfuseOptions").ToString()); - Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("relativeMountPath").ToString()); - Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("relativeMountPath").ToString()); - Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("mountOptions").ToString()); - Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("relativeMountPath").ToString()); - Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("mountOptions").ToString()); - Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("password").ToString()); - Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("accountName").ToString()); - Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("azureFileUrl").ToString()); - Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("accountKey").ToString()); - Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("relativeMountPath").ToString()); - Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("mountOptions").ToString()); - Console.WriteLine(result.GetProperty("identity").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("identity").GetProperty("userAssignedIdentities")[0].GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("identity").GetProperty("userAssignedIdentities")[0].GetProperty("clientId").ToString()); - Console.WriteLine(result.GetProperty("identity").GetProperty("userAssignedIdentities")[0].GetProperty("principalId").ToString()); - Console.WriteLine(result.GetProperty("targetNodeCommunicationMode").ToString()); - Console.WriteLine(result.GetProperty("currentNodeCommunicationMode").ToString()); - Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("mode").ToString()); - Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("disableAutomaticRollback").ToString()); - Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("enableAutomaticOSUpgrade").ToString()); - Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("useRollingUpgradePolicy").ToString()); - Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("osRollingUpgradeDeferral").ToString()); - Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("enableCrossZoneUpgrade").ToString()); - Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxBatchInstancePercent").ToString()); - Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxUnhealthyInstancePercent").ToString()); - Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxUnhealthyUpgradedInstancePercent").ToString()); - Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("pauseTimeBetweenBatches").ToString()); - Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("prioritizeUnhealthyInstances").ToString()); - Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("rollbackFailedInstancesOnPolicyBreach").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetPool_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - Response response = client.GetPool("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), select: new string[] { "" }, expand: new string[] { "" }, requestConditions: null); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_UpdatePool_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new object()); - Response response = client.UpdatePool("", content); + using RequestContent content = RequestContent.Create(new + { + id = "pool2", + vmSize = "standard_a1", + virtualMachineConfiguration = new + { + imageReference = new + { + publisher = "Canonical", + offer = "0001-com-ubuntu-server-focal", + sku = "20_04-lts", + }, + nodeAgentSKUId = "batch.node.ubuntu 20.04", + }, + resizeTimeout = "PT15M", + targetDedicatedNodes = 5, + targetLowPriorityNodes = 0, + taskSlotsPerNode = 3, + taskSchedulingPolicy = new + { + nodeFillType = "spread", + }, + enableAutoScale = false, + enableInterNodeCommunication = true, + metadata = new object[] + { +new +{ +name = "myproperty", +value = "myvalue", +} + }, + }); + Response response = await client.CreatePoolAsync(content); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_UpdatePool_ShortVersion_Async() + public void Example_Batch_CreatePool_CreatesAVirtualMachineConfigurationPool_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - using RequestContent content = RequestContent.Create(new object()); - Response response = await client.UpdatePoolAsync("", content); + BatchPoolCreateContent pool = new BatchPoolCreateContent("pool2", "standard_a1") + { + VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference + { + Publisher = "Canonical", + Offer = "0001-com-ubuntu-server-focal", + Sku = "20_04-lts", + }, "batch.node.ubuntu 20.04"), + ResizeTimeout = XmlConvert.ToTimeSpan("PT15M"), + TargetDedicatedNodes = 5, + TargetLowPriorityNodes = 0, + EnableAutoScale = false, + EnableInterNodeCommunication = true, + TaskSlotsPerNode = 3, + TaskSchedulingPolicy = new BatchTaskSchedulingPolicy(BatchNodeFillType.Spread), + Metadata = { new MetadataItem("myproperty", "myvalue") }, + }; + Response response = client.CreatePool(pool); + } - Console.WriteLine(response.Status); + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_CreatePool_CreatesAVirtualMachineConfigurationPool_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchPoolCreateContent pool = new BatchPoolCreateContent("pool2", "standard_a1") + { + VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference + { + Publisher = "Canonical", + Offer = "0001-com-ubuntu-server-focal", + Sku = "20_04-lts", + }, "batch.node.ubuntu 20.04"), + ResizeTimeout = XmlConvert.ToTimeSpan("PT15M"), + TargetDedicatedNodes = 5, + TargetLowPriorityNodes = 0, + EnableAutoScale = false, + EnableInterNodeCommunication = true, + TaskSlotsPerNode = 3, + TaskSchedulingPolicy = new BatchTaskSchedulingPolicy(BatchNodeFillType.Spread), + Metadata = { new MetadataItem("myproperty", "myvalue") }, + }; + Response response = await client.CreatePoolAsync(pool); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_UpdatePool_AllParameters() + public void Example_Batch_CreatePool_CreatesAVirtualMachineConfigurationPoolWithContainers() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - startTask = new + id = "pool2", + vmSize = "standard_a1", + virtualMachineConfiguration = new { - commandLine = "", - containerSettings = new + imageReference = new { - containerRunOptions = "", - imageName = "", - registry = new - { - username = "", - password = "", - registryServer = "", - identityReference = new - { - resourceId = "", - }, - }, - workingDirectory = "taskWorkingDirectory", + publisher = "Canonical", + offer = "0001-com-ubuntu-server-focal", + sku = "120_04-lts", }, - resourceFiles = new object[] - { -new -{ -autoStorageContainerName = "", -storageContainerUrl = "", -httpUrl = "", -blobPrefix = "", -filePath = "", -fileMode = "", -} - }, - environmentSettings = new object[] + nodeAgentSKUId = "batch.node.ubuntu 20.04", + containerConfiguration = new + { + type = "dockerCompatible", + containerImageNames = new object[] { -new -{ -name = "", -value = "", -} +"busybox" }, - userIdentity = new - { - username = "", - autoUser = new - { - scope = "task", - elevationLevel = "nonadmin", - }, }, - maxTaskRetryCount = 1234, - waitForSuccess = true, }, - applicationPackageReferences = new object[] - { -new -{ -applicationId = "", -version = "", -} - }, - metadata = new object[] - { -new -{ -name = "", -value = "", -} - }, - targetNodeCommunicationMode = "default", + resizeTimeout = "PT15M", + targetDedicatedNodes = 5, + targetLowPriorityNodes = 0, + taskSlotsPerNode = 3, + taskSchedulingPolicy = new + { + nodeFillType = "spread", + }, + enableAutoScale = false, }); - Response response = client.UpdatePool("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + Response response = client.CreatePool(content); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_UpdatePool_AllParameters_Async() + public async Task Example_Batch_CreatePool_CreatesAVirtualMachineConfigurationPoolWithContainers_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - startTask = new + id = "pool2", + vmSize = "standard_a1", + virtualMachineConfiguration = new { - commandLine = "", - containerSettings = new + imageReference = new { - containerRunOptions = "", - imageName = "", - registry = new - { - username = "", - password = "", - registryServer = "", - identityReference = new - { - resourceId = "", - }, - }, - workingDirectory = "taskWorkingDirectory", + publisher = "Canonical", + offer = "0001-com-ubuntu-server-focal", + sku = "120_04-lts", }, - resourceFiles = new object[] - { -new -{ -autoStorageContainerName = "", -storageContainerUrl = "", -httpUrl = "", -blobPrefix = "", -filePath = "", -fileMode = "", -} - }, - environmentSettings = new object[] + nodeAgentSKUId = "batch.node.ubuntu 20.04", + containerConfiguration = new + { + type = "dockerCompatible", + containerImageNames = new object[] { -new -{ -name = "", -value = "", -} +"busybox" }, - userIdentity = new - { - username = "", - autoUser = new - { - scope = "task", - elevationLevel = "nonadmin", - }, }, - maxTaskRetryCount = 1234, - waitForSuccess = true, }, - applicationPackageReferences = new object[] - { -new -{ -applicationId = "", -version = "", -} - }, - metadata = new object[] - { -new -{ -name = "", -value = "", -} - }, - targetNodeCommunicationMode = "default", + resizeTimeout = "PT15M", + targetDedicatedNodes = 5, + targetLowPriorityNodes = 0, + taskSlotsPerNode = 3, + taskSchedulingPolicy = new + { + nodeFillType = "spread", + }, + enableAutoScale = false, }); - Response response = await client.UpdatePoolAsync("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + Response response = await client.CreatePoolAsync(content); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_DisablePoolAutoScale_ShortVersion() + public void Example_Batch_CreatePool_CreatesAVirtualMachineConfigurationPoolWithContainers_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - Response response = client.DisablePoolAutoScale(""); - - Console.WriteLine(response.Status); + BatchPoolCreateContent pool = new BatchPoolCreateContent("pool2", "standard_a1") + { + VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference + { + Publisher = "Canonical", + Offer = "0001-com-ubuntu-server-focal", + Sku = "120_04-lts", + }, "batch.node.ubuntu 20.04") + { + ContainerConfiguration = new ContainerConfiguration(ContainerType.DockerCompatible) + { + ContainerImageNames = { "busybox" }, + }, + }, + ResizeTimeout = XmlConvert.ToTimeSpan("PT15M"), + TargetDedicatedNodes = 5, + TargetLowPriorityNodes = 0, + EnableAutoScale = false, + TaskSlotsPerNode = 3, + TaskSchedulingPolicy = new BatchTaskSchedulingPolicy(BatchNodeFillType.Spread), + }; + Response response = client.CreatePool(pool); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_DisablePoolAutoScale_ShortVersion_Async() + public async Task Example_Batch_CreatePool_CreatesAVirtualMachineConfigurationPoolWithContainers_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - Response response = await client.DisablePoolAutoScaleAsync(""); - - Console.WriteLine(response.Status); + BatchPoolCreateContent pool = new BatchPoolCreateContent("pool2", "standard_a1") + { + VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference + { + Publisher = "Canonical", + Offer = "0001-com-ubuntu-server-focal", + Sku = "120_04-lts", + }, "batch.node.ubuntu 20.04") + { + ContainerConfiguration = new ContainerConfiguration(ContainerType.DockerCompatible) + { + ContainerImageNames = { "busybox" }, + }, + }, + ResizeTimeout = XmlConvert.ToTimeSpan("PT15M"), + TargetDedicatedNodes = 5, + TargetLowPriorityNodes = 0, + EnableAutoScale = false, + TaskSlotsPerNode = 3, + TaskSchedulingPolicy = new BatchTaskSchedulingPolicy(BatchNodeFillType.Spread), + }; + Response response = await client.CreatePoolAsync(pool); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_DisablePoolAutoScale_AllParameters() + public void Example_Batch_CreatePool_CreatesAVirtualMachineConfigurationPoolWithExtensions() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - Response response = client.DisablePoolAutoScale("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + using RequestContent content = RequestContent.Create(new + { + id = "pool2", + vmSize = "standard_a1", + virtualMachineConfiguration = new + { + imageReference = new + { + publisher = "Canonical", + offer = "0001-com-ubuntu-server-focal", + sku = "20_04-lts", + }, + nodeAgentSKUId = "batch.node.ubuntu 20.04", + extensions = new object[] + { +new +{ +name = "batchextension1", +type = "KeyVaultForLinux", +publisher = "Microsoft.Azure.KeyVault", +typeHandlerVersion = "2.0", +autoUpgradeMinorVersion = true, +enableAutomaticUpgrade = true, +settings = new +{ +secretsManagementSettingsKey = "secretsManagementSettingsValue", +authenticationSettingsKey = "authenticationSettingsValue", +}, +} + }, + }, + resizeTimeout = "PT15M", + targetDedicatedNodes = 5, + targetLowPriorityNodes = 0, + taskSlotsPerNode = 3, + taskSchedulingPolicy = new + { + nodeFillType = "spread", + }, + enableAutoScale = false, + enableInterNodeCommunication = true, + metadata = new object[] + { +new +{ +name = "myproperty", +value = "myvalue", +} + }, + targetNodeCommunicationMode = "simplified", + }); + Response response = client.CreatePool(content); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_DisablePoolAutoScale_AllParameters_Async() + public async Task Example_Batch_CreatePool_CreatesAVirtualMachineConfigurationPoolWithExtensions_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - Response response = await client.DisablePoolAutoScaleAsync("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + using RequestContent content = RequestContent.Create(new + { + id = "pool2", + vmSize = "standard_a1", + virtualMachineConfiguration = new + { + imageReference = new + { + publisher = "Canonical", + offer = "0001-com-ubuntu-server-focal", + sku = "20_04-lts", + }, + nodeAgentSKUId = "batch.node.ubuntu 20.04", + extensions = new object[] + { +new +{ +name = "batchextension1", +type = "KeyVaultForLinux", +publisher = "Microsoft.Azure.KeyVault", +typeHandlerVersion = "2.0", +autoUpgradeMinorVersion = true, +enableAutomaticUpgrade = true, +settings = new +{ +secretsManagementSettingsKey = "secretsManagementSettingsValue", +authenticationSettingsKey = "authenticationSettingsValue", +}, +} + }, + }, + resizeTimeout = "PT15M", + targetDedicatedNodes = 5, + targetLowPriorityNodes = 0, + taskSlotsPerNode = 3, + taskSchedulingPolicy = new + { + nodeFillType = "spread", + }, + enableAutoScale = false, + enableInterNodeCommunication = true, + metadata = new object[] + { +new +{ +name = "myproperty", +value = "myvalue", +} + }, + targetNodeCommunicationMode = "simplified", + }); + Response response = await client.CreatePoolAsync(content); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_EnablePoolAutoScale_ShortVersion() + public void Example_Batch_CreatePool_CreatesAVirtualMachineConfigurationPoolWithExtensions_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - using RequestContent content = RequestContent.Create(new object()); - Response response = client.EnablePoolAutoScale("", content); - - Console.WriteLine(response.Status); + BatchPoolCreateContent pool = new BatchPoolCreateContent("pool2", "standard_a1") + { + VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference + { + Publisher = "Canonical", + Offer = "0001-com-ubuntu-server-focal", + Sku = "20_04-lts", + }, "batch.node.ubuntu 20.04") + { + Extensions = {new VMExtension("batchextension1", "Microsoft.Azure.KeyVault", "KeyVaultForLinux") +{ +TypeHandlerVersion = "2.0", +AutoUpgradeMinorVersion = true, +EnableAutomaticUpgrade = true, +Settings = +{ +["secretsManagementSettingsKey"] = "secretsManagementSettingsValue", +["authenticationSettingsKey"] = "authenticationSettingsValue" +}, +}}, + }, + ResizeTimeout = XmlConvert.ToTimeSpan("PT15M"), + TargetDedicatedNodes = 5, + TargetLowPriorityNodes = 0, + EnableAutoScale = false, + EnableInterNodeCommunication = true, + TaskSlotsPerNode = 3, + TaskSchedulingPolicy = new BatchTaskSchedulingPolicy(BatchNodeFillType.Spread), + Metadata = { new MetadataItem("myproperty", "myvalue") }, + TargetNodeCommunicationMode = BatchNodeCommunicationMode.Simplified, + }; + Response response = client.CreatePool(pool); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_EnablePoolAutoScale_ShortVersion_Async() + public async Task Example_Batch_CreatePool_CreatesAVirtualMachineConfigurationPoolWithExtensions_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - using RequestContent content = RequestContent.Create(new object()); - Response response = await client.EnablePoolAutoScaleAsync("", content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_EnablePoolAutoScale_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - BatchPoolEnableAutoScaleContent content = new BatchPoolEnableAutoScaleContent(); - Response response = client.EnablePoolAutoScale("", content); + BatchPoolCreateContent pool = new BatchPoolCreateContent("pool2", "standard_a1") + { + VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference + { + Publisher = "Canonical", + Offer = "0001-com-ubuntu-server-focal", + Sku = "20_04-lts", + }, "batch.node.ubuntu 20.04") + { + Extensions = {new VMExtension("batchextension1", "Microsoft.Azure.KeyVault", "KeyVaultForLinux") +{ +TypeHandlerVersion = "2.0", +AutoUpgradeMinorVersion = true, +EnableAutomaticUpgrade = true, +Settings = +{ +["secretsManagementSettingsKey"] = "secretsManagementSettingsValue", +["authenticationSettingsKey"] = "authenticationSettingsValue" +}, +}}, + }, + ResizeTimeout = XmlConvert.ToTimeSpan("PT15M"), + TargetDedicatedNodes = 5, + TargetLowPriorityNodes = 0, + EnableAutoScale = false, + EnableInterNodeCommunication = true, + TaskSlotsPerNode = 3, + TaskSchedulingPolicy = new BatchTaskSchedulingPolicy(BatchNodeFillType.Spread), + Metadata = { new MetadataItem("myproperty", "myvalue") }, + TargetNodeCommunicationMode = BatchNodeCommunicationMode.Simplified, + }; + Response response = await client.CreatePoolAsync(pool); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_EnablePoolAutoScale_ShortVersion_Convenience_Async() + public void Example_Batch_CreatePool_CreatesAVirtualMachineConfigurationPoolWithServiceArtifactReference() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - BatchPoolEnableAutoScaleContent content = new BatchPoolEnableAutoScaleContent(); - Response response = await client.EnablePoolAutoScaleAsync("", content); + using RequestContent content = RequestContent.Create(new + { + id = "mypool002", + vmSize = "Standard_A1_v2", + virtualMachineConfiguration = new + { + imageReference = new + { + publisher = "MicrosoftWindowsServer", + offer = "WindowsServer", + sku = "2016-datacenter-smalldisk", + version = "latest", + }, + windowsConfiguration = new + { + enableAutomaticUpdates = false, + }, + serviceArtifactReference = new + { + id = "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Compute/galleries/myGallery/serviceArtifacts/myServiceArtifact/vmArtifactsProfiles/vmArtifactsProfile", + }, + nodeAgentSKUId = "batch.node.windows amd64", + }, + targetDedicatedNodes = 2, + }); + Response response = client.CreatePool(content); + + Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_EnablePoolAutoScale_AllParameters() + public async Task Example_Batch_CreatePool_CreatesAVirtualMachineConfigurationPoolWithServiceArtifactReference_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - autoScaleFormula = "", - autoScaleEvaluationInterval = "PT1H23M45S", + id = "mypool002", + vmSize = "Standard_A1_v2", + virtualMachineConfiguration = new + { + imageReference = new + { + publisher = "MicrosoftWindowsServer", + offer = "WindowsServer", + sku = "2016-datacenter-smalldisk", + version = "latest", + }, + windowsConfiguration = new + { + enableAutomaticUpdates = false, + }, + serviceArtifactReference = new + { + id = "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Compute/galleries/myGallery/serviceArtifacts/myServiceArtifact/vmArtifactsProfiles/vmArtifactsProfile", + }, + nodeAgentSKUId = "batch.node.windows amd64", + }, + targetDedicatedNodes = 2, }); - Response response = client.EnablePoolAutoScale("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + Response response = await client.CreatePoolAsync(content); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_EnablePoolAutoScale_AllParameters_Async() + public void Example_Batch_CreatePool_CreatesAVirtualMachineConfigurationPoolWithServiceArtifactReference_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - using RequestContent content = RequestContent.Create(new + BatchPoolCreateContent pool = new BatchPoolCreateContent("mypool002", "Standard_A1_v2") { - autoScaleFormula = "", - autoScaleEvaluationInterval = "PT1H23M45S", - }); - Response response = await client.EnablePoolAutoScaleAsync("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); - - Console.WriteLine(response.Status); + VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference + { + Publisher = "MicrosoftWindowsServer", + Offer = "WindowsServer", + Sku = "2016-datacenter-smalldisk", + Version = "latest", + }, "batch.node.windows amd64") + { + WindowsConfiguration = new WindowsConfiguration + { + EnableAutomaticUpdates = false, + }, + ServiceArtifactReference = new ServiceArtifactReference("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Compute/galleries/myGallery/serviceArtifacts/myServiceArtifact/vmArtifactsProfiles/vmArtifactsProfile"), + }, + TargetDedicatedNodes = 2, + }; + Response response = client.CreatePool(pool); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_EnablePoolAutoScale_AllParameters_Convenience() + public async Task Example_Batch_CreatePool_CreatesAVirtualMachineConfigurationPoolWithServiceArtifactReference_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - BatchPoolEnableAutoScaleContent content = new BatchPoolEnableAutoScaleContent + BatchPoolCreateContent pool = new BatchPoolCreateContent("mypool002", "Standard_A1_v2") { - AutoScaleFormula = "", - AutoScaleEvaluationInterval = XmlConvert.ToTimeSpan("PT1H23M45S"), + VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference + { + Publisher = "MicrosoftWindowsServer", + Offer = "WindowsServer", + Sku = "2016-datacenter-smalldisk", + Version = "latest", + }, "batch.node.windows amd64") + { + WindowsConfiguration = new WindowsConfiguration + { + EnableAutomaticUpdates = false, + }, + ServiceArtifactReference = new ServiceArtifactReference("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Compute/galleries/myGallery/serviceArtifacts/myServiceArtifact/vmArtifactsProfiles/vmArtifactsProfile"), + }, + TargetDedicatedNodes = 2, }; - Response response = client.EnablePoolAutoScale("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + Response response = await client.CreatePoolAsync(pool); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_EnablePoolAutoScale_AllParameters_Convenience_Async() + public void Example_Batch_DeletePool_PoolDelete() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - BatchPoolEnableAutoScaleContent content = new BatchPoolEnableAutoScaleContent - { - AutoScaleFormula = "", - AutoScaleEvaluationInterval = XmlConvert.ToTimeSpan("PT1H23M45S"), - }; - Response response = await client.EnablePoolAutoScaleAsync("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + Response response = client.DeletePool("poolId"); + + Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_EvaluatePoolAutoScale_ShortVersion() + public async Task Example_Batch_DeletePool_PoolDelete_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - using RequestContent content = RequestContent.Create(new - { - autoScaleFormula = "", - }); - Response response = client.EvaluatePoolAutoScale("", content); + Response response = await client.DeletePoolAsync("poolId"); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetPool_GetAPoolWithAcceleratedNetworking() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.GetPool("pool", null, DateTimeOffset.Parse("Fri, 28 Apr 2023 02:43:01 GMT"), null, null, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("timestamp").ToString()); + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_EvaluatePoolAutoScale_ShortVersion_Async() + public async Task Example_Batch_GetPool_GetAPoolWithAcceleratedNetworking_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - using RequestContent content = RequestContent.Create(new - { - autoScaleFormula = "", - }); - Response response = await client.EvaluatePoolAutoScaleAsync("", content); + Response response = await client.GetPoolAsync("pool", null, DateTimeOffset.Parse("Fri, 28 Apr 2023 02:43:01 GMT"), null, null, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("timestamp").ToString()); + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_EvaluatePoolAutoScale_ShortVersion_Convenience() + public void Example_Batch_GetPool_GetAPoolWithAcceleratedNetworking_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - BatchPoolEvaluateAutoScaleContent content = new BatchPoolEvaluateAutoScaleContent(""); - Response response = client.EvaluatePoolAutoScale("", content); + Response response = client.GetPool("pool"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_EvaluatePoolAutoScale_ShortVersion_Convenience_Async() + public async Task Example_Batch_GetPool_GetAPoolWithAcceleratedNetworking_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - BatchPoolEvaluateAutoScaleContent content = new BatchPoolEvaluateAutoScaleContent(""); - Response response = await client.EvaluatePoolAutoScaleAsync("", content); + Response response = await client.GetPoolAsync("pool"); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_EvaluatePoolAutoScale_AllParameters() + public void Example_Batch_GetPool_PoolGet() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - using RequestContent content = RequestContent.Create(new - { - autoScaleFormula = "", - }); - Response response = client.EvaluatePoolAutoScale("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + Response response = client.GetPool("pool", null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null, null, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("timestamp").ToString()); - Console.WriteLine(result.GetProperty("results").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("values")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("values")[0].GetProperty("value").ToString()); + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_EvaluatePoolAutoScale_AllParameters_Async() + public async Task Example_Batch_GetPool_PoolGet_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - using RequestContent content = RequestContent.Create(new - { - autoScaleFormula = "", - }); - Response response = await client.EvaluatePoolAutoScaleAsync("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + Response response = await client.GetPoolAsync("pool", null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null, null, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("timestamp").ToString()); - Console.WriteLine(result.GetProperty("results").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("values")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("values")[0].GetProperty("value").ToString()); + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_EvaluatePoolAutoScale_AllParameters_Convenience() + public void Example_Batch_GetPool_PoolGet_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - BatchPoolEvaluateAutoScaleContent content = new BatchPoolEvaluateAutoScaleContent(""); - Response response = client.EvaluatePoolAutoScale("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + Response response = client.GetPool("pool"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_EvaluatePoolAutoScale_AllParameters_Convenience_Async() + public async Task Example_Batch_GetPool_PoolGet_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - BatchPoolEvaluateAutoScaleContent content = new BatchPoolEvaluateAutoScaleContent(""); - Response response = await client.EvaluatePoolAutoScaleAsync("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + Response response = await client.GetPoolAsync("pool"); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_ResizePool_ShortVersion() + public void Example_Batch_GetPool_GetAVirtualMachineConfigurationPoolWithSecurityProfile() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - using RequestContent content = RequestContent.Create(new object()); - Response response = client.ResizePool("", content); + Response response = client.GetPool("mypool001", null, DateTimeOffset.Parse("Wed, 14 Jun 2023 06:39:01 GMT"), null, null, null, null); - Console.WriteLine(response.Status); + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_ResizePool_ShortVersion_Async() + public async Task Example_Batch_GetPool_GetAVirtualMachineConfigurationPoolWithSecurityProfile_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - using RequestContent content = RequestContent.Create(new object()); - Response response = await client.ResizePoolAsync("", content); + Response response = await client.GetPoolAsync("mypool001", null, DateTimeOffset.Parse("Wed, 14 Jun 2023 06:39:01 GMT"), null, null, null, null); - Console.WriteLine(response.Status); + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_ResizePool_ShortVersion_Convenience() + public void Example_Batch_GetPool_GetAVirtualMachineConfigurationPoolWithSecurityProfile_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - BatchPoolResizeContent content = new BatchPoolResizeContent(); - Response response = client.ResizePool("", content); + Response response = client.GetPool("mypool001"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_ResizePool_ShortVersion_Convenience_Async() + public async Task Example_Batch_GetPool_GetAVirtualMachineConfigurationPoolWithSecurityProfile_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - BatchPoolResizeContent content = new BatchPoolResizeContent(); - Response response = await client.ResizePoolAsync("", content); + Response response = await client.GetPoolAsync("mypool001"); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_ResizePool_AllParameters() + public void Example_Batch_GetPool_GetAVirtualMachineConfigurationPoolWithExtensions() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - using RequestContent content = RequestContent.Create(new - { - targetDedicatedNodes = 1234, - targetLowPriorityNodes = 1234, - resizeTimeout = "PT1H23M45S", - nodeDeallocationOption = "requeue", - }); - Response response = client.ResizePool("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + Response response = client.GetPool("pool", null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null, null, null, null); - Console.WriteLine(response.Status); + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_ResizePool_AllParameters_Async() + public async Task Example_Batch_GetPool_GetAVirtualMachineConfigurationPoolWithExtensions_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - using RequestContent content = RequestContent.Create(new - { - targetDedicatedNodes = 1234, - targetLowPriorityNodes = 1234, - resizeTimeout = "PT1H23M45S", - nodeDeallocationOption = "requeue", - }); - Response response = await client.ResizePoolAsync("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + Response response = await client.GetPoolAsync("pool", null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null, null, null, null); - Console.WriteLine(response.Status); + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_ResizePool_AllParameters_Convenience() + public void Example_Batch_GetPool_GetAVirtualMachineConfigurationPoolWithExtensions_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - BatchPoolResizeContent content = new BatchPoolResizeContent - { - TargetDedicatedNodes = 1234, - TargetLowPriorityNodes = 1234, - ResizeTimeout = XmlConvert.ToTimeSpan("PT1H23M45S"), - NodeDeallocationOption = BatchNodeDeallocationOption.Requeue, - }; - Response response = client.ResizePool("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + Response response = client.GetPool("pool"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_ResizePool_AllParameters_Convenience_Async() + public async Task Example_Batch_GetPool_GetAVirtualMachineConfigurationPoolWithExtensions_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - BatchPoolResizeContent content = new BatchPoolResizeContent - { - TargetDedicatedNodes = 1234, - TargetLowPriorityNodes = 1234, - ResizeTimeout = XmlConvert.ToTimeSpan("PT1H23M45S"), - NodeDeallocationOption = BatchNodeDeallocationOption.Requeue, - }; - Response response = await client.ResizePoolAsync("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + Response response = await client.GetPoolAsync("pool"); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_StopPoolResize_ShortVersion() + public void Example_Batch_GetPool_AddAVirtualMachineConfigurationPoolWithOSDisk() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - Response response = client.StopPoolResize(""); + Response response = client.GetPool("mypool001", null, DateTimeOffset.Parse("Wed, 23 Aug 2023 08:42:01 GMT"), null, null, null, null); - Console.WriteLine(response.Status); + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_StopPoolResize_ShortVersion_Async() + public async Task Example_Batch_GetPool_AddAVirtualMachineConfigurationPoolWithOSDisk_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - Response response = await client.StopPoolResizeAsync(""); + Response response = await client.GetPoolAsync("mypool001", null, DateTimeOffset.Parse("Wed, 23 Aug 2023 08:42:01 GMT"), null, null, null, null); - Console.WriteLine(response.Status); + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_StopPoolResize_AllParameters() + public void Example_Batch_GetPool_AddAVirtualMachineConfigurationPoolWithOSDisk_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - Response response = client.StopPoolResize("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); - - Console.WriteLine(response.Status); + Response response = client.GetPool("mypool001"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_StopPoolResize_AllParameters_Async() + public async Task Example_Batch_GetPool_AddAVirtualMachineConfigurationPoolWithOSDisk_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - Response response = await client.StopPoolResizeAsync("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); - - Console.WriteLine(response.Status); + Response response = await client.GetPoolAsync("mypool001"); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_ReplacePoolProperties_ShortVersion() + public void Example_Batch_GetPool_GetAVirtualMachineConfigurationPoolWithServiceArtifactReference() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - using RequestContent content = RequestContent.Create(new - { - applicationPackageReferences = new object[] - { -new -{ -applicationId = "", -} - }, - metadata = new object[] - { -new -{ -name = "", -value = "", -} - }, - }); - Response response = client.ReplacePoolProperties("", content); + Response response = client.GetPool("pool", null, DateTimeOffset.Parse("Thu, 11 May 2023 08:08:01 GMT"), null, null, null, null); - Console.WriteLine(response.Status); + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_ReplacePoolProperties_ShortVersion_Async() + public async Task Example_Batch_GetPool_GetAVirtualMachineConfigurationPoolWithServiceArtifactReference_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - using RequestContent content = RequestContent.Create(new - { - applicationPackageReferences = new object[] - { -new -{ -applicationId = "", -} - }, - metadata = new object[] - { -new -{ -name = "", -value = "", -} - }, - }); - Response response = await client.ReplacePoolPropertiesAsync("", content); + Response response = await client.GetPoolAsync("pool", null, DateTimeOffset.Parse("Thu, 11 May 2023 08:08:01 GMT"), null, null, null, null); - Console.WriteLine(response.Status); + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_ReplacePoolProperties_ShortVersion_Convenience() + public void Example_Batch_GetPool_GetAVirtualMachineConfigurationPoolWithServiceArtifactReference_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - BatchPoolReplaceContent pool = new BatchPoolReplaceContent(new BatchApplicationPackageReference[] - { -new BatchApplicationPackageReference("") - }, new MetadataItem[] - { -new MetadataItem("", "") - }); - Response response = client.ReplacePoolProperties("", pool); + Response response = client.GetPool("pool"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_ReplacePoolProperties_ShortVersion_Convenience_Async() + public async Task Example_Batch_GetPool_GetAVirtualMachineConfigurationPoolWithServiceArtifactReference_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - BatchPoolReplaceContent pool = new BatchPoolReplaceContent(new BatchApplicationPackageReference[] - { -new BatchApplicationPackageReference("") - }, new MetadataItem[] - { -new MetadataItem("", "") - }); - Response response = await client.ReplacePoolPropertiesAsync("", pool); + Response response = await client.GetPoolAsync("pool"); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_ReplacePoolProperties_AllParameters() + public void Example_Batch_UpdatePool_PatchThePool() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); @@ -2560,83 +1866,19 @@ public void Example_Batch_ReplacePoolProperties_AllParameters() { startTask = new { - commandLine = "", - containerSettings = new - { - containerRunOptions = "", - imageName = "", - registry = new - { - username = "", - password = "", - registryServer = "", - identityReference = new - { - resourceId = "", - }, - }, - workingDirectory = "taskWorkingDirectory", - }, - resourceFiles = new object[] - { -new -{ -autoStorageContainerName = "", -storageContainerUrl = "", -httpUrl = "", -blobPrefix = "", -filePath = "", -fileMode = "", -} - }, - environmentSettings = new object[] - { -new -{ -name = "", -value = "", -} - }, - userIdentity = new - { - username = "", - autoUser = new - { - scope = "task", - elevationLevel = "nonadmin", - }, - }, - maxTaskRetryCount = 1234, - waitForSuccess = true, + commandLine = "/bin/bash -c 'echo start task'", }, - applicationPackageReferences = new object[] - { -new -{ -applicationId = "", -version = "", -} - }, - metadata = new object[] - { -new -{ -name = "", -value = "", -} - }, - targetNodeCommunicationMode = "default", }); - Response response = client.ReplacePoolProperties("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + Response response = client.UpdatePool("poolId", content); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_ReplacePoolProperties_AllParameters_Async() + public async Task Example_Batch_UpdatePool_PatchThePool_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); @@ -2644,413 +1886,437 @@ public async Task Example_Batch_ReplacePoolProperties_AllParameters_Async() { startTask = new { - commandLine = "", - containerSettings = new - { - containerRunOptions = "", - imageName = "", - registry = new - { - username = "", - password = "", - registryServer = "", - identityReference = new - { - resourceId = "", - }, - }, - workingDirectory = "taskWorkingDirectory", - }, - resourceFiles = new object[] - { -new -{ -autoStorageContainerName = "", -storageContainerUrl = "", -httpUrl = "", -blobPrefix = "", -filePath = "", -fileMode = "", -} - }, - environmentSettings = new object[] - { -new -{ -name = "", -value = "", -} - }, - userIdentity = new - { - username = "", - autoUser = new - { - scope = "task", - elevationLevel = "nonadmin", - }, - }, - maxTaskRetryCount = 1234, - waitForSuccess = true, + commandLine = "/bin/bash -c 'echo start task'", }, - applicationPackageReferences = new object[] - { -new -{ -applicationId = "", -version = "", -} - }, - metadata = new object[] - { -new -{ -name = "", -value = "", -} - }, - targetNodeCommunicationMode = "default", }); - Response response = await client.ReplacePoolPropertiesAsync("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + Response response = await client.UpdatePoolAsync("poolId", content); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_ReplacePoolProperties_AllParameters_Convenience() + public void Example_Batch_DisablePoolAutoScale_DisablePoolAutoscale() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - BatchPoolReplaceContent pool = new BatchPoolReplaceContent(new BatchApplicationPackageReference[] - { -new BatchApplicationPackageReference("") -{ -Version = "", -} - }, new MetadataItem[] - { -new MetadataItem("", "") - }) + Response response = client.DisablePoolAutoScale("poolId"); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_DisablePoolAutoScale_DisablePoolAutoscale_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = await client.DisablePoolAutoScaleAsync("poolId"); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_EnablePoolAutoScale_PoolEnableAutoscale() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new { - StartTask = new BatchStartTask("") - { - ContainerSettings = new BatchTaskContainerSettings("") - { - ContainerRunOptions = "", - Registry = new ContainerRegistryReference - { - Username = "", - Password = "", - RegistryServer = "", - IdentityReference = new BatchNodeIdentityReference - { - ResourceId = "", - }, - }, - WorkingDirectory = ContainerWorkingDirectory.TaskWorkingDirectory, - }, - ResourceFiles = {new ResourceFile -{ -AutoStorageContainerName = "", -StorageContainerUrl = "", -HttpUrl = "", -BlobPrefix = "", -FilePath = "", -FileMode = "", -IdentityReference = default, -}}, - EnvironmentSettings = {new EnvironmentSetting("") -{ -Value = "", -}}, - UserIdentity = new UserIdentity - { - Username = "", - AutoUser = new AutoUserSpecification - { - Scope = AutoUserScope.Task, - ElevationLevel = ElevationLevel.NonAdmin, - }, - }, - MaxTaskRetryCount = 1234, - WaitForSuccess = true, - }, - TargetNodeCommunicationMode = BatchNodeCommunicationMode.Default, - }; - Response response = client.ReplacePoolProperties("", pool, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + autoScaleFormula = "$TargetDedicated=0", + autoScaleEvaluationInterval = "PT8M", + }); + Response response = client.EnablePoolAutoScale("poolId", content); + + Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_ReplacePoolProperties_AllParameters_Convenience_Async() + public async Task Example_Batch_EnablePoolAutoScale_PoolEnableAutoscale_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - BatchPoolReplaceContent pool = new BatchPoolReplaceContent(new BatchApplicationPackageReference[] + using RequestContent content = RequestContent.Create(new { -new BatchApplicationPackageReference("") -{ -Version = "", -} - }, new MetadataItem[] + autoScaleFormula = "$TargetDedicated=0", + autoScaleEvaluationInterval = "PT8M", + }); + Response response = await client.EnablePoolAutoScaleAsync("poolId", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_EnablePoolAutoScale_PoolEnableAutoscale_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchPoolEnableAutoScaleContent content = new BatchPoolEnableAutoScaleContent { -new MetadataItem("", "") - }) + AutoScaleFormula = "$TargetDedicated=0", + AutoScaleEvaluationInterval = XmlConvert.ToTimeSpan("PT8M"), + }; + Response response = client.EnablePoolAutoScale("poolId", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_EnablePoolAutoScale_PoolEnableAutoscale_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchPoolEnableAutoScaleContent content = new BatchPoolEnableAutoScaleContent { - StartTask = new BatchStartTask("") - { - ContainerSettings = new BatchTaskContainerSettings("") - { - ContainerRunOptions = "", - Registry = new ContainerRegistryReference - { - Username = "", - Password = "", - RegistryServer = "", - IdentityReference = new BatchNodeIdentityReference - { - ResourceId = "", - }, - }, - WorkingDirectory = ContainerWorkingDirectory.TaskWorkingDirectory, - }, - ResourceFiles = {new ResourceFile -{ -AutoStorageContainerName = "", -StorageContainerUrl = "", -HttpUrl = "", -BlobPrefix = "", -FilePath = "", -FileMode = "", -IdentityReference = default, -}}, - EnvironmentSettings = {new EnvironmentSetting("") -{ -Value = "", -}}, - UserIdentity = new UserIdentity - { - Username = "", - AutoUser = new AutoUserSpecification - { - Scope = AutoUserScope.Task, - ElevationLevel = ElevationLevel.NonAdmin, - }, - }, - MaxTaskRetryCount = 1234, - WaitForSuccess = true, - }, - TargetNodeCommunicationMode = BatchNodeCommunicationMode.Default, + AutoScaleFormula = "$TargetDedicated=0", + AutoScaleEvaluationInterval = XmlConvert.ToTimeSpan("PT8M"), }; - Response response = await client.ReplacePoolPropertiesAsync("", pool, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + Response response = await client.EnablePoolAutoScaleAsync("poolId", content); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_RemoveNodes_ShortVersion() + public void Example_Batch_EvaluatePoolAutoScale_PoolEvaluateAutoscale() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - nodeList = new object[] + autoScaleFormula = "$TargetDedicated=1", + }); + Response response = client.EvaluatePoolAutoScale("poolId", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("timestamp").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_EvaluatePoolAutoScale_PoolEvaluateAutoscale_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new { -"" - }, + autoScaleFormula = "$TargetDedicated=1", }); - Response response = client.RemoveNodes("", content); + Response response = await client.EvaluatePoolAutoScaleAsync("poolId", content); - Console.WriteLine(response.Status); + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("timestamp").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_EvaluatePoolAutoScale_PoolEvaluateAutoscale_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchPoolEvaluateAutoScaleContent content = new BatchPoolEvaluateAutoScaleContent("$TargetDedicated=1"); + Response response = client.EvaluatePoolAutoScale("poolId", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_EvaluatePoolAutoScale_PoolEvaluateAutoscale_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchPoolEvaluateAutoScaleContent content = new BatchPoolEvaluateAutoScaleContent("$TargetDedicated=1"); + Response response = await client.EvaluatePoolAutoScaleAsync("poolId", content); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_RemoveNodes_ShortVersion_Async() + public void Example_Batch_ResizePool_PoolResize() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - nodeList = new object[] + targetDedicatedNodes = 1, + targetLowPriorityNodes = 0, + }); + Response response = client.ResizePool("resizePool", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_ResizePool_PoolResize_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new { -"" - }, + targetDedicatedNodes = 1, + targetLowPriorityNodes = 0, }); - Response response = await client.RemoveNodesAsync("", content); + Response response = await client.ResizePoolAsync("resizePool", content); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_RemoveNodes_ShortVersion_Convenience() + public void Example_Batch_ResizePool_PoolResize_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchPoolResizeContent content = new BatchPoolResizeContent + { + TargetDedicatedNodes = 1, + TargetLowPriorityNodes = 0, + }; + Response response = client.ResizePool("resizePool", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_ResizePool_PoolResize_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchPoolResizeContent content = new BatchPoolResizeContent + { + TargetDedicatedNodes = 1, + TargetLowPriorityNodes = 0, + }; + Response response = await client.ResizePoolAsync("resizePool", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_StopPoolResize_PoolStopResize() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - BatchNodeRemoveContent content = new BatchNodeRemoveContent(new string[] { "" }); - Response response = client.RemoveNodes("", content); + Response response = client.StopPoolResize("poolId"); + + Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_RemoveNodes_ShortVersion_Convenience_Async() + public async Task Example_Batch_StopPoolResize_PoolStopResize_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - BatchNodeRemoveContent content = new BatchNodeRemoveContent(new string[] { "" }); - Response response = await client.RemoveNodesAsync("", content); + Response response = await client.StopPoolResizeAsync("poolId"); + + Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_RemoveNodes_AllParameters() + public void Example_Batch_ReplacePoolProperties_PoolUpdate() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - nodeList = new object[] - { -"" - }, - resizeTimeout = "PT1H23M45S", - nodeDeallocationOption = "requeue", + startTask = new + { + commandLine = "/bin/bash -c 'echo start task'", + }, + applicationPackageReferences = Array.Empty(), + metadata = Array.Empty(), }); - Response response = client.RemoveNodes("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + Response response = client.ReplacePoolProperties("poolId", content); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_RemoveNodes_AllParameters_Async() + public async Task Example_Batch_ReplacePoolProperties_PoolUpdate_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - nodeList = new object[] - { -"" - }, - resizeTimeout = "PT1H23M45S", - nodeDeallocationOption = "requeue", + startTask = new + { + commandLine = "/bin/bash -c 'echo start task'", + }, + applicationPackageReferences = Array.Empty(), + metadata = Array.Empty(), }); - Response response = await client.RemoveNodesAsync("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + Response response = await client.ReplacePoolPropertiesAsync("poolId", content); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_RemoveNodes_AllParameters_Convenience() + public void Example_Batch_ReplacePoolProperties_PoolUpdate_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - BatchNodeRemoveContent content = new BatchNodeRemoveContent(new string[] { "" }) + BatchPoolReplaceContent pool = new BatchPoolReplaceContent(Array.Empty(), Array.Empty()) { - ResizeTimeout = XmlConvert.ToTimeSpan("PT1H23M45S"), - NodeDeallocationOption = BatchNodeDeallocationOption.Requeue, + StartTask = new BatchStartTask("/bin/bash -c 'echo start task'"), }; - Response response = client.RemoveNodes("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + Response response = client.ReplacePoolProperties("poolId", pool); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_RemoveNodes_AllParameters_Convenience_Async() + public async Task Example_Batch_ReplacePoolProperties_PoolUpdate_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - BatchNodeRemoveContent content = new BatchNodeRemoveContent(new string[] { "" }) + BatchPoolReplaceContent pool = new BatchPoolReplaceContent(Array.Empty(), Array.Empty()) { - ResizeTimeout = XmlConvert.ToTimeSpan("PT1H23M45S"), - NodeDeallocationOption = BatchNodeDeallocationOption.Requeue, + StartTask = new BatchStartTask("/bin/bash -c 'echo start task'"), }; - Response response = await client.RemoveNodesAsync("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + Response response = await client.ReplacePoolPropertiesAsync("poolId", pool); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_DeleteJob_ShortVersion() + public void Example_Batch_RemoveNodes_PoolRemoveNodes() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - Response response = client.DeleteJob(""); + using RequestContent content = RequestContent.Create(new + { + nodeList = new object[] + { +"tvm-1695681911_1-20161122t224741z", +"tvm-1695681911_2-20161122t224741z" + }, + }); + Response response = client.RemoveNodes("poolId", content); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_DeleteJob_ShortVersion_Async() + public async Task Example_Batch_RemoveNodes_PoolRemoveNodes_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - Response response = await client.DeleteJobAsync(""); + using RequestContent content = RequestContent.Create(new + { + nodeList = new object[] + { +"tvm-1695681911_1-20161122t224741z", +"tvm-1695681911_2-20161122t224741z" + }, + }); + Response response = await client.RemoveNodesAsync("poolId", content); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_DeleteJob_AllParameters() + public void Example_Batch_RemoveNodes_PoolRemoveNodes_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - Response response = client.DeleteJob("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + BatchNodeRemoveContent content = new BatchNodeRemoveContent(new string[] { "tvm-1695681911_1-20161122t224741z", "tvm-1695681911_2-20161122t224741z" }); + Response response = client.RemoveNodes("poolId", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_RemoveNodes_PoolRemoveNodes_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchNodeRemoveContent content = new BatchNodeRemoveContent(new string[] { "tvm-1695681911_1-20161122t224741z", "tvm-1695681911_2-20161122t224741z" }); + Response response = await client.RemoveNodesAsync("poolId", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_DeleteJob_DeleteJob() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.DeleteJob("jobId"); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_DeleteJob_AllParameters_Async() + public async Task Example_Batch_DeleteJob_DeleteJob_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - Response response = await client.DeleteJobAsync("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + Response response = await client.DeleteJobAsync("jobId"); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetJob_ShortVersion() + public void Example_Batch_GetJob_JobGet() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - Response response = client.GetJob("", null, null, null, null, null, null); + Response response = client.GetJob("jobId", null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null, null, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("poolInfo").ToString()); @@ -3058,13 +2324,13 @@ public void Example_Batch_GetJob_ShortVersion() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetJob_ShortVersion_Async() + public async Task Example_Batch_GetJob_JobGet_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - Response response = await client.GetJobAsync("", null, null, null, null, null, null); + Response response = await client.GetJobAsync("jobId", null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null, null, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("poolInfo").ToString()); @@ -3072,12927 +2338,2677 @@ public async Task Example_Batch_GetJob_ShortVersion_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetJob_ShortVersion_Convenience() + public void Example_Batch_GetJob_JobGet_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - Response response = client.GetJob(""); + Response response = client.GetJob("jobId"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetJob_ShortVersion_Convenience_Async() + public async Task Example_Batch_GetJob_JobGet_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - Response response = await client.GetJobAsync(""); + Response response = await client.GetJobAsync("jobId"); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetJob_AllParameters() + public void Example_Batch_UpdateJob_JobPatch() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - Response response = client.GetJob("", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), new string[] { "" }, new string[] { "" }, null, null); + Console.WriteLine(response.Status); + } - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("usesTaskDependencies").ToString()); - Console.WriteLine(result.GetProperty("url").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("lastModified").ToString()); - Console.WriteLine(result.GetProperty("creationTime").ToString()); - Console.WriteLine(result.GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("stateTransitionTime").ToString()); - Console.WriteLine(result.GetProperty("previousState").ToString()); - Console.WriteLine(result.GetProperty("previousStateTransitionTime").ToString()); - Console.WriteLine(result.GetProperty("priority").ToString()); - Console.WriteLine(result.GetProperty("allowTaskPreemption").ToString()); - Console.WriteLine(result.GetProperty("maxParallelTasks").ToString()); - Console.WriteLine(result.GetProperty("constraints").GetProperty("maxWallClockTime").ToString()); - Console.WriteLine(result.GetProperty("constraints").GetProperty("maxTaskRetryCount").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("commandLine").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("filePattern").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("path").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("containerUrl").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("uploadHeaders")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("uploadHeaders")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("uploadOptions").GetProperty("uploadCondition").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("constraints").GetProperty("maxWallClockTime").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("constraints").GetProperty("retentionTime").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("constraints").GetProperty("maxTaskRetryCount").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("requiredSlots").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("killJobOnCompletion").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("userIdentity").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("runExclusive").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("applicationPackageReferences")[0].GetProperty("applicationId").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("applicationPackageReferences")[0].GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("authenticationTokenSettings").GetProperty("access")[0].ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("allowLowPriorityNode").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("commandLine").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("constraints").GetProperty("maxWallClockTime").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("constraints").GetProperty("retentionTime").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("constraints").GetProperty("maxTaskRetryCount").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("waitForSuccess").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("userIdentity").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("rerunOnNodeRebootAfterSuccess").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("commandLine").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("maxWallClockTime").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("retentionTime").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("userIdentity").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); - Console.WriteLine(result.GetProperty("commonEnvironmentSettings")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("commonEnvironmentSettings")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("poolId").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("autoPoolIdPrefix").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("poolLifetimeOption").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("keepAlive").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("vmSize").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("publisher").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("offer").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("sku").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("virtualMachineImageId").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("exactVersion").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("nodeAgentSKUId").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("windowsConfiguration").GetProperty("enableAutomaticUpdates").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("lun").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("caching").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("diskSizeGB").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("storageAccountType").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("licenseType").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerImageNames")[0].ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("password").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("registryServer").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("diskEncryptionConfiguration").GetProperty("targets")[0].ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("nodePlacementConfiguration").GetProperty("policy").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("publisher").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("typeHandlerVersion").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("autoUpgradeMinorVersion").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("enableAutomaticUpgrade").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("settings").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("protectedSettings").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("provisionAfterExtensions")[0].ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("ephemeralOSDiskSettings").GetProperty("placement").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("caching").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("managedDisk").GetProperty("storageAccountType").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("writeAcceleratorEnabled").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("encryptionAtHost").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("securityType").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("uefiSettings").GetProperty("secureBootEnabled").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("uefiSettings").GetProperty("vTpmEnabled").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("serviceArtifactReference").GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("taskSlotsPerNode").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("taskSchedulingPolicy").GetProperty("nodeFillType").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("resizeTimeout").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("resourceTags").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("targetDedicatedNodes").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("targetLowPriorityNodes").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("enableAutoScale").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("autoScaleFormula").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("autoScaleEvaluationInterval").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("enableInterNodeCommunication").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("subnetId").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("dynamicVNetAssignmentScope").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("protocol").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("backendPort").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("frontendPortRangeStart").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("frontendPortRangeEnd").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("priority").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("access").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("sourceAddressPrefix").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("sourcePortRanges")[0].ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("publicIPAddressConfiguration").GetProperty("provision").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("publicIPAddressConfiguration").GetProperty("ipAddressIds")[0].ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("enableAcceleratedNetworking").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("commandLine").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("userIdentity").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("maxTaskRetryCount").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("waitForSuccess").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("applicationPackageReferences")[0].GetProperty("applicationId").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("applicationPackageReferences")[0].GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("password").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("elevationLevel").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("uid").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("gid").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("sshPrivateKey").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("windowsUserConfiguration").GetProperty("loginMode").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("metadata")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("metadata")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("accountName").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("containerName").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("accountKey").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("sasKey").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("blobfuseOptions").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("relativeMountPath").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("relativeMountPath").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("mountOptions").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("relativeMountPath").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("mountOptions").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("password").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("accountName").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("azureFileUrl").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("accountKey").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("relativeMountPath").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("mountOptions").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("targetNodeCommunicationMode").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("mode").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("disableAutomaticRollback").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("enableAutomaticOSUpgrade").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("useRollingUpgradePolicy").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("osRollingUpgradeDeferral").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("enableCrossZoneUpgrade").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxBatchInstancePercent").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxUnhealthyInstancePercent").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxUnhealthyUpgradedInstancePercent").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("pauseTimeBetweenBatches").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("prioritizeUnhealthyInstances").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("rollbackFailedInstancesOnPolicyBreach").ToString()); - Console.WriteLine(result.GetProperty("onAllTasksComplete").ToString()); - Console.WriteLine(result.GetProperty("onTaskFailure").ToString()); - Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("subnetId").ToString()); - Console.WriteLine(result.GetProperty("metadata")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("metadata")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("poolId").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("schedulingError").GetProperty("category").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("schedulingError").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("schedulingError").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("schedulingError").GetProperty("details")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("schedulingError").GetProperty("details")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("terminateReason").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("url").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("lastUpdateTime").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("userCPUTime").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("kernelCPUTime").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("wallClockTime").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("readIOps").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("writeIOps").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("readIOGiB").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("writeIOGiB").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("numSucceededTasks").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("numFailedTasks").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("numTaskRetries").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("waitTime").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetJob_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - Response response = client.GetJob("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), select: new string[] { "" }, expand: new string[] { "" }, requestConditions: null); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_UpdateJob_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new object()); - Response response = client.UpdateJob("", content); + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_UpdateJob_JobPatch_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + priority = 100, + constraints = new + { + maxWallClockTime = "PT1H", + maxTaskRetryCount = -1, + }, + poolInfo = new + { + poolId = "poolId", + }, + }); + Response response = await client.UpdateJobAsync("jobId", content); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_UpdateJob_ShortVersion_Async() + public void Example_Batch_ReplaceJob_JobUpdate() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - using RequestContent content = RequestContent.Create(new object()); - Response response = await client.UpdateJobAsync("", content); + using RequestContent content = RequestContent.Create(new + { + priority = 100, + constraints = new + { + maxWallClockTime = "PT1H", + maxTaskRetryCount = -1, + }, + poolInfo = new + { + poolId = "poolId", + }, + }); + Response response = client.ReplaceJob("jobId", content); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_UpdateJob_AllParameters() + public async Task Example_Batch_ReplaceJob_JobUpdate_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - priority = 1234, - allowTaskPreemption = true, - maxParallelTasks = 1234, + priority = 100, constraints = new { - maxWallClockTime = "PT1H23M45S", - maxTaskRetryCount = 1234, + maxWallClockTime = "PT1H", + maxTaskRetryCount = -1, }, poolInfo = new { - poolId = "", - autoPoolSpecification = new - { - autoPoolIdPrefix = "", - poolLifetimeOption = "jobschedule", - keepAlive = true, - pool = new - { - displayName = "", - vmSize = "", - virtualMachineConfiguration = new - { - imageReference = new - { - publisher = "", - offer = "", - sku = "", - version = "", - virtualMachineImageId = "", - }, - nodeAgentSKUId = "", - windowsConfiguration = new - { - enableAutomaticUpdates = true, - }, - dataDisks = new object[] - { -new -{ -lun = 1234, -caching = "none", -diskSizeGB = 1234, -storageAccountType = "standard_lrs", -} - }, - licenseType = "", - containerConfiguration = new - { - type = "dockerCompatible", - containerImageNames = new object[] - { -"" - }, - containerRegistries = new object[] - { -new -{ -username = "", -password = "", -registryServer = "", -identityReference = new -{ -resourceId = "", -}, -} - }, - }, - diskEncryptionConfiguration = new - { - targets = new object[] - { -"osdisk" - }, - }, - nodePlacementConfiguration = new - { - policy = "regional", - }, - extensions = new object[] - { -new -{ -name = "", -publisher = "", -type = "", -typeHandlerVersion = "", -autoUpgradeMinorVersion = true, -enableAutomaticUpgrade = true, -settings = new -{ -key = "", -}, -protectedSettings = new -{ -key = "", -}, -provisionAfterExtensions = new object[] -{ -"" -}, -} - }, - osDisk = new - { - ephemeralOSDiskSettings = new - { - placement = "cachedisk", - }, - caching = "none", - diskSizeGB = 1234, - managedDisk = new - { - storageAccountType = "standard_lrs", - }, - writeAcceleratorEnabled = true, - }, - securityProfile = new - { - encryptionAtHost = true, - securityType = "trustedLaunch", - uefiSettings = new - { - secureBootEnabled = true, - vTpmEnabled = true, - }, - }, - serviceArtifactReference = new - { - id = "", - }, - }, - taskSlotsPerNode = 1234, - taskSchedulingPolicy = new - { - nodeFillType = "spread", - }, - resizeTimeout = "PT1H23M45S", - resourceTags = "", - targetDedicatedNodes = 1234, - targetLowPriorityNodes = 1234, - enableAutoScale = true, - autoScaleFormula = "", - autoScaleEvaluationInterval = "PT1H23M45S", - enableInterNodeCommunication = true, - networkConfiguration = new - { - subnetId = "", - dynamicVNetAssignmentScope = "none", - endpointConfiguration = new - { - inboundNATPools = new object[] - { -new -{ -name = "", -protocol = "tcp", -backendPort = 1234, -frontendPortRangeStart = 1234, -frontendPortRangeEnd = 1234, -networkSecurityGroupRules = new object[] -{ -new -{ -priority = 1234, -access = "allow", -sourceAddressPrefix = "", -sourcePortRanges = new object[] -{ -"" -}, -} -}, -} - }, - }, - publicIPAddressConfiguration = new - { - provision = "batchmanaged", - ipAddressIds = new object[] - { -"" - }, - }, - enableAcceleratedNetworking = true, - }, - startTask = new - { - commandLine = "", - containerSettings = new - { - containerRunOptions = "", - imageName = "", - workingDirectory = "taskWorkingDirectory", - }, - resourceFiles = new object[] - { -new -{ -autoStorageContainerName = "", -storageContainerUrl = "", -httpUrl = "", -blobPrefix = "", -filePath = "", -fileMode = "", -} - }, - environmentSettings = new object[] - { -new -{ -name = "", -value = "", -} - }, - userIdentity = new - { - username = "", - autoUser = new - { - scope = "task", - elevationLevel = "nonadmin", - }, - }, - maxTaskRetryCount = 1234, - waitForSuccess = true, - }, - applicationPackageReferences = new object[] - { -new -{ -applicationId = "", -version = "", -} - }, - userAccounts = new object[] - { -new -{ -name = "", -password = "", -elevationLevel = "nonadmin", -linuxUserConfiguration = new -{ -uid = 1234, -gid = 1234, -sshPrivateKey = "", -}, -windowsUserConfiguration = new -{ -loginMode = "batch", -}, -} - }, - metadata = new object[] - { -new -{ -name = "", -value = "", -} - }, - mountConfiguration = new object[] - { -new -{ -azureBlobFileSystemConfiguration = new -{ -accountName = "", -containerName = "", -accountKey = "", -sasKey = "", -blobfuseOptions = "", -relativeMountPath = "", -}, -nfsMountConfiguration = new -{ -source = "", -relativeMountPath = "", -mountOptions = "", -}, -cifsMountConfiguration = new -{ -username = "", -source = "", -relativeMountPath = "", -mountOptions = "", -password = "", -}, -azureFileShareConfiguration = new -{ -accountName = "", -azureFileUrl = "", -accountKey = "", -relativeMountPath = "", -mountOptions = "", -}, -} - }, - targetNodeCommunicationMode = "default", - upgradePolicy = new - { - mode = "automatic", - automaticOSUpgradePolicy = new - { - disableAutomaticRollback = true, - enableAutomaticOSUpgrade = true, - useRollingUpgradePolicy = true, - osRollingUpgradeDeferral = true, - }, - rollingUpgradePolicy = new - { - enableCrossZoneUpgrade = true, - maxBatchInstancePercent = 1234, - maxUnhealthyInstancePercent = 1234, - maxUnhealthyUpgradedInstancePercent = 1234, - pauseTimeBetweenBatches = "PT1H23M45S", - prioritizeUnhealthyInstances = true, - rollbackFailedInstancesOnPolicyBreach = true, - }, - }, - }, - }, - }, - onAllTasksComplete = "noaction", - metadata = new object[] - { -null - }, - }); - Response response = client.UpdateJob("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_UpdateJob_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - priority = 1234, - allowTaskPreemption = true, - maxParallelTasks = 1234, - constraints = new - { - maxWallClockTime = "PT1H23M45S", - maxTaskRetryCount = 1234, - }, - poolInfo = new - { - poolId = "", - autoPoolSpecification = new - { - autoPoolIdPrefix = "", - poolLifetimeOption = "jobschedule", - keepAlive = true, - pool = new - { - displayName = "", - vmSize = "", - virtualMachineConfiguration = new - { - imageReference = new - { - publisher = "", - offer = "", - sku = "", - version = "", - virtualMachineImageId = "", - }, - nodeAgentSKUId = "", - windowsConfiguration = new - { - enableAutomaticUpdates = true, - }, - dataDisks = new object[] - { -new -{ -lun = 1234, -caching = "none", -diskSizeGB = 1234, -storageAccountType = "standard_lrs", -} - }, - licenseType = "", - containerConfiguration = new - { - type = "dockerCompatible", - containerImageNames = new object[] - { -"" - }, - containerRegistries = new object[] - { -new -{ -username = "", -password = "", -registryServer = "", -identityReference = new -{ -resourceId = "", -}, -} - }, - }, - diskEncryptionConfiguration = new - { - targets = new object[] - { -"osdisk" - }, - }, - nodePlacementConfiguration = new - { - policy = "regional", - }, - extensions = new object[] - { -new -{ -name = "", -publisher = "", -type = "", -typeHandlerVersion = "", -autoUpgradeMinorVersion = true, -enableAutomaticUpgrade = true, -settings = new -{ -key = "", -}, -protectedSettings = new -{ -key = "", -}, -provisionAfterExtensions = new object[] -{ -"" -}, -} - }, - osDisk = new - { - ephemeralOSDiskSettings = new - { - placement = "cachedisk", - }, - caching = "none", - diskSizeGB = 1234, - managedDisk = new - { - storageAccountType = "standard_lrs", - }, - writeAcceleratorEnabled = true, - }, - securityProfile = new - { - encryptionAtHost = true, - securityType = "trustedLaunch", - uefiSettings = new - { - secureBootEnabled = true, - vTpmEnabled = true, - }, - }, - serviceArtifactReference = new - { - id = "", - }, - }, - taskSlotsPerNode = 1234, - taskSchedulingPolicy = new - { - nodeFillType = "spread", - }, - resizeTimeout = "PT1H23M45S", - resourceTags = "", - targetDedicatedNodes = 1234, - targetLowPriorityNodes = 1234, - enableAutoScale = true, - autoScaleFormula = "", - autoScaleEvaluationInterval = "PT1H23M45S", - enableInterNodeCommunication = true, - networkConfiguration = new - { - subnetId = "", - dynamicVNetAssignmentScope = "none", - endpointConfiguration = new - { - inboundNATPools = new object[] - { -new -{ -name = "", -protocol = "tcp", -backendPort = 1234, -frontendPortRangeStart = 1234, -frontendPortRangeEnd = 1234, -networkSecurityGroupRules = new object[] -{ -new -{ -priority = 1234, -access = "allow", -sourceAddressPrefix = "", -sourcePortRanges = new object[] -{ -"" -}, -} -}, -} - }, - }, - publicIPAddressConfiguration = new - { - provision = "batchmanaged", - ipAddressIds = new object[] - { -"" - }, - }, - enableAcceleratedNetworking = true, - }, - startTask = new - { - commandLine = "", - containerSettings = new - { - containerRunOptions = "", - imageName = "", - workingDirectory = "taskWorkingDirectory", - }, - resourceFiles = new object[] - { -new -{ -autoStorageContainerName = "", -storageContainerUrl = "", -httpUrl = "", -blobPrefix = "", -filePath = "", -fileMode = "", -} - }, - environmentSettings = new object[] - { -new -{ -name = "", -value = "", -} - }, - userIdentity = new - { - username = "", - autoUser = new - { - scope = "task", - elevationLevel = "nonadmin", - }, - }, - maxTaskRetryCount = 1234, - waitForSuccess = true, - }, - applicationPackageReferences = new object[] - { -new -{ -applicationId = "", -version = "", -} - }, - userAccounts = new object[] - { -new -{ -name = "", -password = "", -elevationLevel = "nonadmin", -linuxUserConfiguration = new -{ -uid = 1234, -gid = 1234, -sshPrivateKey = "", -}, -windowsUserConfiguration = new -{ -loginMode = "batch", -}, -} - }, - metadata = new object[] - { -new -{ -name = "", -value = "", -} - }, - mountConfiguration = new object[] - { -new -{ -azureBlobFileSystemConfiguration = new -{ -accountName = "", -containerName = "", -accountKey = "", -sasKey = "", -blobfuseOptions = "", -relativeMountPath = "", -}, -nfsMountConfiguration = new -{ -source = "", -relativeMountPath = "", -mountOptions = "", -}, -cifsMountConfiguration = new -{ -username = "", -source = "", -relativeMountPath = "", -mountOptions = "", -password = "", -}, -azureFileShareConfiguration = new -{ -accountName = "", -azureFileUrl = "", -accountKey = "", -relativeMountPath = "", -mountOptions = "", -}, -} - }, - targetNodeCommunicationMode = "default", - upgradePolicy = new - { - mode = "automatic", - automaticOSUpgradePolicy = new - { - disableAutomaticRollback = true, - enableAutomaticOSUpgrade = true, - useRollingUpgradePolicy = true, - osRollingUpgradeDeferral = true, - }, - rollingUpgradePolicy = new - { - enableCrossZoneUpgrade = true, - maxBatchInstancePercent = 1234, - maxUnhealthyInstancePercent = 1234, - maxUnhealthyUpgradedInstancePercent = 1234, - pauseTimeBetweenBatches = "PT1H23M45S", - prioritizeUnhealthyInstances = true, - rollbackFailedInstancesOnPolicyBreach = true, - }, - }, - }, - }, - }, - onAllTasksComplete = "noaction", - metadata = new object[] - { -null - }, - }); - Response response = await client.UpdateJobAsync("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_ReplaceJob_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - poolInfo = new object(), - }); - Response response = client.ReplaceJob("", content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_ReplaceJob_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - poolInfo = new object(), - }); - Response response = await client.ReplaceJobAsync("", content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_ReplaceJob_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - BatchJob job = new BatchJob(new BatchPoolInfo()); - Response response = client.ReplaceJob("", job); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_ReplaceJob_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - BatchJob job = new BatchJob(new BatchPoolInfo()); - Response response = await client.ReplaceJobAsync("", job); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_ReplaceJob_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - priority = 1234, - allowTaskPreemption = true, - maxParallelTasks = 1234, - constraints = new - { - maxWallClockTime = "PT1H23M45S", - maxTaskRetryCount = 1234, - }, - poolInfo = new - { - poolId = "", - autoPoolSpecification = new - { - autoPoolIdPrefix = "", - poolLifetimeOption = "jobschedule", - keepAlive = true, - pool = new - { - displayName = "", - vmSize = "", - virtualMachineConfiguration = new - { - imageReference = new - { - publisher = "", - offer = "", - sku = "", - version = "", - virtualMachineImageId = "", - }, - nodeAgentSKUId = "", - windowsConfiguration = new - { - enableAutomaticUpdates = true, - }, - dataDisks = new object[] - { -new -{ -lun = 1234, -caching = "none", -diskSizeGB = 1234, -storageAccountType = "standard_lrs", -} - }, - licenseType = "", - containerConfiguration = new - { - type = "dockerCompatible", - containerImageNames = new object[] - { -"" - }, - containerRegistries = new object[] - { -new -{ -username = "", -password = "", -registryServer = "", -identityReference = new -{ -resourceId = "", -}, -} - }, - }, - diskEncryptionConfiguration = new - { - targets = new object[] - { -"osdisk" - }, - }, - nodePlacementConfiguration = new - { - policy = "regional", - }, - extensions = new object[] - { -new -{ -name = "", -publisher = "", -type = "", -typeHandlerVersion = "", -autoUpgradeMinorVersion = true, -enableAutomaticUpgrade = true, -settings = new -{ -key = "", -}, -protectedSettings = new -{ -key = "", -}, -provisionAfterExtensions = new object[] -{ -"" -}, -} - }, - osDisk = new - { - ephemeralOSDiskSettings = new - { - placement = "cachedisk", - }, - caching = "none", - diskSizeGB = 1234, - managedDisk = new - { - storageAccountType = "standard_lrs", - }, - writeAcceleratorEnabled = true, - }, - securityProfile = new - { - encryptionAtHost = true, - securityType = "trustedLaunch", - uefiSettings = new - { - secureBootEnabled = true, - vTpmEnabled = true, - }, - }, - serviceArtifactReference = new - { - id = "", - }, - }, - taskSlotsPerNode = 1234, - taskSchedulingPolicy = new - { - nodeFillType = "spread", - }, - resizeTimeout = "PT1H23M45S", - resourceTags = "", - targetDedicatedNodes = 1234, - targetLowPriorityNodes = 1234, - enableAutoScale = true, - autoScaleFormula = "", - autoScaleEvaluationInterval = "PT1H23M45S", - enableInterNodeCommunication = true, - networkConfiguration = new - { - subnetId = "", - dynamicVNetAssignmentScope = "none", - endpointConfiguration = new - { - inboundNATPools = new object[] - { -new -{ -name = "", -protocol = "tcp", -backendPort = 1234, -frontendPortRangeStart = 1234, -frontendPortRangeEnd = 1234, -networkSecurityGroupRules = new object[] -{ -new -{ -priority = 1234, -access = "allow", -sourceAddressPrefix = "", -sourcePortRanges = new object[] -{ -"" -}, -} -}, -} - }, - }, - publicIPAddressConfiguration = new - { - provision = "batchmanaged", - ipAddressIds = new object[] - { -"" - }, - }, - enableAcceleratedNetworking = true, - }, - startTask = new - { - commandLine = "", - containerSettings = new - { - containerRunOptions = "", - imageName = "", - workingDirectory = "taskWorkingDirectory", - }, - resourceFiles = new object[] - { -new -{ -autoStorageContainerName = "", -storageContainerUrl = "", -httpUrl = "", -blobPrefix = "", -filePath = "", -fileMode = "", -} - }, - environmentSettings = new object[] - { -new -{ -name = "", -value = "", -} - }, - userIdentity = new - { - username = "", - autoUser = new - { - scope = "task", - elevationLevel = "nonadmin", - }, - }, - maxTaskRetryCount = 1234, - waitForSuccess = true, - }, - applicationPackageReferences = new object[] - { -new -{ -applicationId = "", -version = "", -} - }, - userAccounts = new object[] - { -new -{ -name = "", -password = "", -elevationLevel = "nonadmin", -linuxUserConfiguration = new -{ -uid = 1234, -gid = 1234, -sshPrivateKey = "", -}, -windowsUserConfiguration = new -{ -loginMode = "batch", -}, -} - }, - metadata = new object[] - { -new -{ -name = "", -value = "", -} - }, - mountConfiguration = new object[] - { -new -{ -azureBlobFileSystemConfiguration = new -{ -accountName = "", -containerName = "", -accountKey = "", -sasKey = "", -blobfuseOptions = "", -relativeMountPath = "", -}, -nfsMountConfiguration = new -{ -source = "", -relativeMountPath = "", -mountOptions = "", -}, -cifsMountConfiguration = new -{ -username = "", -source = "", -relativeMountPath = "", -mountOptions = "", -password = "", -}, -azureFileShareConfiguration = new -{ -accountName = "", -azureFileUrl = "", -accountKey = "", -relativeMountPath = "", -mountOptions = "", -}, -} - }, - targetNodeCommunicationMode = "default", - upgradePolicy = new - { - mode = "automatic", - automaticOSUpgradePolicy = new - { - disableAutomaticRollback = true, - enableAutomaticOSUpgrade = true, - useRollingUpgradePolicy = true, - osRollingUpgradeDeferral = true, - }, - rollingUpgradePolicy = new - { - enableCrossZoneUpgrade = true, - maxBatchInstancePercent = 1234, - maxUnhealthyInstancePercent = 1234, - maxUnhealthyUpgradedInstancePercent = 1234, - pauseTimeBetweenBatches = "PT1H23M45S", - prioritizeUnhealthyInstances = true, - rollbackFailedInstancesOnPolicyBreach = true, - }, - }, - }, - }, - }, - onAllTasksComplete = "noaction", - metadata = new object[] - { -null - }, - }); - Response response = client.ReplaceJob("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_ReplaceJob_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - priority = 1234, - allowTaskPreemption = true, - maxParallelTasks = 1234, - constraints = new - { - maxWallClockTime = "PT1H23M45S", - maxTaskRetryCount = 1234, - }, - poolInfo = new - { - poolId = "", - autoPoolSpecification = new - { - autoPoolIdPrefix = "", - poolLifetimeOption = "jobschedule", - keepAlive = true, - pool = new - { - displayName = "", - vmSize = "", - virtualMachineConfiguration = new - { - imageReference = new - { - publisher = "", - offer = "", - sku = "", - version = "", - virtualMachineImageId = "", - }, - nodeAgentSKUId = "", - windowsConfiguration = new - { - enableAutomaticUpdates = true, - }, - dataDisks = new object[] - { -new -{ -lun = 1234, -caching = "none", -diskSizeGB = 1234, -storageAccountType = "standard_lrs", -} - }, - licenseType = "", - containerConfiguration = new - { - type = "dockerCompatible", - containerImageNames = new object[] - { -"" - }, - containerRegistries = new object[] - { -new -{ -username = "", -password = "", -registryServer = "", -identityReference = new -{ -resourceId = "", -}, -} - }, - }, - diskEncryptionConfiguration = new - { - targets = new object[] - { -"osdisk" - }, - }, - nodePlacementConfiguration = new - { - policy = "regional", - }, - extensions = new object[] - { -new -{ -name = "", -publisher = "", -type = "", -typeHandlerVersion = "", -autoUpgradeMinorVersion = true, -enableAutomaticUpgrade = true, -settings = new -{ -key = "", -}, -protectedSettings = new -{ -key = "", -}, -provisionAfterExtensions = new object[] -{ -"" -}, -} - }, - osDisk = new - { - ephemeralOSDiskSettings = new - { - placement = "cachedisk", - }, - caching = "none", - diskSizeGB = 1234, - managedDisk = new - { - storageAccountType = "standard_lrs", - }, - writeAcceleratorEnabled = true, - }, - securityProfile = new - { - encryptionAtHost = true, - securityType = "trustedLaunch", - uefiSettings = new - { - secureBootEnabled = true, - vTpmEnabled = true, - }, - }, - serviceArtifactReference = new - { - id = "", - }, - }, - taskSlotsPerNode = 1234, - taskSchedulingPolicy = new - { - nodeFillType = "spread", - }, - resizeTimeout = "PT1H23M45S", - resourceTags = "", - targetDedicatedNodes = 1234, - targetLowPriorityNodes = 1234, - enableAutoScale = true, - autoScaleFormula = "", - autoScaleEvaluationInterval = "PT1H23M45S", - enableInterNodeCommunication = true, - networkConfiguration = new - { - subnetId = "", - dynamicVNetAssignmentScope = "none", - endpointConfiguration = new - { - inboundNATPools = new object[] - { -new -{ -name = "", -protocol = "tcp", -backendPort = 1234, -frontendPortRangeStart = 1234, -frontendPortRangeEnd = 1234, -networkSecurityGroupRules = new object[] -{ -new -{ -priority = 1234, -access = "allow", -sourceAddressPrefix = "", -sourcePortRanges = new object[] -{ -"" -}, -} -}, -} - }, - }, - publicIPAddressConfiguration = new - { - provision = "batchmanaged", - ipAddressIds = new object[] - { -"" - }, - }, - enableAcceleratedNetworking = true, - }, - startTask = new - { - commandLine = "", - containerSettings = new - { - containerRunOptions = "", - imageName = "", - workingDirectory = "taskWorkingDirectory", - }, - resourceFiles = new object[] - { -new -{ -autoStorageContainerName = "", -storageContainerUrl = "", -httpUrl = "", -blobPrefix = "", -filePath = "", -fileMode = "", -} - }, - environmentSettings = new object[] - { -new -{ -name = "", -value = "", -} - }, - userIdentity = new - { - username = "", - autoUser = new - { - scope = "task", - elevationLevel = "nonadmin", - }, - }, - maxTaskRetryCount = 1234, - waitForSuccess = true, - }, - applicationPackageReferences = new object[] - { -new -{ -applicationId = "", -version = "", -} - }, - userAccounts = new object[] - { -new -{ -name = "", -password = "", -elevationLevel = "nonadmin", -linuxUserConfiguration = new -{ -uid = 1234, -gid = 1234, -sshPrivateKey = "", -}, -windowsUserConfiguration = new -{ -loginMode = "batch", -}, -} - }, - metadata = new object[] - { -new -{ -name = "", -value = "", -} - }, - mountConfiguration = new object[] - { -new -{ -azureBlobFileSystemConfiguration = new -{ -accountName = "", -containerName = "", -accountKey = "", -sasKey = "", -blobfuseOptions = "", -relativeMountPath = "", -}, -nfsMountConfiguration = new -{ -source = "", -relativeMountPath = "", -mountOptions = "", -}, -cifsMountConfiguration = new -{ -username = "", -source = "", -relativeMountPath = "", -mountOptions = "", -password = "", -}, -azureFileShareConfiguration = new -{ -accountName = "", -azureFileUrl = "", -accountKey = "", -relativeMountPath = "", -mountOptions = "", -}, -} - }, - targetNodeCommunicationMode = "default", - upgradePolicy = new - { - mode = "automatic", - automaticOSUpgradePolicy = new - { - disableAutomaticRollback = true, - enableAutomaticOSUpgrade = true, - useRollingUpgradePolicy = true, - osRollingUpgradeDeferral = true, - }, - rollingUpgradePolicy = new - { - enableCrossZoneUpgrade = true, - maxBatchInstancePercent = 1234, - maxUnhealthyInstancePercent = 1234, - maxUnhealthyUpgradedInstancePercent = 1234, - pauseTimeBetweenBatches = "PT1H23M45S", - prioritizeUnhealthyInstances = true, - rollbackFailedInstancesOnPolicyBreach = true, - }, - }, - }, - }, - }, - onAllTasksComplete = "noaction", - metadata = new object[] - { -null - }, - }); - Response response = await client.ReplaceJobAsync("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_ReplaceJob_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - BatchJob job = new BatchJob(new BatchPoolInfo - { - PoolId = "", - AutoPoolSpecification = new BatchAutoPoolSpecification(BatchPoolLifetimeOption.JobSchedule) - { - AutoPoolIdPrefix = "", - KeepAlive = true, - Pool = new BatchPoolSpecification("") - { - DisplayName = "", - VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference - { - Publisher = "", - Offer = "", - Sku = "", - Version = "", - VirtualMachineImageId = "", - }, "") - { - WindowsConfiguration = new WindowsConfiguration - { - EnableAutomaticUpdates = true, - }, - DataDisks = {new DataDisk(1234, 1234) -{ -Caching = CachingType.None, -StorageAccountType = StorageAccountType.StandardLRS, -}}, - LicenseType = "", - ContainerConfiguration = new ContainerConfiguration(ContainerType.DockerCompatible) - { - ContainerImageNames = { "" }, - ContainerRegistries = {new ContainerRegistryReference -{ -Username = "", -Password = "", -RegistryServer = "", -IdentityReference = new BatchNodeIdentityReference -{ -ResourceId = "", -}, -}}, - }, - DiskEncryptionConfiguration = new DiskEncryptionConfiguration - { - Targets = { DiskEncryptionTarget.OsDisk }, - }, - NodePlacementConfiguration = new BatchNodePlacementConfiguration - { - Policy = BatchNodePlacementPolicyType.Regional, - }, - Extensions = {new VMExtension("", "", "") -{ -TypeHandlerVersion = "", -AutoUpgradeMinorVersion = true, -EnableAutomaticUpgrade = true, -Settings = -{ -["key"] = "" -}, -ProtectedSettings = -{ -["key"] = "" -}, -ProvisionAfterExtensions = {""}, -}}, - OsDisk = new OSDisk - { - EphemeralOSDiskSettings = new DiffDiskSettings - { - Placement = DiffDiskPlacement.CacheDisk, - }, - Caching = CachingType.None, - DiskSizeGB = 1234, - ManagedDisk = new ManagedDisk(StorageAccountType.StandardLRS), - WriteAcceleratorEnabled = true, - }, - SecurityProfile = new SecurityProfile(true, SecurityTypes.TrustedLaunch, new UefiSettings - { - SecureBootEnabled = true, - VTpmEnabled = true, - }), - ServiceArtifactReference = new ServiceArtifactReference(""), - }, - TaskSlotsPerNode = 1234, - TaskSchedulingPolicy = new BatchTaskSchedulingPolicy(BatchNodeFillType.Spread), - ResizeTimeout = XmlConvert.ToTimeSpan("PT1H23M45S"), - ResourceTags = "", - TargetDedicatedNodes = 1234, - TargetLowPriorityNodes = 1234, - EnableAutoScale = true, - AutoScaleFormula = "", - AutoScaleEvaluationInterval = XmlConvert.ToTimeSpan("PT1H23M45S"), - EnableInterNodeCommunication = true, - NetworkConfiguration = new NetworkConfiguration - { - SubnetId = "", - DynamicVNetAssignmentScope = DynamicVNetAssignmentScope.None, - EndpointConfiguration = new BatchPoolEndpointConfiguration(new InboundNatPool[] - { -new InboundNatPool("", InboundEndpointProtocol.Tcp, 1234, 1234, 1234) -{ -NetworkSecurityGroupRules = {new NetworkSecurityGroupRule(1234, NetworkSecurityGroupRuleAccess.Allow, "") -{ -SourcePortRanges = {""}, -}}, -} - }), - PublicIpAddressConfiguration = new PublicIpAddressConfiguration - { - IpAddressProvisioningType = IpAddressProvisioningType.BatchManaged, - IpAddressIds = { "" }, - }, - EnableAcceleratedNetworking = true, - }, - StartTask = new BatchStartTask("") - { - ContainerSettings = new BatchTaskContainerSettings("") - { - ContainerRunOptions = "", - Registry = default, - WorkingDirectory = ContainerWorkingDirectory.TaskWorkingDirectory, - }, - ResourceFiles = {new ResourceFile -{ -AutoStorageContainerName = "", -StorageContainerUrl = "", -HttpUrl = "", -BlobPrefix = "", -FilePath = "", -FileMode = "", -IdentityReference = default, -}}, - EnvironmentSettings = {new EnvironmentSetting("") -{ -Value = "", -}}, - UserIdentity = new UserIdentity - { - Username = "", - AutoUser = new AutoUserSpecification - { - Scope = AutoUserScope.Task, - ElevationLevel = ElevationLevel.NonAdmin, - }, - }, - MaxTaskRetryCount = 1234, - WaitForSuccess = true, - }, - ApplicationPackageReferences = {new BatchApplicationPackageReference("") -{ -Version = "", -}}, - UserAccounts = {new UserAccount("", "") -{ -ElevationLevel = ElevationLevel.NonAdmin, -LinuxUserConfiguration = new LinuxUserConfiguration -{ -Uid = 1234, -Gid = 1234, -SshPrivateKey = "", -}, -WindowsUserConfiguration = new WindowsUserConfiguration -{ -LoginMode = LoginMode.Batch, -}, -}}, - Metadata = { new MetadataItem("", "") }, - MountConfiguration = {new MountConfiguration -{ -AzureBlobFileSystemConfiguration = new AzureBlobFileSystemConfiguration("", "", "") -{ -AccountKey = "", -SasKey = "", -BlobfuseOptions = "", -IdentityReference = default, -}, -NfsMountConfiguration = new NfsMountConfiguration("", "") -{ -MountOptions = "", -}, -CifsMountConfiguration = new CifsMountConfiguration("", "", "", "") -{ -MountOptions = "", -}, -AzureFileShareConfiguration = new AzureFileShareConfiguration("", "", "", "") -{ -MountOptions = "", -}, -}}, - TargetNodeCommunicationMode = BatchNodeCommunicationMode.Default, - UpgradePolicy = new UpgradePolicy(UpgradeMode.Automatic) - { - AutomaticOsUpgradePolicy = new AutomaticOsUpgradePolicy - { - DisableAutomaticRollback = true, - EnableAutomaticOsUpgrade = true, - UseRollingUpgradePolicy = true, - OsRollingUpgradeDeferral = true, - }, - RollingUpgradePolicy = new RollingUpgradePolicy - { - EnableCrossZoneUpgrade = true, - MaxBatchInstancePercent = 1234, - MaxUnhealthyInstancePercent = 1234, - MaxUnhealthyUpgradedInstancePercent = 1234, - PauseTimeBetweenBatches = XmlConvert.ToTimeSpan("PT1H23M45S"), - PrioritizeUnhealthyInstances = true, - RollbackFailedInstancesOnPolicyBreach = true, - }, - }, - }, - }, - }) - { - Priority = 1234, - AllowTaskPreemption = true, - MaxParallelTasks = 1234, - Constraints = new BatchJobConstraints - { - MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - MaxTaskRetryCount = 1234, - }, - OnAllTasksComplete = OnAllBatchTasksComplete.NoAction, - Metadata = { default }, - }; - Response response = client.ReplaceJob("", job, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_ReplaceJob_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - BatchJob job = new BatchJob(new BatchPoolInfo - { - PoolId = "", - AutoPoolSpecification = new BatchAutoPoolSpecification(BatchPoolLifetimeOption.JobSchedule) - { - AutoPoolIdPrefix = "", - KeepAlive = true, - Pool = new BatchPoolSpecification("") - { - DisplayName = "", - VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference - { - Publisher = "", - Offer = "", - Sku = "", - Version = "", - VirtualMachineImageId = "", - }, "") - { - WindowsConfiguration = new WindowsConfiguration - { - EnableAutomaticUpdates = true, - }, - DataDisks = {new DataDisk(1234, 1234) -{ -Caching = CachingType.None, -StorageAccountType = StorageAccountType.StandardLRS, -}}, - LicenseType = "", - ContainerConfiguration = new ContainerConfiguration(ContainerType.DockerCompatible) - { - ContainerImageNames = { "" }, - ContainerRegistries = {new ContainerRegistryReference -{ -Username = "", -Password = "", -RegistryServer = "", -IdentityReference = new BatchNodeIdentityReference -{ -ResourceId = "", -}, -}}, - }, - DiskEncryptionConfiguration = new DiskEncryptionConfiguration - { - Targets = { DiskEncryptionTarget.OsDisk }, - }, - NodePlacementConfiguration = new BatchNodePlacementConfiguration - { - Policy = BatchNodePlacementPolicyType.Regional, - }, - Extensions = {new VMExtension("", "", "") -{ -TypeHandlerVersion = "", -AutoUpgradeMinorVersion = true, -EnableAutomaticUpgrade = true, -Settings = -{ -["key"] = "" -}, -ProtectedSettings = -{ -["key"] = "" -}, -ProvisionAfterExtensions = {""}, -}}, - OsDisk = new OSDisk - { - EphemeralOSDiskSettings = new DiffDiskSettings - { - Placement = DiffDiskPlacement.CacheDisk, - }, - Caching = CachingType.None, - DiskSizeGB = 1234, - ManagedDisk = new ManagedDisk(StorageAccountType.StandardLRS), - WriteAcceleratorEnabled = true, - }, - SecurityProfile = new SecurityProfile(true, SecurityTypes.TrustedLaunch, new UefiSettings - { - SecureBootEnabled = true, - VTpmEnabled = true, - }), - ServiceArtifactReference = new ServiceArtifactReference(""), - }, - TaskSlotsPerNode = 1234, - TaskSchedulingPolicy = new BatchTaskSchedulingPolicy(BatchNodeFillType.Spread), - ResizeTimeout = XmlConvert.ToTimeSpan("PT1H23M45S"), - ResourceTags = "", - TargetDedicatedNodes = 1234, - TargetLowPriorityNodes = 1234, - EnableAutoScale = true, - AutoScaleFormula = "", - AutoScaleEvaluationInterval = XmlConvert.ToTimeSpan("PT1H23M45S"), - EnableInterNodeCommunication = true, - NetworkConfiguration = new NetworkConfiguration - { - SubnetId = "", - DynamicVNetAssignmentScope = DynamicVNetAssignmentScope.None, - EndpointConfiguration = new BatchPoolEndpointConfiguration(new InboundNatPool[] - { -new InboundNatPool("", InboundEndpointProtocol.Tcp, 1234, 1234, 1234) -{ -NetworkSecurityGroupRules = {new NetworkSecurityGroupRule(1234, NetworkSecurityGroupRuleAccess.Allow, "") -{ -SourcePortRanges = {""}, -}}, -} - }), - PublicIpAddressConfiguration = new PublicIpAddressConfiguration - { - IpAddressProvisioningType = IpAddressProvisioningType.BatchManaged, - IpAddressIds = { "" }, - }, - EnableAcceleratedNetworking = true, - }, - StartTask = new BatchStartTask("") - { - ContainerSettings = new BatchTaskContainerSettings("") - { - ContainerRunOptions = "", - Registry = default, - WorkingDirectory = ContainerWorkingDirectory.TaskWorkingDirectory, - }, - ResourceFiles = {new ResourceFile -{ -AutoStorageContainerName = "", -StorageContainerUrl = "", -HttpUrl = "", -BlobPrefix = "", -FilePath = "", -FileMode = "", -IdentityReference = default, -}}, - EnvironmentSettings = {new EnvironmentSetting("") -{ -Value = "", -}}, - UserIdentity = new UserIdentity - { - Username = "", - AutoUser = new AutoUserSpecification - { - Scope = AutoUserScope.Task, - ElevationLevel = ElevationLevel.NonAdmin, - }, - }, - MaxTaskRetryCount = 1234, - WaitForSuccess = true, - }, - ApplicationPackageReferences = {new BatchApplicationPackageReference("") -{ -Version = "", -}}, - UserAccounts = {new UserAccount("", "") -{ -ElevationLevel = ElevationLevel.NonAdmin, -LinuxUserConfiguration = new LinuxUserConfiguration -{ -Uid = 1234, -Gid = 1234, -SshPrivateKey = "", -}, -WindowsUserConfiguration = new WindowsUserConfiguration -{ -LoginMode = LoginMode.Batch, -}, -}}, - Metadata = { new MetadataItem("", "") }, - MountConfiguration = {new MountConfiguration -{ -AzureBlobFileSystemConfiguration = new AzureBlobFileSystemConfiguration("", "", "") -{ -AccountKey = "", -SasKey = "", -BlobfuseOptions = "", -IdentityReference = default, -}, -NfsMountConfiguration = new NfsMountConfiguration("", "") -{ -MountOptions = "", -}, -CifsMountConfiguration = new CifsMountConfiguration("", "", "", "") -{ -MountOptions = "", -}, -AzureFileShareConfiguration = new AzureFileShareConfiguration("", "", "", "") -{ -MountOptions = "", -}, -}}, - TargetNodeCommunicationMode = BatchNodeCommunicationMode.Default, - UpgradePolicy = new UpgradePolicy(UpgradeMode.Automatic) - { - AutomaticOsUpgradePolicy = new AutomaticOsUpgradePolicy - { - DisableAutomaticRollback = true, - EnableAutomaticOsUpgrade = true, - UseRollingUpgradePolicy = true, - OsRollingUpgradeDeferral = true, - }, - RollingUpgradePolicy = new RollingUpgradePolicy - { - EnableCrossZoneUpgrade = true, - MaxBatchInstancePercent = 1234, - MaxUnhealthyInstancePercent = 1234, - MaxUnhealthyUpgradedInstancePercent = 1234, - PauseTimeBetweenBatches = XmlConvert.ToTimeSpan("PT1H23M45S"), - PrioritizeUnhealthyInstances = true, - RollbackFailedInstancesOnPolicyBreach = true, - }, - }, - }, - }, - }) - { - Priority = 1234, - AllowTaskPreemption = true, - MaxParallelTasks = 1234, - Constraints = new BatchJobConstraints - { - MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - MaxTaskRetryCount = 1234, - }, - OnAllTasksComplete = OnAllBatchTasksComplete.NoAction, - Metadata = { default }, - }; - Response response = await client.ReplaceJobAsync("", job, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_DisableJob_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - disableTasks = "requeue", - }); - Response response = client.DisableJob("", content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_DisableJob_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - disableTasks = "requeue", - }); - Response response = await client.DisableJobAsync("", content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_DisableJob_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - BatchJobDisableContent content = new BatchJobDisableContent(DisableBatchJobOption.Requeue); - Response response = client.DisableJob("", content); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_DisableJob_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - BatchJobDisableContent content = new BatchJobDisableContent(DisableBatchJobOption.Requeue); - Response response = await client.DisableJobAsync("", content); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_DisableJob_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - disableTasks = "requeue", - }); - Response response = client.DisableJob("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_DisableJob_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - disableTasks = "requeue", - }); - Response response = await client.DisableJobAsync("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_DisableJob_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - BatchJobDisableContent content = new BatchJobDisableContent(DisableBatchJobOption.Requeue); - Response response = client.DisableJob("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_DisableJob_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - BatchJobDisableContent content = new BatchJobDisableContent(DisableBatchJobOption.Requeue); - Response response = await client.DisableJobAsync("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_EnableJob_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - Response response = client.EnableJob(""); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_EnableJob_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - Response response = await client.EnableJobAsync(""); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_EnableJob_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - Response response = client.EnableJob("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_EnableJob_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - Response response = await client.EnableJobAsync("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_TerminateJob_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - using RequestContent content = null; - Response response = client.TerminateJob("", content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_TerminateJob_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - using RequestContent content = null; - Response response = await client.TerminateJobAsync("", content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_TerminateJob_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - Response response = client.TerminateJob(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_TerminateJob_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - Response response = await client.TerminateJobAsync(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_TerminateJob_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - terminateReason = "", - }); - Response response = client.TerminateJob("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_TerminateJob_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - terminateReason = "", - }); - Response response = await client.TerminateJobAsync("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_TerminateJob_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - BatchJobTerminateContent parameters = new BatchJobTerminateContent - { - TerminationReason = "", - }; - Response response = client.TerminateJob("", parameters: parameters, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_TerminateJob_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - BatchJobTerminateContent parameters = new BatchJobTerminateContent - { - TerminationReason = "", - }; - Response response = await client.TerminateJobAsync("", parameters: parameters, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_CreateJob_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - id = "", - poolInfo = new object(), - }); - Response response = client.CreateJob(content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_CreateJob_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - id = "", - poolInfo = new object(), - }); - Response response = await client.CreateJobAsync(content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_CreateJob_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - BatchJobCreateContent job = new BatchJobCreateContent("", new BatchPoolInfo()); - Response response = client.CreateJob(job); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_CreateJob_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - BatchJobCreateContent job = new BatchJobCreateContent("", new BatchPoolInfo()); - Response response = await client.CreateJobAsync(job); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_CreateJob_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - id = "", - displayName = "", - usesTaskDependencies = true, - priority = 1234, - allowTaskPreemption = true, - maxParallelTasks = 1234, - constraints = new - { - maxWallClockTime = "PT1H23M45S", - maxTaskRetryCount = 1234, - }, - jobManagerTask = new - { - id = "", - displayName = "", - commandLine = "", - containerSettings = new - { - containerRunOptions = "", - imageName = "", - registry = new - { - username = "", - password = "", - registryServer = "", - identityReference = new - { - resourceId = "", - }, - }, - workingDirectory = "taskWorkingDirectory", - }, - resourceFiles = new object[] - { -new -{ -autoStorageContainerName = "", -storageContainerUrl = "", -httpUrl = "", -blobPrefix = "", -filePath = "", -fileMode = "", -} - }, - outputFiles = new object[] - { -new -{ -filePattern = "", -destination = new -{ -container = new -{ -path = "", -containerUrl = "", -uploadHeaders = new object[] -{ -new -{ -name = "", -value = "", -} -}, -}, -}, -uploadOptions = new -{ -uploadCondition = "tasksuccess", -}, -} - }, - environmentSettings = new object[] - { -new -{ -name = "", -value = "", -} - }, - constraints = new - { - maxWallClockTime = "PT1H23M45S", - retentionTime = "PT1H23M45S", - maxTaskRetryCount = 1234, - }, - requiredSlots = 1234, - killJobOnCompletion = true, - userIdentity = new - { - username = "", - autoUser = new - { - scope = "task", - elevationLevel = "nonadmin", - }, - }, - runExclusive = true, - applicationPackageReferences = new object[] - { -new -{ -applicationId = "", -version = "", -} - }, - authenticationTokenSettings = new - { - access = new object[] - { -"job" - }, - }, - allowLowPriorityNode = true, - }, - jobPreparationTask = new - { - id = "", - commandLine = "", - resourceFiles = new object[] - { -null - }, - environmentSettings = new object[] - { -null - }, - waitForSuccess = true, - rerunOnNodeRebootAfterSuccess = true, - }, - jobReleaseTask = new - { - id = "", - commandLine = "", - resourceFiles = new object[] - { -null - }, - environmentSettings = new object[] - { -null - }, - maxWallClockTime = "PT1H23M45S", - retentionTime = "PT1H23M45S", - }, - commonEnvironmentSettings = new object[] - { -null - }, - poolInfo = new - { - poolId = "", - autoPoolSpecification = new - { - autoPoolIdPrefix = "", - poolLifetimeOption = "jobschedule", - keepAlive = true, - pool = new - { - displayName = "", - vmSize = "", - virtualMachineConfiguration = new - { - imageReference = new - { - publisher = "", - offer = "", - sku = "", - version = "", - virtualMachineImageId = "", - }, - nodeAgentSKUId = "", - windowsConfiguration = new - { - enableAutomaticUpdates = true, - }, - dataDisks = new object[] - { -new -{ -lun = 1234, -caching = "none", -diskSizeGB = 1234, -storageAccountType = "standard_lrs", -} - }, - licenseType = "", - containerConfiguration = new - { - type = "dockerCompatible", - containerImageNames = new object[] - { -"" - }, - containerRegistries = new object[] - { -null - }, - }, - diskEncryptionConfiguration = new - { - targets = new object[] - { -"osdisk" - }, - }, - nodePlacementConfiguration = new - { - policy = "regional", - }, - extensions = new object[] - { -new -{ -name = "", -publisher = "", -type = "", -typeHandlerVersion = "", -autoUpgradeMinorVersion = true, -enableAutomaticUpgrade = true, -settings = new -{ -key = "", -}, -protectedSettings = new -{ -key = "", -}, -provisionAfterExtensions = new object[] -{ -"" -}, -} - }, - osDisk = new - { - ephemeralOSDiskSettings = new - { - placement = "cachedisk", - }, - caching = "none", - diskSizeGB = 1234, - managedDisk = new - { - storageAccountType = "standard_lrs", - }, - writeAcceleratorEnabled = true, - }, - securityProfile = new - { - encryptionAtHost = true, - securityType = "trustedLaunch", - uefiSettings = new - { - secureBootEnabled = true, - vTpmEnabled = true, - }, - }, - serviceArtifactReference = new - { - id = "", - }, - }, - taskSlotsPerNode = 1234, - taskSchedulingPolicy = new - { - nodeFillType = "spread", - }, - resizeTimeout = "PT1H23M45S", - resourceTags = "", - targetDedicatedNodes = 1234, - targetLowPriorityNodes = 1234, - enableAutoScale = true, - autoScaleFormula = "", - autoScaleEvaluationInterval = "PT1H23M45S", - enableInterNodeCommunication = true, - networkConfiguration = new - { - subnetId = "", - dynamicVNetAssignmentScope = "none", - endpointConfiguration = new - { - inboundNATPools = new object[] - { -new -{ -name = "", -protocol = "tcp", -backendPort = 1234, -frontendPortRangeStart = 1234, -frontendPortRangeEnd = 1234, -networkSecurityGroupRules = new object[] -{ -new -{ -priority = 1234, -access = "allow", -sourceAddressPrefix = "", -sourcePortRanges = new object[] -{ -"" -}, -} -}, -} - }, - }, - publicIPAddressConfiguration = new - { - provision = "batchmanaged", - ipAddressIds = new object[] - { -"" - }, - }, - enableAcceleratedNetworking = true, - }, - startTask = new - { - commandLine = "", - resourceFiles = new object[] - { -null - }, - environmentSettings = new object[] - { -null - }, - maxTaskRetryCount = 1234, - waitForSuccess = true, - }, - applicationPackageReferences = new object[] - { -null - }, - userAccounts = new object[] - { -new -{ -name = "", -password = "", -elevationLevel = "nonadmin", -linuxUserConfiguration = new -{ -uid = 1234, -gid = 1234, -sshPrivateKey = "", -}, -windowsUserConfiguration = new -{ -loginMode = "batch", -}, -} - }, - metadata = new object[] - { -new -{ -name = "", -value = "", -} - }, - mountConfiguration = new object[] - { -new -{ -azureBlobFileSystemConfiguration = new -{ -accountName = "", -containerName = "", -accountKey = "", -sasKey = "", -blobfuseOptions = "", -relativeMountPath = "", -}, -nfsMountConfiguration = new -{ -source = "", -relativeMountPath = "", -mountOptions = "", -}, -cifsMountConfiguration = new -{ -username = "", -source = "", -relativeMountPath = "", -mountOptions = "", -password = "", -}, -azureFileShareConfiguration = new -{ -accountName = "", -azureFileUrl = "", -accountKey = "", -relativeMountPath = "", -mountOptions = "", -}, -} - }, - targetNodeCommunicationMode = "default", - upgradePolicy = new - { - mode = "automatic", - automaticOSUpgradePolicy = new - { - disableAutomaticRollback = true, - enableAutomaticOSUpgrade = true, - useRollingUpgradePolicy = true, - osRollingUpgradeDeferral = true, - }, - rollingUpgradePolicy = new - { - enableCrossZoneUpgrade = true, - maxBatchInstancePercent = 1234, - maxUnhealthyInstancePercent = 1234, - maxUnhealthyUpgradedInstancePercent = 1234, - pauseTimeBetweenBatches = "PT1H23M45S", - prioritizeUnhealthyInstances = true, - rollbackFailedInstancesOnPolicyBreach = true, - }, - }, - }, - }, - }, - onAllTasksComplete = "noaction", - onTaskFailure = "noaction", - networkConfiguration = new - { - subnetId = "", - }, - metadata = new object[] - { -null - }, - }); - Response response = client.CreateJob(content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_CreateJob_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - id = "", - displayName = "", - usesTaskDependencies = true, - priority = 1234, - allowTaskPreemption = true, - maxParallelTasks = 1234, - constraints = new - { - maxWallClockTime = "PT1H23M45S", - maxTaskRetryCount = 1234, - }, - jobManagerTask = new - { - id = "", - displayName = "", - commandLine = "", - containerSettings = new - { - containerRunOptions = "", - imageName = "", - registry = new - { - username = "", - password = "", - registryServer = "", - identityReference = new - { - resourceId = "", - }, - }, - workingDirectory = "taskWorkingDirectory", - }, - resourceFiles = new object[] - { -new -{ -autoStorageContainerName = "", -storageContainerUrl = "", -httpUrl = "", -blobPrefix = "", -filePath = "", -fileMode = "", -} - }, - outputFiles = new object[] - { -new -{ -filePattern = "", -destination = new -{ -container = new -{ -path = "", -containerUrl = "", -uploadHeaders = new object[] -{ -new -{ -name = "", -value = "", -} -}, -}, -}, -uploadOptions = new -{ -uploadCondition = "tasksuccess", -}, -} - }, - environmentSettings = new object[] - { -new -{ -name = "", -value = "", -} - }, - constraints = new - { - maxWallClockTime = "PT1H23M45S", - retentionTime = "PT1H23M45S", - maxTaskRetryCount = 1234, - }, - requiredSlots = 1234, - killJobOnCompletion = true, - userIdentity = new - { - username = "", - autoUser = new - { - scope = "task", - elevationLevel = "nonadmin", - }, - }, - runExclusive = true, - applicationPackageReferences = new object[] - { -new -{ -applicationId = "", -version = "", -} - }, - authenticationTokenSettings = new - { - access = new object[] - { -"job" - }, - }, - allowLowPriorityNode = true, - }, - jobPreparationTask = new - { - id = "", - commandLine = "", - resourceFiles = new object[] - { -null - }, - environmentSettings = new object[] - { -null - }, - waitForSuccess = true, - rerunOnNodeRebootAfterSuccess = true, - }, - jobReleaseTask = new - { - id = "", - commandLine = "", - resourceFiles = new object[] - { -null - }, - environmentSettings = new object[] - { -null - }, - maxWallClockTime = "PT1H23M45S", - retentionTime = "PT1H23M45S", - }, - commonEnvironmentSettings = new object[] - { -null - }, - poolInfo = new - { - poolId = "", - autoPoolSpecification = new - { - autoPoolIdPrefix = "", - poolLifetimeOption = "jobschedule", - keepAlive = true, - pool = new - { - displayName = "", - vmSize = "", - virtualMachineConfiguration = new - { - imageReference = new - { - publisher = "", - offer = "", - sku = "", - version = "", - virtualMachineImageId = "", - }, - nodeAgentSKUId = "", - windowsConfiguration = new - { - enableAutomaticUpdates = true, - }, - dataDisks = new object[] - { -new -{ -lun = 1234, -caching = "none", -diskSizeGB = 1234, -storageAccountType = "standard_lrs", -} - }, - licenseType = "", - containerConfiguration = new - { - type = "dockerCompatible", - containerImageNames = new object[] - { -"" - }, - containerRegistries = new object[] - { -null - }, - }, - diskEncryptionConfiguration = new - { - targets = new object[] - { -"osdisk" - }, - }, - nodePlacementConfiguration = new - { - policy = "regional", - }, - extensions = new object[] - { -new -{ -name = "", -publisher = "", -type = "", -typeHandlerVersion = "", -autoUpgradeMinorVersion = true, -enableAutomaticUpgrade = true, -settings = new -{ -key = "", -}, -protectedSettings = new -{ -key = "", -}, -provisionAfterExtensions = new object[] -{ -"" -}, -} - }, - osDisk = new - { - ephemeralOSDiskSettings = new - { - placement = "cachedisk", - }, - caching = "none", - diskSizeGB = 1234, - managedDisk = new - { - storageAccountType = "standard_lrs", - }, - writeAcceleratorEnabled = true, - }, - securityProfile = new - { - encryptionAtHost = true, - securityType = "trustedLaunch", - uefiSettings = new - { - secureBootEnabled = true, - vTpmEnabled = true, - }, - }, - serviceArtifactReference = new - { - id = "", - }, - }, - taskSlotsPerNode = 1234, - taskSchedulingPolicy = new - { - nodeFillType = "spread", - }, - resizeTimeout = "PT1H23M45S", - resourceTags = "", - targetDedicatedNodes = 1234, - targetLowPriorityNodes = 1234, - enableAutoScale = true, - autoScaleFormula = "", - autoScaleEvaluationInterval = "PT1H23M45S", - enableInterNodeCommunication = true, - networkConfiguration = new - { - subnetId = "", - dynamicVNetAssignmentScope = "none", - endpointConfiguration = new - { - inboundNATPools = new object[] - { -new -{ -name = "", -protocol = "tcp", -backendPort = 1234, -frontendPortRangeStart = 1234, -frontendPortRangeEnd = 1234, -networkSecurityGroupRules = new object[] -{ -new -{ -priority = 1234, -access = "allow", -sourceAddressPrefix = "", -sourcePortRanges = new object[] -{ -"" -}, -} -}, -} - }, - }, - publicIPAddressConfiguration = new - { - provision = "batchmanaged", - ipAddressIds = new object[] - { -"" - }, - }, - enableAcceleratedNetworking = true, - }, - startTask = new - { - commandLine = "", - resourceFiles = new object[] - { -null - }, - environmentSettings = new object[] - { -null - }, - maxTaskRetryCount = 1234, - waitForSuccess = true, - }, - applicationPackageReferences = new object[] - { -null - }, - userAccounts = new object[] - { -new -{ -name = "", -password = "", -elevationLevel = "nonadmin", -linuxUserConfiguration = new -{ -uid = 1234, -gid = 1234, -sshPrivateKey = "", -}, -windowsUserConfiguration = new -{ -loginMode = "batch", -}, -} - }, - metadata = new object[] - { -new -{ -name = "", -value = "", -} - }, - mountConfiguration = new object[] - { -new -{ -azureBlobFileSystemConfiguration = new -{ -accountName = "", -containerName = "", -accountKey = "", -sasKey = "", -blobfuseOptions = "", -relativeMountPath = "", -}, -nfsMountConfiguration = new -{ -source = "", -relativeMountPath = "", -mountOptions = "", -}, -cifsMountConfiguration = new -{ -username = "", -source = "", -relativeMountPath = "", -mountOptions = "", -password = "", -}, -azureFileShareConfiguration = new -{ -accountName = "", -azureFileUrl = "", -accountKey = "", -relativeMountPath = "", -mountOptions = "", -}, -} - }, - targetNodeCommunicationMode = "default", - upgradePolicy = new - { - mode = "automatic", - automaticOSUpgradePolicy = new - { - disableAutomaticRollback = true, - enableAutomaticOSUpgrade = true, - useRollingUpgradePolicy = true, - osRollingUpgradeDeferral = true, - }, - rollingUpgradePolicy = new - { - enableCrossZoneUpgrade = true, - maxBatchInstancePercent = 1234, - maxUnhealthyInstancePercent = 1234, - maxUnhealthyUpgradedInstancePercent = 1234, - pauseTimeBetweenBatches = "PT1H23M45S", - prioritizeUnhealthyInstances = true, - rollbackFailedInstancesOnPolicyBreach = true, - }, - }, - }, - }, - }, - onAllTasksComplete = "noaction", - onTaskFailure = "noaction", - networkConfiguration = new - { - subnetId = "", - }, - metadata = new object[] - { -null - }, - }); - Response response = await client.CreateJobAsync(content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_CreateJob_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - BatchJobCreateContent job = new BatchJobCreateContent("", new BatchPoolInfo - { - PoolId = "", - AutoPoolSpecification = new BatchAutoPoolSpecification(BatchPoolLifetimeOption.JobSchedule) - { - AutoPoolIdPrefix = "", - KeepAlive = true, - Pool = new BatchPoolSpecification("") - { - DisplayName = "", - VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference - { - Publisher = "", - Offer = "", - Sku = "", - Version = "", - VirtualMachineImageId = "", - }, "") - { - WindowsConfiguration = new WindowsConfiguration - { - EnableAutomaticUpdates = true, - }, - DataDisks = {new DataDisk(1234, 1234) -{ -Caching = CachingType.None, -StorageAccountType = StorageAccountType.StandardLRS, -}}, - LicenseType = "", - ContainerConfiguration = new ContainerConfiguration(ContainerType.DockerCompatible) - { - ContainerImageNames = { "" }, - ContainerRegistries = { default }, - }, - DiskEncryptionConfiguration = new DiskEncryptionConfiguration - { - Targets = { DiskEncryptionTarget.OsDisk }, - }, - NodePlacementConfiguration = new BatchNodePlacementConfiguration - { - Policy = BatchNodePlacementPolicyType.Regional, - }, - Extensions = {new VMExtension("", "", "") -{ -TypeHandlerVersion = "", -AutoUpgradeMinorVersion = true, -EnableAutomaticUpgrade = true, -Settings = -{ -["key"] = "" -}, -ProtectedSettings = -{ -["key"] = "" -}, -ProvisionAfterExtensions = {""}, -}}, - OsDisk = new OSDisk - { - EphemeralOSDiskSettings = new DiffDiskSettings - { - Placement = DiffDiskPlacement.CacheDisk, - }, - Caching = CachingType.None, - DiskSizeGB = 1234, - ManagedDisk = new ManagedDisk(StorageAccountType.StandardLRS), - WriteAcceleratorEnabled = true, - }, - SecurityProfile = new SecurityProfile(true, SecurityTypes.TrustedLaunch, new UefiSettings - { - SecureBootEnabled = true, - VTpmEnabled = true, - }), - ServiceArtifactReference = new ServiceArtifactReference(""), - }, - TaskSlotsPerNode = 1234, - TaskSchedulingPolicy = new BatchTaskSchedulingPolicy(BatchNodeFillType.Spread), - ResizeTimeout = XmlConvert.ToTimeSpan("PT1H23M45S"), - ResourceTags = "", - TargetDedicatedNodes = 1234, - TargetLowPriorityNodes = 1234, - EnableAutoScale = true, - AutoScaleFormula = "", - AutoScaleEvaluationInterval = XmlConvert.ToTimeSpan("PT1H23M45S"), - EnableInterNodeCommunication = true, - NetworkConfiguration = new NetworkConfiguration - { - SubnetId = "", - DynamicVNetAssignmentScope = DynamicVNetAssignmentScope.None, - EndpointConfiguration = new BatchPoolEndpointConfiguration(new InboundNatPool[] - { -new InboundNatPool("", InboundEndpointProtocol.Tcp, 1234, 1234, 1234) -{ -NetworkSecurityGroupRules = {new NetworkSecurityGroupRule(1234, NetworkSecurityGroupRuleAccess.Allow, "") -{ -SourcePortRanges = {""}, -}}, -} - }), - PublicIpAddressConfiguration = new PublicIpAddressConfiguration - { - IpAddressProvisioningType = IpAddressProvisioningType.BatchManaged, - IpAddressIds = { "" }, - }, - EnableAcceleratedNetworking = true, - }, - StartTask = new BatchStartTask("") - { - ContainerSettings = default, - ResourceFiles = { default }, - EnvironmentSettings = { default }, - UserIdentity = default, - MaxTaskRetryCount = 1234, - WaitForSuccess = true, - }, - ApplicationPackageReferences = { default }, - UserAccounts = {new UserAccount("", "") -{ -ElevationLevel = ElevationLevel.NonAdmin, -LinuxUserConfiguration = new LinuxUserConfiguration -{ -Uid = 1234, -Gid = 1234, -SshPrivateKey = "", -}, -WindowsUserConfiguration = new WindowsUserConfiguration -{ -LoginMode = LoginMode.Batch, -}, -}}, - Metadata = { new MetadataItem("", "") }, - MountConfiguration = {new MountConfiguration -{ -AzureBlobFileSystemConfiguration = new AzureBlobFileSystemConfiguration("", "", "") -{ -AccountKey = "", -SasKey = "", -BlobfuseOptions = "", -IdentityReference = default, -}, -NfsMountConfiguration = new NfsMountConfiguration("", "") -{ -MountOptions = "", -}, -CifsMountConfiguration = new CifsMountConfiguration("", "", "", "") -{ -MountOptions = "", -}, -AzureFileShareConfiguration = new AzureFileShareConfiguration("", "", "", "") -{ -MountOptions = "", -}, -}}, - TargetNodeCommunicationMode = BatchNodeCommunicationMode.Default, - UpgradePolicy = new UpgradePolicy(UpgradeMode.Automatic) - { - AutomaticOsUpgradePolicy = new AutomaticOsUpgradePolicy - { - DisableAutomaticRollback = true, - EnableAutomaticOsUpgrade = true, - UseRollingUpgradePolicy = true, - OsRollingUpgradeDeferral = true, - }, - RollingUpgradePolicy = new RollingUpgradePolicy - { - EnableCrossZoneUpgrade = true, - MaxBatchInstancePercent = 1234, - MaxUnhealthyInstancePercent = 1234, - MaxUnhealthyUpgradedInstancePercent = 1234, - PauseTimeBetweenBatches = XmlConvert.ToTimeSpan("PT1H23M45S"), - PrioritizeUnhealthyInstances = true, - RollbackFailedInstancesOnPolicyBreach = true, - }, - }, - }, - }, - }) - { - DisplayName = "", - UsesTaskDependencies = true, - Priority = 1234, - AllowTaskPreemption = true, - MaxParallelTasks = 1234, - Constraints = new BatchJobConstraints - { - MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - MaxTaskRetryCount = 1234, - }, - JobManagerTask = new BatchJobManagerTask("", "") - { - DisplayName = "", - ContainerSettings = new BatchTaskContainerSettings("") - { - ContainerRunOptions = "", - Registry = new ContainerRegistryReference - { - Username = "", - Password = "", - RegistryServer = "", - IdentityReference = new BatchNodeIdentityReference - { - ResourceId = "", - }, - }, - WorkingDirectory = ContainerWorkingDirectory.TaskWorkingDirectory, - }, - ResourceFiles = {new ResourceFile -{ -AutoStorageContainerName = "", -StorageContainerUrl = "", -HttpUrl = "", -BlobPrefix = "", -FilePath = "", -FileMode = "", -IdentityReference = default, -}}, - OutputFiles = {new OutputFile("", new OutputFileDestination -{ -Container = new OutputFileBlobContainerDestination("") -{ -Path = "", -IdentityReference = default, -UploadHeaders = {new HttpHeader("") -{ -Value = "", -}}, -}, -}, new OutputFileUploadConfig(OutputFileUploadCondition.TaskSuccess))}, - EnvironmentSettings = {new EnvironmentSetting("") -{ -Value = "", -}}, - Constraints = new BatchTaskConstraints - { - MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - RetentionTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - MaxTaskRetryCount = 1234, - }, - RequiredSlots = 1234, - KillJobOnCompletion = true, - UserIdentity = new UserIdentity - { - Username = "", - AutoUser = new AutoUserSpecification - { - Scope = AutoUserScope.Task, - ElevationLevel = ElevationLevel.NonAdmin, - }, - }, - RunExclusive = true, - ApplicationPackageReferences = {new BatchApplicationPackageReference("") -{ -Version = "", -}}, - AuthenticationTokenSettings = new AuthenticationTokenSettings - { - Access = { AccessScope.Job }, - }, - AllowLowPriorityNode = true, - }, - JobPreparationTask = new BatchJobPreparationTask("") - { - Id = "", - ContainerSettings = default, - ResourceFiles = { default }, - EnvironmentSettings = { default }, - Constraints = default, - WaitForSuccess = true, - UserIdentity = default, - RerunOnNodeRebootAfterSuccess = true, - }, - JobReleaseTask = new BatchJobReleaseTask("") - { - Id = "", - ContainerSettings = default, - ResourceFiles = { default }, - EnvironmentSettings = { default }, - MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - RetentionTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - UserIdentity = default, - }, - CommonEnvironmentSettings = { default }, - OnAllTasksComplete = OnAllBatchTasksComplete.NoAction, - OnTaskFailure = OnBatchTaskFailure.NoAction, - NetworkConfiguration = new BatchJobNetworkConfiguration(""), - Metadata = { default }, - }; - Response response = client.CreateJob(job, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_CreateJob_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - BatchJobCreateContent job = new BatchJobCreateContent("", new BatchPoolInfo - { - PoolId = "", - AutoPoolSpecification = new BatchAutoPoolSpecification(BatchPoolLifetimeOption.JobSchedule) - { - AutoPoolIdPrefix = "", - KeepAlive = true, - Pool = new BatchPoolSpecification("") - { - DisplayName = "", - VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference - { - Publisher = "", - Offer = "", - Sku = "", - Version = "", - VirtualMachineImageId = "", - }, "") - { - WindowsConfiguration = new WindowsConfiguration - { - EnableAutomaticUpdates = true, - }, - DataDisks = {new DataDisk(1234, 1234) -{ -Caching = CachingType.None, -StorageAccountType = StorageAccountType.StandardLRS, -}}, - LicenseType = "", - ContainerConfiguration = new ContainerConfiguration(ContainerType.DockerCompatible) - { - ContainerImageNames = { "" }, - ContainerRegistries = { default }, - }, - DiskEncryptionConfiguration = new DiskEncryptionConfiguration - { - Targets = { DiskEncryptionTarget.OsDisk }, - }, - NodePlacementConfiguration = new BatchNodePlacementConfiguration - { - Policy = BatchNodePlacementPolicyType.Regional, - }, - Extensions = {new VMExtension("", "", "") -{ -TypeHandlerVersion = "", -AutoUpgradeMinorVersion = true, -EnableAutomaticUpgrade = true, -Settings = -{ -["key"] = "" -}, -ProtectedSettings = -{ -["key"] = "" -}, -ProvisionAfterExtensions = {""}, -}}, - OsDisk = new OSDisk - { - EphemeralOSDiskSettings = new DiffDiskSettings - { - Placement = DiffDiskPlacement.CacheDisk, - }, - Caching = CachingType.None, - DiskSizeGB = 1234, - ManagedDisk = new ManagedDisk(StorageAccountType.StandardLRS), - WriteAcceleratorEnabled = true, - }, - SecurityProfile = new SecurityProfile(true, SecurityTypes.TrustedLaunch, new UefiSettings - { - SecureBootEnabled = true, - VTpmEnabled = true, - }), - ServiceArtifactReference = new ServiceArtifactReference(""), - }, - TaskSlotsPerNode = 1234, - TaskSchedulingPolicy = new BatchTaskSchedulingPolicy(BatchNodeFillType.Spread), - ResizeTimeout = XmlConvert.ToTimeSpan("PT1H23M45S"), - ResourceTags = "", - TargetDedicatedNodes = 1234, - TargetLowPriorityNodes = 1234, - EnableAutoScale = true, - AutoScaleFormula = "", - AutoScaleEvaluationInterval = XmlConvert.ToTimeSpan("PT1H23M45S"), - EnableInterNodeCommunication = true, - NetworkConfiguration = new NetworkConfiguration - { - SubnetId = "", - DynamicVNetAssignmentScope = DynamicVNetAssignmentScope.None, - EndpointConfiguration = new BatchPoolEndpointConfiguration(new InboundNatPool[] - { -new InboundNatPool("", InboundEndpointProtocol.Tcp, 1234, 1234, 1234) -{ -NetworkSecurityGroupRules = {new NetworkSecurityGroupRule(1234, NetworkSecurityGroupRuleAccess.Allow, "") -{ -SourcePortRanges = {""}, -}}, -} - }), - PublicIpAddressConfiguration = new PublicIpAddressConfiguration - { - IpAddressProvisioningType = IpAddressProvisioningType.BatchManaged, - IpAddressIds = { "" }, - }, - EnableAcceleratedNetworking = true, - }, - StartTask = new BatchStartTask("") - { - ContainerSettings = default, - ResourceFiles = { default }, - EnvironmentSettings = { default }, - UserIdentity = default, - MaxTaskRetryCount = 1234, - WaitForSuccess = true, - }, - ApplicationPackageReferences = { default }, - UserAccounts = {new UserAccount("", "") -{ -ElevationLevel = ElevationLevel.NonAdmin, -LinuxUserConfiguration = new LinuxUserConfiguration -{ -Uid = 1234, -Gid = 1234, -SshPrivateKey = "", -}, -WindowsUserConfiguration = new WindowsUserConfiguration -{ -LoginMode = LoginMode.Batch, -}, -}}, - Metadata = { new MetadataItem("", "") }, - MountConfiguration = {new MountConfiguration -{ -AzureBlobFileSystemConfiguration = new AzureBlobFileSystemConfiguration("", "", "") -{ -AccountKey = "", -SasKey = "", -BlobfuseOptions = "", -IdentityReference = default, -}, -NfsMountConfiguration = new NfsMountConfiguration("", "") -{ -MountOptions = "", -}, -CifsMountConfiguration = new CifsMountConfiguration("", "", "", "") -{ -MountOptions = "", -}, -AzureFileShareConfiguration = new AzureFileShareConfiguration("", "", "", "") -{ -MountOptions = "", -}, -}}, - TargetNodeCommunicationMode = BatchNodeCommunicationMode.Default, - UpgradePolicy = new UpgradePolicy(UpgradeMode.Automatic) - { - AutomaticOsUpgradePolicy = new AutomaticOsUpgradePolicy - { - DisableAutomaticRollback = true, - EnableAutomaticOsUpgrade = true, - UseRollingUpgradePolicy = true, - OsRollingUpgradeDeferral = true, - }, - RollingUpgradePolicy = new RollingUpgradePolicy - { - EnableCrossZoneUpgrade = true, - MaxBatchInstancePercent = 1234, - MaxUnhealthyInstancePercent = 1234, - MaxUnhealthyUpgradedInstancePercent = 1234, - PauseTimeBetweenBatches = XmlConvert.ToTimeSpan("PT1H23M45S"), - PrioritizeUnhealthyInstances = true, - RollbackFailedInstancesOnPolicyBreach = true, - }, - }, - }, - }, - }) - { - DisplayName = "", - UsesTaskDependencies = true, - Priority = 1234, - AllowTaskPreemption = true, - MaxParallelTasks = 1234, - Constraints = new BatchJobConstraints - { - MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - MaxTaskRetryCount = 1234, - }, - JobManagerTask = new BatchJobManagerTask("", "") - { - DisplayName = "", - ContainerSettings = new BatchTaskContainerSettings("") - { - ContainerRunOptions = "", - Registry = new ContainerRegistryReference - { - Username = "", - Password = "", - RegistryServer = "", - IdentityReference = new BatchNodeIdentityReference - { - ResourceId = "", - }, - }, - WorkingDirectory = ContainerWorkingDirectory.TaskWorkingDirectory, - }, - ResourceFiles = {new ResourceFile -{ -AutoStorageContainerName = "", -StorageContainerUrl = "", -HttpUrl = "", -BlobPrefix = "", -FilePath = "", -FileMode = "", -IdentityReference = default, -}}, - OutputFiles = {new OutputFile("", new OutputFileDestination -{ -Container = new OutputFileBlobContainerDestination("") -{ -Path = "", -IdentityReference = default, -UploadHeaders = {new HttpHeader("") -{ -Value = "", -}}, -}, -}, new OutputFileUploadConfig(OutputFileUploadCondition.TaskSuccess))}, - EnvironmentSettings = {new EnvironmentSetting("") -{ -Value = "", -}}, - Constraints = new BatchTaskConstraints - { - MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - RetentionTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - MaxTaskRetryCount = 1234, - }, - RequiredSlots = 1234, - KillJobOnCompletion = true, - UserIdentity = new UserIdentity - { - Username = "", - AutoUser = new AutoUserSpecification - { - Scope = AutoUserScope.Task, - ElevationLevel = ElevationLevel.NonAdmin, - }, - }, - RunExclusive = true, - ApplicationPackageReferences = {new BatchApplicationPackageReference("") -{ -Version = "", -}}, - AuthenticationTokenSettings = new AuthenticationTokenSettings - { - Access = { AccessScope.Job }, - }, - AllowLowPriorityNode = true, - }, - JobPreparationTask = new BatchJobPreparationTask("") - { - Id = "", - ContainerSettings = default, - ResourceFiles = { default }, - EnvironmentSettings = { default }, - Constraints = default, - WaitForSuccess = true, - UserIdentity = default, - RerunOnNodeRebootAfterSuccess = true, - }, - JobReleaseTask = new BatchJobReleaseTask("") - { - Id = "", - ContainerSettings = default, - ResourceFiles = { default }, - EnvironmentSettings = { default }, - MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - RetentionTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - UserIdentity = default, - }, - CommonEnvironmentSettings = { default }, - OnAllTasksComplete = OnAllBatchTasksComplete.NoAction, - OnTaskFailure = OnBatchTaskFailure.NoAction, - NetworkConfiguration = new BatchJobNetworkConfiguration(""), - Metadata = { default }, - }; - Response response = await client.CreateJobAsync(job, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetJobTaskCounts_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - Response response = client.GetJobTaskCounts("", null, null, null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("taskCounts").GetProperty("active").ToString()); - Console.WriteLine(result.GetProperty("taskCounts").GetProperty("running").ToString()); - Console.WriteLine(result.GetProperty("taskCounts").GetProperty("completed").ToString()); - Console.WriteLine(result.GetProperty("taskCounts").GetProperty("succeeded").ToString()); - Console.WriteLine(result.GetProperty("taskCounts").GetProperty("failed").ToString()); - Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("active").ToString()); - Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("running").ToString()); - Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("completed").ToString()); - Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("succeeded").ToString()); - Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("failed").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetJobTaskCounts_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - Response response = await client.GetJobTaskCountsAsync("", null, null, null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("taskCounts").GetProperty("active").ToString()); - Console.WriteLine(result.GetProperty("taskCounts").GetProperty("running").ToString()); - Console.WriteLine(result.GetProperty("taskCounts").GetProperty("completed").ToString()); - Console.WriteLine(result.GetProperty("taskCounts").GetProperty("succeeded").ToString()); - Console.WriteLine(result.GetProperty("taskCounts").GetProperty("failed").ToString()); - Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("active").ToString()); - Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("running").ToString()); - Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("completed").ToString()); - Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("succeeded").ToString()); - Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("failed").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetJobTaskCounts_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - Response response = client.GetJobTaskCounts(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetJobTaskCounts_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - Response response = await client.GetJobTaskCountsAsync(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetJobTaskCounts_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - Response response = client.GetJobTaskCounts("", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("taskCounts").GetProperty("active").ToString()); - Console.WriteLine(result.GetProperty("taskCounts").GetProperty("running").ToString()); - Console.WriteLine(result.GetProperty("taskCounts").GetProperty("completed").ToString()); - Console.WriteLine(result.GetProperty("taskCounts").GetProperty("succeeded").ToString()); - Console.WriteLine(result.GetProperty("taskCounts").GetProperty("failed").ToString()); - Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("active").ToString()); - Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("running").ToString()); - Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("completed").ToString()); - Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("succeeded").ToString()); - Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("failed").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetJobTaskCounts_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - Response response = await client.GetJobTaskCountsAsync("", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("taskCounts").GetProperty("active").ToString()); - Console.WriteLine(result.GetProperty("taskCounts").GetProperty("running").ToString()); - Console.WriteLine(result.GetProperty("taskCounts").GetProperty("completed").ToString()); - Console.WriteLine(result.GetProperty("taskCounts").GetProperty("succeeded").ToString()); - Console.WriteLine(result.GetProperty("taskCounts").GetProperty("failed").ToString()); - Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("active").ToString()); - Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("running").ToString()); - Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("completed").ToString()); - Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("succeeded").ToString()); - Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("failed").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetJobTaskCounts_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - Response response = client.GetJobTaskCounts("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetJobTaskCounts_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - Response response = await client.GetJobTaskCountsAsync("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_DeleteJobSchedule_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - Response response = client.DeleteJobSchedule(""); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_DeleteJobSchedule_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - Response response = await client.DeleteJobScheduleAsync(""); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_DeleteJobSchedule_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - Response response = client.DeleteJobSchedule("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_DeleteJobSchedule_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - Response response = await client.DeleteJobScheduleAsync("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetJobSchedule_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - Response response = client.GetJobSchedule("", null, null, null, null, null, null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetJobSchedule_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - Response response = await client.GetJobScheduleAsync("", null, null, null, null, null, null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetJobSchedule_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - Response response = client.GetJobSchedule(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetJobSchedule_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - Response response = await client.GetJobScheduleAsync(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetJobSchedule_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - Response response = client.GetJobSchedule("", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), new string[] { "" }, new string[] { "" }, null, null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("url").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("lastModified").ToString()); - Console.WriteLine(result.GetProperty("creationTime").ToString()); - Console.WriteLine(result.GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("stateTransitionTime").ToString()); - Console.WriteLine(result.GetProperty("previousState").ToString()); - Console.WriteLine(result.GetProperty("previousStateTransitionTime").ToString()); - Console.WriteLine(result.GetProperty("schedule").GetProperty("doNotRunUntil").ToString()); - Console.WriteLine(result.GetProperty("schedule").GetProperty("doNotRunAfter").ToString()); - Console.WriteLine(result.GetProperty("schedule").GetProperty("startWindow").ToString()); - Console.WriteLine(result.GetProperty("schedule").GetProperty("recurrenceInterval").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("priority").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("allowTaskPreemption").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("maxParallelTasks").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("usesTaskDependencies").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("onAllTasksComplete").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("onTaskFailure").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("networkConfiguration").GetProperty("subnetId").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("constraints").GetProperty("maxWallClockTime").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("constraints").GetProperty("maxTaskRetryCount").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("commandLine").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("filePattern").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("path").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("containerUrl").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("uploadHeaders")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("uploadHeaders")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("uploadOptions").GetProperty("uploadCondition").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("constraints").GetProperty("maxWallClockTime").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("constraints").GetProperty("retentionTime").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("constraints").GetProperty("maxTaskRetryCount").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("requiredSlots").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("killJobOnCompletion").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("userIdentity").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("runExclusive").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("applicationPackageReferences")[0].GetProperty("applicationId").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("applicationPackageReferences")[0].GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("authenticationTokenSettings").GetProperty("access")[0].ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("allowLowPriorityNode").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("commandLine").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("constraints").GetProperty("maxWallClockTime").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("constraints").GetProperty("retentionTime").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("constraints").GetProperty("maxTaskRetryCount").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("waitForSuccess").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("userIdentity").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("rerunOnNodeRebootAfterSuccess").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("commandLine").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("maxWallClockTime").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("retentionTime").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("userIdentity").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("commonEnvironmentSettings")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("commonEnvironmentSettings")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("poolId").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("autoPoolIdPrefix").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("poolLifetimeOption").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("keepAlive").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("vmSize").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("publisher").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("offer").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("sku").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("virtualMachineImageId").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("exactVersion").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("nodeAgentSKUId").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("windowsConfiguration").GetProperty("enableAutomaticUpdates").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("lun").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("caching").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("diskSizeGB").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("storageAccountType").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("licenseType").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerImageNames")[0].ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("password").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("registryServer").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("diskEncryptionConfiguration").GetProperty("targets")[0].ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("nodePlacementConfiguration").GetProperty("policy").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("publisher").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("typeHandlerVersion").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("autoUpgradeMinorVersion").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("enableAutomaticUpgrade").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("settings").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("protectedSettings").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("provisionAfterExtensions")[0].ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("ephemeralOSDiskSettings").GetProperty("placement").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("caching").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("managedDisk").GetProperty("storageAccountType").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("writeAcceleratorEnabled").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("encryptionAtHost").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("securityType").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("uefiSettings").GetProperty("secureBootEnabled").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("uefiSettings").GetProperty("vTpmEnabled").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("serviceArtifactReference").GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("taskSlotsPerNode").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("taskSchedulingPolicy").GetProperty("nodeFillType").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("resizeTimeout").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("resourceTags").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("targetDedicatedNodes").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("targetLowPriorityNodes").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("enableAutoScale").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("autoScaleFormula").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("autoScaleEvaluationInterval").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("enableInterNodeCommunication").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("subnetId").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("dynamicVNetAssignmentScope").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("protocol").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("backendPort").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("frontendPortRangeStart").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("frontendPortRangeEnd").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("priority").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("access").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("sourceAddressPrefix").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("sourcePortRanges")[0].ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("publicIPAddressConfiguration").GetProperty("provision").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("publicIPAddressConfiguration").GetProperty("ipAddressIds")[0].ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("enableAcceleratedNetworking").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("commandLine").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("userIdentity").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("maxTaskRetryCount").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("waitForSuccess").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("applicationPackageReferences")[0].GetProperty("applicationId").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("applicationPackageReferences")[0].GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("password").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("elevationLevel").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("uid").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("gid").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("sshPrivateKey").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("windowsUserConfiguration").GetProperty("loginMode").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("metadata")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("metadata")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("accountName").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("containerName").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("accountKey").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("sasKey").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("blobfuseOptions").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("relativeMountPath").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("relativeMountPath").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("mountOptions").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("relativeMountPath").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("mountOptions").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("password").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("accountName").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("azureFileUrl").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("accountKey").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("relativeMountPath").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("mountOptions").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("targetNodeCommunicationMode").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("mode").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("disableAutomaticRollback").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("enableAutomaticOSUpgrade").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("useRollingUpgradePolicy").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("osRollingUpgradeDeferral").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("enableCrossZoneUpgrade").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxBatchInstancePercent").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxUnhealthyInstancePercent").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxUnhealthyUpgradedInstancePercent").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("pauseTimeBetweenBatches").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("prioritizeUnhealthyInstances").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("rollbackFailedInstancesOnPolicyBreach").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("metadata")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("metadata")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("nextRunTime").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("recentJob").GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("recentJob").GetProperty("url").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("metadata")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("metadata")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("url").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("lastUpdateTime").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("userCPUTime").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("kernelCPUTime").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("wallClockTime").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("readIOps").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("writeIOps").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("readIOGiB").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("writeIOGiB").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("numSucceededTasks").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("numFailedTasks").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("numTaskRetries").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("waitTime").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetJobSchedule_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - Response response = client.GetJobSchedule("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), select: new string[] { "" }, expand: new string[] { "" }, requestConditions: null); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_UpdateJobSchedule_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new object()); - Response response = client.UpdateJobSchedule("", content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_UpdateJobSchedule_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new object()); - Response response = await client.UpdateJobScheduleAsync("", content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_UpdateJobSchedule_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - schedule = new - { - doNotRunUntil = "2022-05-10T18:57:31.2311892Z", - doNotRunAfter = "2022-05-10T18:57:31.2311892Z", - startWindow = "PT1H23M45S", - recurrenceInterval = "PT1H23M45S", - }, - jobSpecification = new - { - priority = 1234, - allowTaskPreemption = true, - maxParallelTasks = 1234, - displayName = "", - usesTaskDependencies = true, - onAllTasksComplete = "noaction", - onTaskFailure = "noaction", - networkConfiguration = new - { - subnetId = "", - }, - constraints = new - { - maxWallClockTime = "PT1H23M45S", - maxTaskRetryCount = 1234, - }, - jobManagerTask = new - { - id = "", - displayName = "", - commandLine = "", - containerSettings = new - { - containerRunOptions = "", - imageName = "", - registry = new - { - username = "", - password = "", - registryServer = "", - identityReference = new - { - resourceId = "", - }, - }, - workingDirectory = "taskWorkingDirectory", - }, - resourceFiles = new object[] - { -new -{ -autoStorageContainerName = "", -storageContainerUrl = "", -httpUrl = "", -blobPrefix = "", -filePath = "", -fileMode = "", -} - }, - outputFiles = new object[] - { -new -{ -filePattern = "", -destination = new -{ -container = new -{ -path = "", -containerUrl = "", -uploadHeaders = new object[] -{ -new -{ -name = "", -value = "", -} -}, -}, -}, -uploadOptions = new -{ -uploadCondition = "tasksuccess", -}, -} - }, - environmentSettings = new object[] - { -new -{ -name = "", -value = "", -} - }, - constraints = new - { - maxWallClockTime = "PT1H23M45S", - retentionTime = "PT1H23M45S", - maxTaskRetryCount = 1234, - }, - requiredSlots = 1234, - killJobOnCompletion = true, - userIdentity = new - { - username = "", - autoUser = new - { - scope = "task", - elevationLevel = "nonadmin", - }, - }, - runExclusive = true, - applicationPackageReferences = new object[] - { -new -{ -applicationId = "", -version = "", -} - }, - authenticationTokenSettings = new - { - access = new object[] - { -"job" - }, - }, - allowLowPriorityNode = true, - }, - jobPreparationTask = new - { - id = "", - commandLine = "", - resourceFiles = new object[] - { -null - }, - environmentSettings = new object[] - { -null - }, - waitForSuccess = true, - rerunOnNodeRebootAfterSuccess = true, - }, - jobReleaseTask = new - { - id = "", - commandLine = "", - resourceFiles = new object[] - { -null - }, - environmentSettings = new object[] - { -null - }, - maxWallClockTime = "PT1H23M45S", - retentionTime = "PT1H23M45S", - }, - commonEnvironmentSettings = new object[] - { -null - }, - poolInfo = new - { - poolId = "", - autoPoolSpecification = new - { - autoPoolIdPrefix = "", - poolLifetimeOption = "jobschedule", - keepAlive = true, - pool = new - { - displayName = "", - vmSize = "", - virtualMachineConfiguration = new - { - imageReference = new - { - publisher = "", - offer = "", - sku = "", - version = "", - virtualMachineImageId = "", - }, - nodeAgentSKUId = "", - windowsConfiguration = new - { - enableAutomaticUpdates = true, - }, - dataDisks = new object[] - { -new -{ -lun = 1234, -caching = "none", -diskSizeGB = 1234, -storageAccountType = "standard_lrs", -} - }, - licenseType = "", - containerConfiguration = new - { - type = "dockerCompatible", - containerImageNames = new object[] - { -"" - }, - containerRegistries = new object[] - { -null - }, - }, - diskEncryptionConfiguration = new - { - targets = new object[] - { -"osdisk" - }, - }, - nodePlacementConfiguration = new - { - policy = "regional", - }, - extensions = new object[] - { -new -{ -name = "", -publisher = "", -type = "", -typeHandlerVersion = "", -autoUpgradeMinorVersion = true, -enableAutomaticUpgrade = true, -settings = new -{ -key = "", -}, -protectedSettings = new -{ -key = "", -}, -provisionAfterExtensions = new object[] -{ -"" -}, -} - }, - osDisk = new - { - ephemeralOSDiskSettings = new - { - placement = "cachedisk", - }, - caching = "none", - diskSizeGB = 1234, - managedDisk = new - { - storageAccountType = "standard_lrs", - }, - writeAcceleratorEnabled = true, - }, - securityProfile = new - { - encryptionAtHost = true, - securityType = "trustedLaunch", - uefiSettings = new - { - secureBootEnabled = true, - vTpmEnabled = true, - }, - }, - serviceArtifactReference = new - { - id = "", - }, - }, - taskSlotsPerNode = 1234, - taskSchedulingPolicy = new - { - nodeFillType = "spread", - }, - resizeTimeout = "PT1H23M45S", - resourceTags = "", - targetDedicatedNodes = 1234, - targetLowPriorityNodes = 1234, - enableAutoScale = true, - autoScaleFormula = "", - autoScaleEvaluationInterval = "PT1H23M45S", - enableInterNodeCommunication = true, - networkConfiguration = new - { - subnetId = "", - dynamicVNetAssignmentScope = "none", - endpointConfiguration = new - { - inboundNATPools = new object[] - { -new -{ -name = "", -protocol = "tcp", -backendPort = 1234, -frontendPortRangeStart = 1234, -frontendPortRangeEnd = 1234, -networkSecurityGroupRules = new object[] -{ -new -{ -priority = 1234, -access = "allow", -sourceAddressPrefix = "", -sourcePortRanges = new object[] -{ -"" -}, -} -}, -} - }, - }, - publicIPAddressConfiguration = new - { - provision = "batchmanaged", - ipAddressIds = new object[] - { -"" - }, - }, - enableAcceleratedNetworking = true, - }, - startTask = new - { - commandLine = "", - resourceFiles = new object[] - { -null - }, - environmentSettings = new object[] - { -null - }, - maxTaskRetryCount = 1234, - waitForSuccess = true, - }, - applicationPackageReferences = new object[] - { -null - }, - userAccounts = new object[] - { -new -{ -name = "", -password = "", -elevationLevel = "nonadmin", -linuxUserConfiguration = new -{ -uid = 1234, -gid = 1234, -sshPrivateKey = "", -}, -windowsUserConfiguration = new -{ -loginMode = "batch", -}, -} - }, - metadata = new object[] - { -new -{ -name = "", -value = "", -} - }, - mountConfiguration = new object[] - { -new -{ -azureBlobFileSystemConfiguration = new -{ -accountName = "", -containerName = "", -accountKey = "", -sasKey = "", -blobfuseOptions = "", -relativeMountPath = "", -}, -nfsMountConfiguration = new -{ -source = "", -relativeMountPath = "", -mountOptions = "", -}, -cifsMountConfiguration = new -{ -username = "", -source = "", -relativeMountPath = "", -mountOptions = "", -password = "", -}, -azureFileShareConfiguration = new -{ -accountName = "", -azureFileUrl = "", -accountKey = "", -relativeMountPath = "", -mountOptions = "", -}, -} - }, - targetNodeCommunicationMode = "default", - upgradePolicy = new - { - mode = "automatic", - automaticOSUpgradePolicy = new - { - disableAutomaticRollback = true, - enableAutomaticOSUpgrade = true, - useRollingUpgradePolicy = true, - osRollingUpgradeDeferral = true, - }, - rollingUpgradePolicy = new - { - enableCrossZoneUpgrade = true, - maxBatchInstancePercent = 1234, - maxUnhealthyInstancePercent = 1234, - maxUnhealthyUpgradedInstancePercent = 1234, - pauseTimeBetweenBatches = "PT1H23M45S", - prioritizeUnhealthyInstances = true, - rollbackFailedInstancesOnPolicyBreach = true, - }, - }, - }, - }, - }, - metadata = new object[] - { -null - }, - }, - metadata = new object[] - { -null - }, - }); - Response response = client.UpdateJobSchedule("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_UpdateJobSchedule_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - schedule = new - { - doNotRunUntil = "2022-05-10T18:57:31.2311892Z", - doNotRunAfter = "2022-05-10T18:57:31.2311892Z", - startWindow = "PT1H23M45S", - recurrenceInterval = "PT1H23M45S", - }, - jobSpecification = new - { - priority = 1234, - allowTaskPreemption = true, - maxParallelTasks = 1234, - displayName = "", - usesTaskDependencies = true, - onAllTasksComplete = "noaction", - onTaskFailure = "noaction", - networkConfiguration = new - { - subnetId = "", - }, - constraints = new - { - maxWallClockTime = "PT1H23M45S", - maxTaskRetryCount = 1234, - }, - jobManagerTask = new - { - id = "", - displayName = "", - commandLine = "", - containerSettings = new - { - containerRunOptions = "", - imageName = "", - registry = new - { - username = "", - password = "", - registryServer = "", - identityReference = new - { - resourceId = "", - }, - }, - workingDirectory = "taskWorkingDirectory", - }, - resourceFiles = new object[] - { -new -{ -autoStorageContainerName = "", -storageContainerUrl = "", -httpUrl = "", -blobPrefix = "", -filePath = "", -fileMode = "", -} - }, - outputFiles = new object[] - { -new -{ -filePattern = "", -destination = new -{ -container = new -{ -path = "", -containerUrl = "", -uploadHeaders = new object[] -{ -new -{ -name = "", -value = "", -} -}, -}, -}, -uploadOptions = new -{ -uploadCondition = "tasksuccess", -}, -} - }, - environmentSettings = new object[] - { -new -{ -name = "", -value = "", -} - }, - constraints = new - { - maxWallClockTime = "PT1H23M45S", - retentionTime = "PT1H23M45S", - maxTaskRetryCount = 1234, - }, - requiredSlots = 1234, - killJobOnCompletion = true, - userIdentity = new - { - username = "", - autoUser = new - { - scope = "task", - elevationLevel = "nonadmin", - }, - }, - runExclusive = true, - applicationPackageReferences = new object[] - { -new -{ -applicationId = "", -version = "", -} - }, - authenticationTokenSettings = new - { - access = new object[] - { -"job" - }, - }, - allowLowPriorityNode = true, - }, - jobPreparationTask = new - { - id = "", - commandLine = "", - resourceFiles = new object[] - { -null - }, - environmentSettings = new object[] - { -null - }, - waitForSuccess = true, - rerunOnNodeRebootAfterSuccess = true, - }, - jobReleaseTask = new - { - id = "", - commandLine = "", - resourceFiles = new object[] - { -null - }, - environmentSettings = new object[] - { -null - }, - maxWallClockTime = "PT1H23M45S", - retentionTime = "PT1H23M45S", - }, - commonEnvironmentSettings = new object[] - { -null - }, - poolInfo = new - { - poolId = "", - autoPoolSpecification = new - { - autoPoolIdPrefix = "", - poolLifetimeOption = "jobschedule", - keepAlive = true, - pool = new - { - displayName = "", - vmSize = "", - virtualMachineConfiguration = new - { - imageReference = new - { - publisher = "", - offer = "", - sku = "", - version = "", - virtualMachineImageId = "", - }, - nodeAgentSKUId = "", - windowsConfiguration = new - { - enableAutomaticUpdates = true, - }, - dataDisks = new object[] - { -new -{ -lun = 1234, -caching = "none", -diskSizeGB = 1234, -storageAccountType = "standard_lrs", -} - }, - licenseType = "", - containerConfiguration = new - { - type = "dockerCompatible", - containerImageNames = new object[] - { -"" - }, - containerRegistries = new object[] - { -null - }, - }, - diskEncryptionConfiguration = new - { - targets = new object[] - { -"osdisk" - }, - }, - nodePlacementConfiguration = new - { - policy = "regional", - }, - extensions = new object[] - { -new -{ -name = "", -publisher = "", -type = "", -typeHandlerVersion = "", -autoUpgradeMinorVersion = true, -enableAutomaticUpgrade = true, -settings = new -{ -key = "", -}, -protectedSettings = new -{ -key = "", -}, -provisionAfterExtensions = new object[] -{ -"" -}, -} - }, - osDisk = new - { - ephemeralOSDiskSettings = new - { - placement = "cachedisk", - }, - caching = "none", - diskSizeGB = 1234, - managedDisk = new - { - storageAccountType = "standard_lrs", - }, - writeAcceleratorEnabled = true, - }, - securityProfile = new - { - encryptionAtHost = true, - securityType = "trustedLaunch", - uefiSettings = new - { - secureBootEnabled = true, - vTpmEnabled = true, - }, - }, - serviceArtifactReference = new - { - id = "", - }, - }, - taskSlotsPerNode = 1234, - taskSchedulingPolicy = new - { - nodeFillType = "spread", - }, - resizeTimeout = "PT1H23M45S", - resourceTags = "", - targetDedicatedNodes = 1234, - targetLowPriorityNodes = 1234, - enableAutoScale = true, - autoScaleFormula = "", - autoScaleEvaluationInterval = "PT1H23M45S", - enableInterNodeCommunication = true, - networkConfiguration = new - { - subnetId = "", - dynamicVNetAssignmentScope = "none", - endpointConfiguration = new - { - inboundNATPools = new object[] - { -new -{ -name = "", -protocol = "tcp", -backendPort = 1234, -frontendPortRangeStart = 1234, -frontendPortRangeEnd = 1234, -networkSecurityGroupRules = new object[] -{ -new -{ -priority = 1234, -access = "allow", -sourceAddressPrefix = "", -sourcePortRanges = new object[] -{ -"" -}, -} -}, -} - }, - }, - publicIPAddressConfiguration = new - { - provision = "batchmanaged", - ipAddressIds = new object[] - { -"" - }, - }, - enableAcceleratedNetworking = true, - }, - startTask = new - { - commandLine = "", - resourceFiles = new object[] - { -null - }, - environmentSettings = new object[] - { -null - }, - maxTaskRetryCount = 1234, - waitForSuccess = true, - }, - applicationPackageReferences = new object[] - { -null - }, - userAccounts = new object[] - { -new -{ -name = "", -password = "", -elevationLevel = "nonadmin", -linuxUserConfiguration = new -{ -uid = 1234, -gid = 1234, -sshPrivateKey = "", -}, -windowsUserConfiguration = new -{ -loginMode = "batch", -}, -} - }, - metadata = new object[] - { -new -{ -name = "", -value = "", -} - }, - mountConfiguration = new object[] - { -new -{ -azureBlobFileSystemConfiguration = new -{ -accountName = "", -containerName = "", -accountKey = "", -sasKey = "", -blobfuseOptions = "", -relativeMountPath = "", -}, -nfsMountConfiguration = new -{ -source = "", -relativeMountPath = "", -mountOptions = "", -}, -cifsMountConfiguration = new -{ -username = "", -source = "", -relativeMountPath = "", -mountOptions = "", -password = "", -}, -azureFileShareConfiguration = new -{ -accountName = "", -azureFileUrl = "", -accountKey = "", -relativeMountPath = "", -mountOptions = "", -}, -} - }, - targetNodeCommunicationMode = "default", - upgradePolicy = new - { - mode = "automatic", - automaticOSUpgradePolicy = new - { - disableAutomaticRollback = true, - enableAutomaticOSUpgrade = true, - useRollingUpgradePolicy = true, - osRollingUpgradeDeferral = true, - }, - rollingUpgradePolicy = new - { - enableCrossZoneUpgrade = true, - maxBatchInstancePercent = 1234, - maxUnhealthyInstancePercent = 1234, - maxUnhealthyUpgradedInstancePercent = 1234, - pauseTimeBetweenBatches = "PT1H23M45S", - prioritizeUnhealthyInstances = true, - rollbackFailedInstancesOnPolicyBreach = true, - }, - }, - }, - }, - }, - metadata = new object[] - { -null - }, - }, - metadata = new object[] - { -null - }, - }); - Response response = await client.UpdateJobScheduleAsync("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_ReplaceJobSchedule_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - jobSpecification = new - { - poolInfo = new object(), - }, - }); - Response response = client.ReplaceJobSchedule("", content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_ReplaceJobSchedule_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - jobSpecification = new - { - poolInfo = new object(), - }, - }); - Response response = await client.ReplaceJobScheduleAsync("", content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_ReplaceJobSchedule_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - BatchJobSchedule jobSchedule = new BatchJobSchedule(new BatchJobSpecification(new BatchPoolInfo())); - Response response = client.ReplaceJobSchedule("", jobSchedule); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_ReplaceJobSchedule_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - BatchJobSchedule jobSchedule = new BatchJobSchedule(new BatchJobSpecification(new BatchPoolInfo())); - Response response = await client.ReplaceJobScheduleAsync("", jobSchedule); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_ReplaceJobSchedule_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - schedule = new - { - doNotRunUntil = "2022-05-10T18:57:31.2311892Z", - doNotRunAfter = "2022-05-10T18:57:31.2311892Z", - startWindow = "PT1H23M45S", - recurrenceInterval = "PT1H23M45S", - }, - jobSpecification = new - { - priority = 1234, - allowTaskPreemption = true, - maxParallelTasks = 1234, - displayName = "", - usesTaskDependencies = true, - onAllTasksComplete = "noaction", - onTaskFailure = "noaction", - networkConfiguration = new - { - subnetId = "", - }, - constraints = new - { - maxWallClockTime = "PT1H23M45S", - maxTaskRetryCount = 1234, - }, - jobManagerTask = new - { - id = "", - displayName = "", - commandLine = "", - containerSettings = new - { - containerRunOptions = "", - imageName = "", - registry = new - { - username = "", - password = "", - registryServer = "", - identityReference = new - { - resourceId = "", - }, - }, - workingDirectory = "taskWorkingDirectory", - }, - resourceFiles = new object[] - { -new -{ -autoStorageContainerName = "", -storageContainerUrl = "", -httpUrl = "", -blobPrefix = "", -filePath = "", -fileMode = "", -} - }, - outputFiles = new object[] - { -new -{ -filePattern = "", -destination = new -{ -container = new -{ -path = "", -containerUrl = "", -uploadHeaders = new object[] -{ -new -{ -name = "", -value = "", -} -}, -}, -}, -uploadOptions = new -{ -uploadCondition = "tasksuccess", -}, -} - }, - environmentSettings = new object[] - { -new -{ -name = "", -value = "", -} - }, - constraints = new - { - maxWallClockTime = "PT1H23M45S", - retentionTime = "PT1H23M45S", - maxTaskRetryCount = 1234, - }, - requiredSlots = 1234, - killJobOnCompletion = true, - userIdentity = new - { - username = "", - autoUser = new - { - scope = "task", - elevationLevel = "nonadmin", - }, - }, - runExclusive = true, - applicationPackageReferences = new object[] - { -new -{ -applicationId = "", -version = "", -} - }, - authenticationTokenSettings = new - { - access = new object[] - { -"job" - }, - }, - allowLowPriorityNode = true, - }, - jobPreparationTask = new - { - id = "", - commandLine = "", - resourceFiles = new object[] - { -null - }, - environmentSettings = new object[] - { -null - }, - waitForSuccess = true, - rerunOnNodeRebootAfterSuccess = true, - }, - jobReleaseTask = new - { - id = "", - commandLine = "", - resourceFiles = new object[] - { -null - }, - environmentSettings = new object[] - { -null - }, - maxWallClockTime = "PT1H23M45S", - retentionTime = "PT1H23M45S", - }, - commonEnvironmentSettings = new object[] - { -null - }, - poolInfo = new - { - poolId = "", - autoPoolSpecification = new - { - autoPoolIdPrefix = "", - poolLifetimeOption = "jobschedule", - keepAlive = true, - pool = new - { - displayName = "", - vmSize = "", - virtualMachineConfiguration = new - { - imageReference = new - { - publisher = "", - offer = "", - sku = "", - version = "", - virtualMachineImageId = "", - }, - nodeAgentSKUId = "", - windowsConfiguration = new - { - enableAutomaticUpdates = true, - }, - dataDisks = new object[] - { -new -{ -lun = 1234, -caching = "none", -diskSizeGB = 1234, -storageAccountType = "standard_lrs", -} - }, - licenseType = "", - containerConfiguration = new - { - type = "dockerCompatible", - containerImageNames = new object[] - { -"" - }, - containerRegistries = new object[] - { -null - }, - }, - diskEncryptionConfiguration = new - { - targets = new object[] - { -"osdisk" - }, - }, - nodePlacementConfiguration = new - { - policy = "regional", - }, - extensions = new object[] - { -new -{ -name = "", -publisher = "", -type = "", -typeHandlerVersion = "", -autoUpgradeMinorVersion = true, -enableAutomaticUpgrade = true, -settings = new -{ -key = "", -}, -protectedSettings = new -{ -key = "", -}, -provisionAfterExtensions = new object[] -{ -"" -}, -} - }, - osDisk = new - { - ephemeralOSDiskSettings = new - { - placement = "cachedisk", - }, - caching = "none", - diskSizeGB = 1234, - managedDisk = new - { - storageAccountType = "standard_lrs", - }, - writeAcceleratorEnabled = true, - }, - securityProfile = new - { - encryptionAtHost = true, - securityType = "trustedLaunch", - uefiSettings = new - { - secureBootEnabled = true, - vTpmEnabled = true, - }, - }, - serviceArtifactReference = new - { - id = "", - }, - }, - taskSlotsPerNode = 1234, - taskSchedulingPolicy = new - { - nodeFillType = "spread", - }, - resizeTimeout = "PT1H23M45S", - resourceTags = "", - targetDedicatedNodes = 1234, - targetLowPriorityNodes = 1234, - enableAutoScale = true, - autoScaleFormula = "", - autoScaleEvaluationInterval = "PT1H23M45S", - enableInterNodeCommunication = true, - networkConfiguration = new - { - subnetId = "", - dynamicVNetAssignmentScope = "none", - endpointConfiguration = new - { - inboundNATPools = new object[] - { -new -{ -name = "", -protocol = "tcp", -backendPort = 1234, -frontendPortRangeStart = 1234, -frontendPortRangeEnd = 1234, -networkSecurityGroupRules = new object[] -{ -new -{ -priority = 1234, -access = "allow", -sourceAddressPrefix = "", -sourcePortRanges = new object[] -{ -"" -}, -} -}, -} - }, - }, - publicIPAddressConfiguration = new - { - provision = "batchmanaged", - ipAddressIds = new object[] - { -"" - }, - }, - enableAcceleratedNetworking = true, - }, - startTask = new - { - commandLine = "", - resourceFiles = new object[] - { -null - }, - environmentSettings = new object[] - { -null - }, - maxTaskRetryCount = 1234, - waitForSuccess = true, - }, - applicationPackageReferences = new object[] - { -null - }, - userAccounts = new object[] - { -new -{ -name = "", -password = "", -elevationLevel = "nonadmin", -linuxUserConfiguration = new -{ -uid = 1234, -gid = 1234, -sshPrivateKey = "", -}, -windowsUserConfiguration = new -{ -loginMode = "batch", -}, -} - }, - metadata = new object[] - { -new -{ -name = "", -value = "", -} - }, - mountConfiguration = new object[] - { -new -{ -azureBlobFileSystemConfiguration = new -{ -accountName = "", -containerName = "", -accountKey = "", -sasKey = "", -blobfuseOptions = "", -relativeMountPath = "", -}, -nfsMountConfiguration = new -{ -source = "", -relativeMountPath = "", -mountOptions = "", -}, -cifsMountConfiguration = new -{ -username = "", -source = "", -relativeMountPath = "", -mountOptions = "", -password = "", -}, -azureFileShareConfiguration = new -{ -accountName = "", -azureFileUrl = "", -accountKey = "", -relativeMountPath = "", -mountOptions = "", -}, -} - }, - targetNodeCommunicationMode = "default", - upgradePolicy = new - { - mode = "automatic", - automaticOSUpgradePolicy = new - { - disableAutomaticRollback = true, - enableAutomaticOSUpgrade = true, - useRollingUpgradePolicy = true, - osRollingUpgradeDeferral = true, - }, - rollingUpgradePolicy = new - { - enableCrossZoneUpgrade = true, - maxBatchInstancePercent = 1234, - maxUnhealthyInstancePercent = 1234, - maxUnhealthyUpgradedInstancePercent = 1234, - pauseTimeBetweenBatches = "PT1H23M45S", - prioritizeUnhealthyInstances = true, - rollbackFailedInstancesOnPolicyBreach = true, - }, - }, - }, - }, - }, - metadata = new object[] - { -null - }, - }, - metadata = new object[] - { -null - }, - }); - Response response = client.ReplaceJobSchedule("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_ReplaceJobSchedule_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - schedule = new - { - doNotRunUntil = "2022-05-10T18:57:31.2311892Z", - doNotRunAfter = "2022-05-10T18:57:31.2311892Z", - startWindow = "PT1H23M45S", - recurrenceInterval = "PT1H23M45S", - }, - jobSpecification = new - { - priority = 1234, - allowTaskPreemption = true, - maxParallelTasks = 1234, - displayName = "", - usesTaskDependencies = true, - onAllTasksComplete = "noaction", - onTaskFailure = "noaction", - networkConfiguration = new - { - subnetId = "", - }, - constraints = new - { - maxWallClockTime = "PT1H23M45S", - maxTaskRetryCount = 1234, - }, - jobManagerTask = new - { - id = "", - displayName = "", - commandLine = "", - containerSettings = new - { - containerRunOptions = "", - imageName = "", - registry = new - { - username = "", - password = "", - registryServer = "", - identityReference = new - { - resourceId = "", - }, - }, - workingDirectory = "taskWorkingDirectory", - }, - resourceFiles = new object[] - { -new -{ -autoStorageContainerName = "", -storageContainerUrl = "", -httpUrl = "", -blobPrefix = "", -filePath = "", -fileMode = "", -} - }, - outputFiles = new object[] - { -new -{ -filePattern = "", -destination = new -{ -container = new -{ -path = "", -containerUrl = "", -uploadHeaders = new object[] -{ -new -{ -name = "", -value = "", -} -}, -}, -}, -uploadOptions = new -{ -uploadCondition = "tasksuccess", -}, -} - }, - environmentSettings = new object[] - { -new -{ -name = "", -value = "", -} - }, - constraints = new - { - maxWallClockTime = "PT1H23M45S", - retentionTime = "PT1H23M45S", - maxTaskRetryCount = 1234, - }, - requiredSlots = 1234, - killJobOnCompletion = true, - userIdentity = new - { - username = "", - autoUser = new - { - scope = "task", - elevationLevel = "nonadmin", - }, - }, - runExclusive = true, - applicationPackageReferences = new object[] - { -new -{ -applicationId = "", -version = "", -} - }, - authenticationTokenSettings = new - { - access = new object[] - { -"job" - }, - }, - allowLowPriorityNode = true, - }, - jobPreparationTask = new - { - id = "", - commandLine = "", - resourceFiles = new object[] - { -null - }, - environmentSettings = new object[] - { -null - }, - waitForSuccess = true, - rerunOnNodeRebootAfterSuccess = true, - }, - jobReleaseTask = new - { - id = "", - commandLine = "", - resourceFiles = new object[] - { -null - }, - environmentSettings = new object[] - { -null - }, - maxWallClockTime = "PT1H23M45S", - retentionTime = "PT1H23M45S", - }, - commonEnvironmentSettings = new object[] - { -null - }, - poolInfo = new - { - poolId = "", - autoPoolSpecification = new - { - autoPoolIdPrefix = "", - poolLifetimeOption = "jobschedule", - keepAlive = true, - pool = new - { - displayName = "", - vmSize = "", - virtualMachineConfiguration = new - { - imageReference = new - { - publisher = "", - offer = "", - sku = "", - version = "", - virtualMachineImageId = "", - }, - nodeAgentSKUId = "", - windowsConfiguration = new - { - enableAutomaticUpdates = true, - }, - dataDisks = new object[] - { -new -{ -lun = 1234, -caching = "none", -diskSizeGB = 1234, -storageAccountType = "standard_lrs", -} - }, - licenseType = "", - containerConfiguration = new - { - type = "dockerCompatible", - containerImageNames = new object[] - { -"" - }, - containerRegistries = new object[] - { -null - }, - }, - diskEncryptionConfiguration = new - { - targets = new object[] - { -"osdisk" - }, - }, - nodePlacementConfiguration = new - { - policy = "regional", - }, - extensions = new object[] - { -new -{ -name = "", -publisher = "", -type = "", -typeHandlerVersion = "", -autoUpgradeMinorVersion = true, -enableAutomaticUpgrade = true, -settings = new -{ -key = "", -}, -protectedSettings = new -{ -key = "", -}, -provisionAfterExtensions = new object[] -{ -"" -}, -} - }, - osDisk = new - { - ephemeralOSDiskSettings = new - { - placement = "cachedisk", - }, - caching = "none", - diskSizeGB = 1234, - managedDisk = new - { - storageAccountType = "standard_lrs", - }, - writeAcceleratorEnabled = true, - }, - securityProfile = new - { - encryptionAtHost = true, - securityType = "trustedLaunch", - uefiSettings = new - { - secureBootEnabled = true, - vTpmEnabled = true, - }, - }, - serviceArtifactReference = new - { - id = "", - }, - }, - taskSlotsPerNode = 1234, - taskSchedulingPolicy = new - { - nodeFillType = "spread", - }, - resizeTimeout = "PT1H23M45S", - resourceTags = "", - targetDedicatedNodes = 1234, - targetLowPriorityNodes = 1234, - enableAutoScale = true, - autoScaleFormula = "", - autoScaleEvaluationInterval = "PT1H23M45S", - enableInterNodeCommunication = true, - networkConfiguration = new - { - subnetId = "", - dynamicVNetAssignmentScope = "none", - endpointConfiguration = new - { - inboundNATPools = new object[] - { -new -{ -name = "", -protocol = "tcp", -backendPort = 1234, -frontendPortRangeStart = 1234, -frontendPortRangeEnd = 1234, -networkSecurityGroupRules = new object[] -{ -new -{ -priority = 1234, -access = "allow", -sourceAddressPrefix = "", -sourcePortRanges = new object[] -{ -"" -}, -} -}, -} - }, - }, - publicIPAddressConfiguration = new - { - provision = "batchmanaged", - ipAddressIds = new object[] - { -"" - }, - }, - enableAcceleratedNetworking = true, - }, - startTask = new - { - commandLine = "", - resourceFiles = new object[] - { -null - }, - environmentSettings = new object[] - { -null - }, - maxTaskRetryCount = 1234, - waitForSuccess = true, - }, - applicationPackageReferences = new object[] - { -null - }, - userAccounts = new object[] - { -new -{ -name = "", -password = "", -elevationLevel = "nonadmin", -linuxUserConfiguration = new -{ -uid = 1234, -gid = 1234, -sshPrivateKey = "", -}, -windowsUserConfiguration = new -{ -loginMode = "batch", -}, -} - }, - metadata = new object[] - { -new -{ -name = "", -value = "", -} - }, - mountConfiguration = new object[] - { -new -{ -azureBlobFileSystemConfiguration = new -{ -accountName = "", -containerName = "", -accountKey = "", -sasKey = "", -blobfuseOptions = "", -relativeMountPath = "", -}, -nfsMountConfiguration = new -{ -source = "", -relativeMountPath = "", -mountOptions = "", -}, -cifsMountConfiguration = new -{ -username = "", -source = "", -relativeMountPath = "", -mountOptions = "", -password = "", -}, -azureFileShareConfiguration = new -{ -accountName = "", -azureFileUrl = "", -accountKey = "", -relativeMountPath = "", -mountOptions = "", -}, -} - }, - targetNodeCommunicationMode = "default", - upgradePolicy = new - { - mode = "automatic", - automaticOSUpgradePolicy = new - { - disableAutomaticRollback = true, - enableAutomaticOSUpgrade = true, - useRollingUpgradePolicy = true, - osRollingUpgradeDeferral = true, - }, - rollingUpgradePolicy = new - { - enableCrossZoneUpgrade = true, - maxBatchInstancePercent = 1234, - maxUnhealthyInstancePercent = 1234, - maxUnhealthyUpgradedInstancePercent = 1234, - pauseTimeBetweenBatches = "PT1H23M45S", - prioritizeUnhealthyInstances = true, - rollbackFailedInstancesOnPolicyBreach = true, - }, - }, - }, - }, - }, - metadata = new object[] - { -null - }, - }, - metadata = new object[] - { -null - }, - }); - Response response = await client.ReplaceJobScheduleAsync("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_ReplaceJobSchedule_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - BatchJobSchedule jobSchedule = new BatchJobSchedule(new BatchJobSpecification(new BatchPoolInfo - { - PoolId = "", - AutoPoolSpecification = new BatchAutoPoolSpecification(BatchPoolLifetimeOption.JobSchedule) - { - AutoPoolIdPrefix = "", - KeepAlive = true, - Pool = new BatchPoolSpecification("") - { - DisplayName = "", - VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference - { - Publisher = "", - Offer = "", - Sku = "", - Version = "", - VirtualMachineImageId = "", - }, "") - { - WindowsConfiguration = new WindowsConfiguration - { - EnableAutomaticUpdates = true, - }, - DataDisks = {new DataDisk(1234, 1234) -{ -Caching = CachingType.None, -StorageAccountType = StorageAccountType.StandardLRS, -}}, - LicenseType = "", - ContainerConfiguration = new ContainerConfiguration(ContainerType.DockerCompatible) - { - ContainerImageNames = { "" }, - ContainerRegistries = { default }, - }, - DiskEncryptionConfiguration = new DiskEncryptionConfiguration - { - Targets = { DiskEncryptionTarget.OsDisk }, - }, - NodePlacementConfiguration = new BatchNodePlacementConfiguration - { - Policy = BatchNodePlacementPolicyType.Regional, - }, - Extensions = {new VMExtension("", "", "") -{ -TypeHandlerVersion = "", -AutoUpgradeMinorVersion = true, -EnableAutomaticUpgrade = true, -Settings = -{ -["key"] = "" -}, -ProtectedSettings = -{ -["key"] = "" -}, -ProvisionAfterExtensions = {""}, -}}, - OsDisk = new OSDisk - { - EphemeralOSDiskSettings = new DiffDiskSettings - { - Placement = DiffDiskPlacement.CacheDisk, - }, - Caching = CachingType.None, - DiskSizeGB = 1234, - ManagedDisk = new ManagedDisk(StorageAccountType.StandardLRS), - WriteAcceleratorEnabled = true, - }, - SecurityProfile = new SecurityProfile(true, SecurityTypes.TrustedLaunch, new UefiSettings - { - SecureBootEnabled = true, - VTpmEnabled = true, - }), - ServiceArtifactReference = new ServiceArtifactReference(""), - }, - TaskSlotsPerNode = 1234, - TaskSchedulingPolicy = new BatchTaskSchedulingPolicy(BatchNodeFillType.Spread), - ResizeTimeout = XmlConvert.ToTimeSpan("PT1H23M45S"), - ResourceTags = "", - TargetDedicatedNodes = 1234, - TargetLowPriorityNodes = 1234, - EnableAutoScale = true, - AutoScaleFormula = "", - AutoScaleEvaluationInterval = XmlConvert.ToTimeSpan("PT1H23M45S"), - EnableInterNodeCommunication = true, - NetworkConfiguration = new NetworkConfiguration - { - SubnetId = "", - DynamicVNetAssignmentScope = DynamicVNetAssignmentScope.None, - EndpointConfiguration = new BatchPoolEndpointConfiguration(new InboundNatPool[] - { -new InboundNatPool("", InboundEndpointProtocol.Tcp, 1234, 1234, 1234) -{ -NetworkSecurityGroupRules = {new NetworkSecurityGroupRule(1234, NetworkSecurityGroupRuleAccess.Allow, "") -{ -SourcePortRanges = {""}, -}}, -} - }), - PublicIpAddressConfiguration = new PublicIpAddressConfiguration - { - IpAddressProvisioningType = IpAddressProvisioningType.BatchManaged, - IpAddressIds = { "" }, - }, - EnableAcceleratedNetworking = true, - }, - StartTask = new BatchStartTask("") - { - ContainerSettings = default, - ResourceFiles = { default }, - EnvironmentSettings = { default }, - UserIdentity = default, - MaxTaskRetryCount = 1234, - WaitForSuccess = true, - }, - ApplicationPackageReferences = { default }, - UserAccounts = {new UserAccount("", "") -{ -ElevationLevel = ElevationLevel.NonAdmin, -LinuxUserConfiguration = new LinuxUserConfiguration -{ -Uid = 1234, -Gid = 1234, -SshPrivateKey = "", -}, -WindowsUserConfiguration = new WindowsUserConfiguration -{ -LoginMode = LoginMode.Batch, -}, -}}, - Metadata = { new MetadataItem("", "") }, - MountConfiguration = {new MountConfiguration -{ -AzureBlobFileSystemConfiguration = new AzureBlobFileSystemConfiguration("", "", "") -{ -AccountKey = "", -SasKey = "", -BlobfuseOptions = "", -IdentityReference = default, -}, -NfsMountConfiguration = new NfsMountConfiguration("", "") -{ -MountOptions = "", -}, -CifsMountConfiguration = new CifsMountConfiguration("", "", "", "") -{ -MountOptions = "", -}, -AzureFileShareConfiguration = new AzureFileShareConfiguration("", "", "", "") -{ -MountOptions = "", -}, -}}, - TargetNodeCommunicationMode = BatchNodeCommunicationMode.Default, - UpgradePolicy = new UpgradePolicy(UpgradeMode.Automatic) - { - AutomaticOsUpgradePolicy = new AutomaticOsUpgradePolicy - { - DisableAutomaticRollback = true, - EnableAutomaticOsUpgrade = true, - UseRollingUpgradePolicy = true, - OsRollingUpgradeDeferral = true, - }, - RollingUpgradePolicy = new RollingUpgradePolicy - { - EnableCrossZoneUpgrade = true, - MaxBatchInstancePercent = 1234, - MaxUnhealthyInstancePercent = 1234, - MaxUnhealthyUpgradedInstancePercent = 1234, - PauseTimeBetweenBatches = XmlConvert.ToTimeSpan("PT1H23M45S"), - PrioritizeUnhealthyInstances = true, - RollbackFailedInstancesOnPolicyBreach = true, - }, - }, - }, - }, - }) - { - Priority = 1234, - AllowTaskPreemption = true, - MaxParallelTasks = 1234, - DisplayName = "", - UsesTaskDependencies = true, - OnAllTasksComplete = OnAllBatchTasksComplete.NoAction, - OnTaskFailure = OnBatchTaskFailure.NoAction, - NetworkConfiguration = new BatchJobNetworkConfiguration(""), - Constraints = new BatchJobConstraints - { - MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - MaxTaskRetryCount = 1234, - }, - JobManagerTask = new BatchJobManagerTask("", "") - { - DisplayName = "", - ContainerSettings = new BatchTaskContainerSettings("") - { - ContainerRunOptions = "", - Registry = new ContainerRegistryReference - { - Username = "", - Password = "", - RegistryServer = "", - IdentityReference = new BatchNodeIdentityReference - { - ResourceId = "", - }, - }, - WorkingDirectory = ContainerWorkingDirectory.TaskWorkingDirectory, - }, - ResourceFiles = {new ResourceFile -{ -AutoStorageContainerName = "", -StorageContainerUrl = "", -HttpUrl = "", -BlobPrefix = "", -FilePath = "", -FileMode = "", -IdentityReference = default, -}}, - OutputFiles = {new OutputFile("", new OutputFileDestination -{ -Container = new OutputFileBlobContainerDestination("") -{ -Path = "", -IdentityReference = default, -UploadHeaders = {new HttpHeader("") -{ -Value = "", -}}, -}, -}, new OutputFileUploadConfig(OutputFileUploadCondition.TaskSuccess))}, - EnvironmentSettings = {new EnvironmentSetting("") -{ -Value = "", -}}, - Constraints = new BatchTaskConstraints - { - MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - RetentionTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - MaxTaskRetryCount = 1234, - }, - RequiredSlots = 1234, - KillJobOnCompletion = true, - UserIdentity = new UserIdentity - { - Username = "", - AutoUser = new AutoUserSpecification - { - Scope = AutoUserScope.Task, - ElevationLevel = ElevationLevel.NonAdmin, - }, - }, - RunExclusive = true, - ApplicationPackageReferences = {new BatchApplicationPackageReference("") -{ -Version = "", -}}, - AuthenticationTokenSettings = new AuthenticationTokenSettings - { - Access = { AccessScope.Job }, - }, - AllowLowPriorityNode = true, - }, - JobPreparationTask = new BatchJobPreparationTask("") - { - Id = "", - ContainerSettings = default, - ResourceFiles = { default }, - EnvironmentSettings = { default }, - Constraints = default, - WaitForSuccess = true, - UserIdentity = default, - RerunOnNodeRebootAfterSuccess = true, - }, - JobReleaseTask = new BatchJobReleaseTask("") - { - Id = "", - ContainerSettings = default, - ResourceFiles = { default }, - EnvironmentSettings = { default }, - MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - RetentionTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - UserIdentity = default, - }, - CommonEnvironmentSettings = { default }, - Metadata = { default }, - }) - { - Schedule = new BatchJobScheduleConfiguration - { - DoNotRunUntil = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), - DoNotRunAfter = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), - StartWindow = XmlConvert.ToTimeSpan("PT1H23M45S"), - RecurrenceInterval = XmlConvert.ToTimeSpan("PT1H23M45S"), - }, - Metadata = { default }, - }; - Response response = client.ReplaceJobSchedule("", jobSchedule, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_ReplaceJobSchedule_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - BatchJobSchedule jobSchedule = new BatchJobSchedule(new BatchJobSpecification(new BatchPoolInfo - { - PoolId = "", - AutoPoolSpecification = new BatchAutoPoolSpecification(BatchPoolLifetimeOption.JobSchedule) - { - AutoPoolIdPrefix = "", - KeepAlive = true, - Pool = new BatchPoolSpecification("") - { - DisplayName = "", - VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference - { - Publisher = "", - Offer = "", - Sku = "", - Version = "", - VirtualMachineImageId = "", - }, "") - { - WindowsConfiguration = new WindowsConfiguration - { - EnableAutomaticUpdates = true, - }, - DataDisks = {new DataDisk(1234, 1234) -{ -Caching = CachingType.None, -StorageAccountType = StorageAccountType.StandardLRS, -}}, - LicenseType = "", - ContainerConfiguration = new ContainerConfiguration(ContainerType.DockerCompatible) - { - ContainerImageNames = { "" }, - ContainerRegistries = { default }, - }, - DiskEncryptionConfiguration = new DiskEncryptionConfiguration - { - Targets = { DiskEncryptionTarget.OsDisk }, - }, - NodePlacementConfiguration = new BatchNodePlacementConfiguration - { - Policy = BatchNodePlacementPolicyType.Regional, - }, - Extensions = {new VMExtension("", "", "") -{ -TypeHandlerVersion = "", -AutoUpgradeMinorVersion = true, -EnableAutomaticUpgrade = true, -Settings = -{ -["key"] = "" -}, -ProtectedSettings = -{ -["key"] = "" -}, -ProvisionAfterExtensions = {""}, -}}, - OsDisk = new OSDisk - { - EphemeralOSDiskSettings = new DiffDiskSettings - { - Placement = DiffDiskPlacement.CacheDisk, - }, - Caching = CachingType.None, - DiskSizeGB = 1234, - ManagedDisk = new ManagedDisk(StorageAccountType.StandardLRS), - WriteAcceleratorEnabled = true, - }, - SecurityProfile = new SecurityProfile(true, SecurityTypes.TrustedLaunch, new UefiSettings - { - SecureBootEnabled = true, - VTpmEnabled = true, - }), - ServiceArtifactReference = new ServiceArtifactReference(""), - }, - TaskSlotsPerNode = 1234, - TaskSchedulingPolicy = new BatchTaskSchedulingPolicy(BatchNodeFillType.Spread), - ResizeTimeout = XmlConvert.ToTimeSpan("PT1H23M45S"), - ResourceTags = "", - TargetDedicatedNodes = 1234, - TargetLowPriorityNodes = 1234, - EnableAutoScale = true, - AutoScaleFormula = "", - AutoScaleEvaluationInterval = XmlConvert.ToTimeSpan("PT1H23M45S"), - EnableInterNodeCommunication = true, - NetworkConfiguration = new NetworkConfiguration - { - SubnetId = "", - DynamicVNetAssignmentScope = DynamicVNetAssignmentScope.None, - EndpointConfiguration = new BatchPoolEndpointConfiguration(new InboundNatPool[] - { -new InboundNatPool("", InboundEndpointProtocol.Tcp, 1234, 1234, 1234) -{ -NetworkSecurityGroupRules = {new NetworkSecurityGroupRule(1234, NetworkSecurityGroupRuleAccess.Allow, "") -{ -SourcePortRanges = {""}, -}}, -} - }), - PublicIpAddressConfiguration = new PublicIpAddressConfiguration - { - IpAddressProvisioningType = IpAddressProvisioningType.BatchManaged, - IpAddressIds = { "" }, - }, - EnableAcceleratedNetworking = true, - }, - StartTask = new BatchStartTask("") - { - ContainerSettings = default, - ResourceFiles = { default }, - EnvironmentSettings = { default }, - UserIdentity = default, - MaxTaskRetryCount = 1234, - WaitForSuccess = true, - }, - ApplicationPackageReferences = { default }, - UserAccounts = {new UserAccount("", "") -{ -ElevationLevel = ElevationLevel.NonAdmin, -LinuxUserConfiguration = new LinuxUserConfiguration -{ -Uid = 1234, -Gid = 1234, -SshPrivateKey = "", -}, -WindowsUserConfiguration = new WindowsUserConfiguration -{ -LoginMode = LoginMode.Batch, -}, -}}, - Metadata = { new MetadataItem("", "") }, - MountConfiguration = {new MountConfiguration -{ -AzureBlobFileSystemConfiguration = new AzureBlobFileSystemConfiguration("", "", "") -{ -AccountKey = "", -SasKey = "", -BlobfuseOptions = "", -IdentityReference = default, -}, -NfsMountConfiguration = new NfsMountConfiguration("", "") -{ -MountOptions = "", -}, -CifsMountConfiguration = new CifsMountConfiguration("", "", "", "") -{ -MountOptions = "", -}, -AzureFileShareConfiguration = new AzureFileShareConfiguration("", "", "", "") -{ -MountOptions = "", -}, -}}, - TargetNodeCommunicationMode = BatchNodeCommunicationMode.Default, - UpgradePolicy = new UpgradePolicy(UpgradeMode.Automatic) - { - AutomaticOsUpgradePolicy = new AutomaticOsUpgradePolicy - { - DisableAutomaticRollback = true, - EnableAutomaticOsUpgrade = true, - UseRollingUpgradePolicy = true, - OsRollingUpgradeDeferral = true, - }, - RollingUpgradePolicy = new RollingUpgradePolicy - { - EnableCrossZoneUpgrade = true, - MaxBatchInstancePercent = 1234, - MaxUnhealthyInstancePercent = 1234, - MaxUnhealthyUpgradedInstancePercent = 1234, - PauseTimeBetweenBatches = XmlConvert.ToTimeSpan("PT1H23M45S"), - PrioritizeUnhealthyInstances = true, - RollbackFailedInstancesOnPolicyBreach = true, - }, - }, - }, - }, - }) - { - Priority = 1234, - AllowTaskPreemption = true, - MaxParallelTasks = 1234, - DisplayName = "", - UsesTaskDependencies = true, - OnAllTasksComplete = OnAllBatchTasksComplete.NoAction, - OnTaskFailure = OnBatchTaskFailure.NoAction, - NetworkConfiguration = new BatchJobNetworkConfiguration(""), - Constraints = new BatchJobConstraints - { - MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - MaxTaskRetryCount = 1234, - }, - JobManagerTask = new BatchJobManagerTask("", "") - { - DisplayName = "", - ContainerSettings = new BatchTaskContainerSettings("") - { - ContainerRunOptions = "", - Registry = new ContainerRegistryReference - { - Username = "", - Password = "", - RegistryServer = "", - IdentityReference = new BatchNodeIdentityReference - { - ResourceId = "", - }, - }, - WorkingDirectory = ContainerWorkingDirectory.TaskWorkingDirectory, - }, - ResourceFiles = {new ResourceFile -{ -AutoStorageContainerName = "", -StorageContainerUrl = "", -HttpUrl = "", -BlobPrefix = "", -FilePath = "", -FileMode = "", -IdentityReference = default, -}}, - OutputFiles = {new OutputFile("", new OutputFileDestination -{ -Container = new OutputFileBlobContainerDestination("") -{ -Path = "", -IdentityReference = default, -UploadHeaders = {new HttpHeader("") -{ -Value = "", -}}, -}, -}, new OutputFileUploadConfig(OutputFileUploadCondition.TaskSuccess))}, - EnvironmentSettings = {new EnvironmentSetting("") -{ -Value = "", -}}, - Constraints = new BatchTaskConstraints - { - MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - RetentionTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - MaxTaskRetryCount = 1234, - }, - RequiredSlots = 1234, - KillJobOnCompletion = true, - UserIdentity = new UserIdentity - { - Username = "", - AutoUser = new AutoUserSpecification - { - Scope = AutoUserScope.Task, - ElevationLevel = ElevationLevel.NonAdmin, - }, - }, - RunExclusive = true, - ApplicationPackageReferences = {new BatchApplicationPackageReference("") -{ -Version = "", -}}, - AuthenticationTokenSettings = new AuthenticationTokenSettings - { - Access = { AccessScope.Job }, - }, - AllowLowPriorityNode = true, - }, - JobPreparationTask = new BatchJobPreparationTask("") - { - Id = "", - ContainerSettings = default, - ResourceFiles = { default }, - EnvironmentSettings = { default }, - Constraints = default, - WaitForSuccess = true, - UserIdentity = default, - RerunOnNodeRebootAfterSuccess = true, - }, - JobReleaseTask = new BatchJobReleaseTask("") - { - Id = "", - ContainerSettings = default, - ResourceFiles = { default }, - EnvironmentSettings = { default }, - MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - RetentionTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - UserIdentity = default, - }, - CommonEnvironmentSettings = { default }, - Metadata = { default }, - }) - { - Schedule = new BatchJobScheduleConfiguration - { - DoNotRunUntil = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), - DoNotRunAfter = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), - StartWindow = XmlConvert.ToTimeSpan("PT1H23M45S"), - RecurrenceInterval = XmlConvert.ToTimeSpan("PT1H23M45S"), - }, - Metadata = { default }, - }; - Response response = await client.ReplaceJobScheduleAsync("", jobSchedule, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_DisableJobSchedule_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - Response response = client.DisableJobSchedule(""); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_DisableJobSchedule_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - Response response = await client.DisableJobScheduleAsync(""); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_DisableJobSchedule_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - Response response = client.DisableJobSchedule("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_DisableJobSchedule_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - Response response = await client.DisableJobScheduleAsync("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_EnableJobSchedule_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - Response response = client.EnableJobSchedule(""); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_EnableJobSchedule_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - Response response = await client.EnableJobScheduleAsync(""); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_EnableJobSchedule_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - Response response = client.EnableJobSchedule("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_EnableJobSchedule_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - Response response = await client.EnableJobScheduleAsync("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_TerminateJobSchedule_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - Response response = client.TerminateJobSchedule(""); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_TerminateJobSchedule_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - Response response = await client.TerminateJobScheduleAsync(""); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_TerminateJobSchedule_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - Response response = client.TerminateJobSchedule("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_TerminateJobSchedule_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - Response response = await client.TerminateJobScheduleAsync("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_CreateJobSchedule_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - id = "", - schedule = new object(), - jobSpecification = new - { - poolInfo = new object(), - }, - }); - Response response = client.CreateJobSchedule(content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_CreateJobSchedule_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - id = "", - schedule = new object(), - jobSpecification = new - { - poolInfo = new object(), - }, - }); - Response response = await client.CreateJobScheduleAsync(content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_CreateJobSchedule_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - BatchJobScheduleCreateContent jobSchedule = new BatchJobScheduleCreateContent("", new BatchJobScheduleConfiguration(), new BatchJobSpecification(new BatchPoolInfo())); - Response response = client.CreateJobSchedule(jobSchedule); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_CreateJobSchedule_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - BatchJobScheduleCreateContent jobSchedule = new BatchJobScheduleCreateContent("", new BatchJobScheduleConfiguration(), new BatchJobSpecification(new BatchPoolInfo())); - Response response = await client.CreateJobScheduleAsync(jobSchedule); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_CreateJobSchedule_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - id = "", - displayName = "", - schedule = new - { - doNotRunUntil = "2022-05-10T18:57:31.2311892Z", - doNotRunAfter = "2022-05-10T18:57:31.2311892Z", - startWindow = "PT1H23M45S", - recurrenceInterval = "PT1H23M45S", - }, - jobSpecification = new - { - priority = 1234, - allowTaskPreemption = true, - maxParallelTasks = 1234, - displayName = "", - usesTaskDependencies = true, - onAllTasksComplete = "noaction", - onTaskFailure = "noaction", - networkConfiguration = new - { - subnetId = "", - }, - constraints = new - { - maxWallClockTime = "PT1H23M45S", - maxTaskRetryCount = 1234, - }, - jobManagerTask = new - { - id = "", - displayName = "", - commandLine = "", - containerSettings = new - { - containerRunOptions = "", - imageName = "", - registry = new - { - username = "", - password = "", - registryServer = "", - identityReference = new - { - resourceId = "", - }, - }, - workingDirectory = "taskWorkingDirectory", - }, - resourceFiles = new object[] - { -new -{ -autoStorageContainerName = "", -storageContainerUrl = "", -httpUrl = "", -blobPrefix = "", -filePath = "", -fileMode = "", -} - }, - outputFiles = new object[] - { -new -{ -filePattern = "", -destination = new -{ -container = new -{ -path = "", -containerUrl = "", -uploadHeaders = new object[] -{ -new -{ -name = "", -value = "", -} -}, -}, -}, -uploadOptions = new -{ -uploadCondition = "tasksuccess", -}, -} - }, - environmentSettings = new object[] - { -new -{ -name = "", -value = "", -} - }, - constraints = new - { - maxWallClockTime = "PT1H23M45S", - retentionTime = "PT1H23M45S", - maxTaskRetryCount = 1234, - }, - requiredSlots = 1234, - killJobOnCompletion = true, - userIdentity = new - { - username = "", - autoUser = new - { - scope = "task", - elevationLevel = "nonadmin", - }, - }, - runExclusive = true, - applicationPackageReferences = new object[] - { -new -{ -applicationId = "", -version = "", -} - }, - authenticationTokenSettings = new - { - access = new object[] - { -"job" - }, - }, - allowLowPriorityNode = true, - }, - jobPreparationTask = new - { - id = "", - commandLine = "", - resourceFiles = new object[] - { -null - }, - environmentSettings = new object[] - { -null - }, - waitForSuccess = true, - rerunOnNodeRebootAfterSuccess = true, - }, - jobReleaseTask = new - { - id = "", - commandLine = "", - resourceFiles = new object[] - { -null - }, - environmentSettings = new object[] - { -null - }, - maxWallClockTime = "PT1H23M45S", - retentionTime = "PT1H23M45S", - }, - commonEnvironmentSettings = new object[] - { -null - }, - poolInfo = new - { - poolId = "", - autoPoolSpecification = new - { - autoPoolIdPrefix = "", - poolLifetimeOption = "jobschedule", - keepAlive = true, - pool = new - { - displayName = "", - vmSize = "", - virtualMachineConfiguration = new - { - imageReference = new - { - publisher = "", - offer = "", - sku = "", - version = "", - virtualMachineImageId = "", - }, - nodeAgentSKUId = "", - windowsConfiguration = new - { - enableAutomaticUpdates = true, - }, - dataDisks = new object[] - { -new -{ -lun = 1234, -caching = "none", -diskSizeGB = 1234, -storageAccountType = "standard_lrs", -} - }, - licenseType = "", - containerConfiguration = new - { - type = "dockerCompatible", - containerImageNames = new object[] - { -"" - }, - containerRegistries = new object[] - { -null - }, - }, - diskEncryptionConfiguration = new - { - targets = new object[] - { -"osdisk" - }, - }, - nodePlacementConfiguration = new - { - policy = "regional", - }, - extensions = new object[] - { -new -{ -name = "", -publisher = "", -type = "", -typeHandlerVersion = "", -autoUpgradeMinorVersion = true, -enableAutomaticUpgrade = true, -settings = new -{ -key = "", -}, -protectedSettings = new -{ -key = "", -}, -provisionAfterExtensions = new object[] -{ -"" -}, -} - }, - osDisk = new - { - ephemeralOSDiskSettings = new - { - placement = "cachedisk", - }, - caching = "none", - diskSizeGB = 1234, - managedDisk = new - { - storageAccountType = "standard_lrs", - }, - writeAcceleratorEnabled = true, - }, - securityProfile = new - { - encryptionAtHost = true, - securityType = "trustedLaunch", - uefiSettings = new - { - secureBootEnabled = true, - vTpmEnabled = true, - }, - }, - serviceArtifactReference = new - { - id = "", - }, - }, - taskSlotsPerNode = 1234, - taskSchedulingPolicy = new - { - nodeFillType = "spread", - }, - resizeTimeout = "PT1H23M45S", - resourceTags = "", - targetDedicatedNodes = 1234, - targetLowPriorityNodes = 1234, - enableAutoScale = true, - autoScaleFormula = "", - autoScaleEvaluationInterval = "PT1H23M45S", - enableInterNodeCommunication = true, - networkConfiguration = new - { - subnetId = "", - dynamicVNetAssignmentScope = "none", - endpointConfiguration = new - { - inboundNATPools = new object[] - { -new -{ -name = "", -protocol = "tcp", -backendPort = 1234, -frontendPortRangeStart = 1234, -frontendPortRangeEnd = 1234, -networkSecurityGroupRules = new object[] -{ -new -{ -priority = 1234, -access = "allow", -sourceAddressPrefix = "", -sourcePortRanges = new object[] -{ -"" -}, -} -}, -} - }, - }, - publicIPAddressConfiguration = new - { - provision = "batchmanaged", - ipAddressIds = new object[] - { -"" - }, - }, - enableAcceleratedNetworking = true, - }, - startTask = new - { - commandLine = "", - resourceFiles = new object[] - { -null - }, - environmentSettings = new object[] - { -null - }, - maxTaskRetryCount = 1234, - waitForSuccess = true, - }, - applicationPackageReferences = new object[] - { -null - }, - userAccounts = new object[] - { -new -{ -name = "", -password = "", -elevationLevel = "nonadmin", -linuxUserConfiguration = new -{ -uid = 1234, -gid = 1234, -sshPrivateKey = "", -}, -windowsUserConfiguration = new -{ -loginMode = "batch", -}, -} - }, - metadata = new object[] - { -new -{ -name = "", -value = "", -} - }, - mountConfiguration = new object[] - { -new -{ -azureBlobFileSystemConfiguration = new -{ -accountName = "", -containerName = "", -accountKey = "", -sasKey = "", -blobfuseOptions = "", -relativeMountPath = "", -}, -nfsMountConfiguration = new -{ -source = "", -relativeMountPath = "", -mountOptions = "", -}, -cifsMountConfiguration = new -{ -username = "", -source = "", -relativeMountPath = "", -mountOptions = "", -password = "", -}, -azureFileShareConfiguration = new -{ -accountName = "", -azureFileUrl = "", -accountKey = "", -relativeMountPath = "", -mountOptions = "", -}, -} - }, - targetNodeCommunicationMode = "default", - upgradePolicy = new - { - mode = "automatic", - automaticOSUpgradePolicy = new - { - disableAutomaticRollback = true, - enableAutomaticOSUpgrade = true, - useRollingUpgradePolicy = true, - osRollingUpgradeDeferral = true, - }, - rollingUpgradePolicy = new - { - enableCrossZoneUpgrade = true, - maxBatchInstancePercent = 1234, - maxUnhealthyInstancePercent = 1234, - maxUnhealthyUpgradedInstancePercent = 1234, - pauseTimeBetweenBatches = "PT1H23M45S", - prioritizeUnhealthyInstances = true, - rollbackFailedInstancesOnPolicyBreach = true, - }, - }, - }, - }, - }, - metadata = new object[] - { -null - }, - }, - metadata = new object[] - { -null - }, - }); - Response response = client.CreateJobSchedule(content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_CreateJobSchedule_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - id = "", - displayName = "", - schedule = new - { - doNotRunUntil = "2022-05-10T18:57:31.2311892Z", - doNotRunAfter = "2022-05-10T18:57:31.2311892Z", - startWindow = "PT1H23M45S", - recurrenceInterval = "PT1H23M45S", - }, - jobSpecification = new - { - priority = 1234, - allowTaskPreemption = true, - maxParallelTasks = 1234, - displayName = "", - usesTaskDependencies = true, - onAllTasksComplete = "noaction", - onTaskFailure = "noaction", - networkConfiguration = new - { - subnetId = "", - }, - constraints = new - { - maxWallClockTime = "PT1H23M45S", - maxTaskRetryCount = 1234, - }, - jobManagerTask = new - { - id = "", - displayName = "", - commandLine = "", - containerSettings = new - { - containerRunOptions = "", - imageName = "", - registry = new - { - username = "", - password = "", - registryServer = "", - identityReference = new - { - resourceId = "", - }, - }, - workingDirectory = "taskWorkingDirectory", - }, - resourceFiles = new object[] - { -new -{ -autoStorageContainerName = "", -storageContainerUrl = "", -httpUrl = "", -blobPrefix = "", -filePath = "", -fileMode = "", -} - }, - outputFiles = new object[] - { -new -{ -filePattern = "", -destination = new -{ -container = new -{ -path = "", -containerUrl = "", -uploadHeaders = new object[] -{ -new -{ -name = "", -value = "", -} -}, -}, -}, -uploadOptions = new -{ -uploadCondition = "tasksuccess", -}, -} - }, - environmentSettings = new object[] - { -new -{ -name = "", -value = "", -} - }, - constraints = new - { - maxWallClockTime = "PT1H23M45S", - retentionTime = "PT1H23M45S", - maxTaskRetryCount = 1234, - }, - requiredSlots = 1234, - killJobOnCompletion = true, - userIdentity = new - { - username = "", - autoUser = new - { - scope = "task", - elevationLevel = "nonadmin", - }, - }, - runExclusive = true, - applicationPackageReferences = new object[] - { -new -{ -applicationId = "", -version = "", -} - }, - authenticationTokenSettings = new - { - access = new object[] - { -"job" - }, - }, - allowLowPriorityNode = true, - }, - jobPreparationTask = new - { - id = "", - commandLine = "", - resourceFiles = new object[] - { -null - }, - environmentSettings = new object[] - { -null - }, - waitForSuccess = true, - rerunOnNodeRebootAfterSuccess = true, - }, - jobReleaseTask = new - { - id = "", - commandLine = "", - resourceFiles = new object[] - { -null - }, - environmentSettings = new object[] - { -null - }, - maxWallClockTime = "PT1H23M45S", - retentionTime = "PT1H23M45S", - }, - commonEnvironmentSettings = new object[] - { -null - }, - poolInfo = new - { - poolId = "", - autoPoolSpecification = new - { - autoPoolIdPrefix = "", - poolLifetimeOption = "jobschedule", - keepAlive = true, - pool = new - { - displayName = "", - vmSize = "", - virtualMachineConfiguration = new - { - imageReference = new - { - publisher = "", - offer = "", - sku = "", - version = "", - virtualMachineImageId = "", - }, - nodeAgentSKUId = "", - windowsConfiguration = new - { - enableAutomaticUpdates = true, - }, - dataDisks = new object[] - { -new -{ -lun = 1234, -caching = "none", -diskSizeGB = 1234, -storageAccountType = "standard_lrs", -} - }, - licenseType = "", - containerConfiguration = new - { - type = "dockerCompatible", - containerImageNames = new object[] - { -"" - }, - containerRegistries = new object[] - { -null - }, - }, - diskEncryptionConfiguration = new - { - targets = new object[] - { -"osdisk" - }, - }, - nodePlacementConfiguration = new - { - policy = "regional", - }, - extensions = new object[] - { -new -{ -name = "", -publisher = "", -type = "", -typeHandlerVersion = "", -autoUpgradeMinorVersion = true, -enableAutomaticUpgrade = true, -settings = new -{ -key = "", -}, -protectedSettings = new -{ -key = "", -}, -provisionAfterExtensions = new object[] -{ -"" -}, -} - }, - osDisk = new - { - ephemeralOSDiskSettings = new - { - placement = "cachedisk", - }, - caching = "none", - diskSizeGB = 1234, - managedDisk = new - { - storageAccountType = "standard_lrs", - }, - writeAcceleratorEnabled = true, - }, - securityProfile = new - { - encryptionAtHost = true, - securityType = "trustedLaunch", - uefiSettings = new - { - secureBootEnabled = true, - vTpmEnabled = true, - }, - }, - serviceArtifactReference = new - { - id = "", - }, - }, - taskSlotsPerNode = 1234, - taskSchedulingPolicy = new - { - nodeFillType = "spread", - }, - resizeTimeout = "PT1H23M45S", - resourceTags = "", - targetDedicatedNodes = 1234, - targetLowPriorityNodes = 1234, - enableAutoScale = true, - autoScaleFormula = "", - autoScaleEvaluationInterval = "PT1H23M45S", - enableInterNodeCommunication = true, - networkConfiguration = new - { - subnetId = "", - dynamicVNetAssignmentScope = "none", - endpointConfiguration = new - { - inboundNATPools = new object[] - { -new -{ -name = "", -protocol = "tcp", -backendPort = 1234, -frontendPortRangeStart = 1234, -frontendPortRangeEnd = 1234, -networkSecurityGroupRules = new object[] -{ -new -{ -priority = 1234, -access = "allow", -sourceAddressPrefix = "", -sourcePortRanges = new object[] -{ -"" -}, -} -}, -} - }, - }, - publicIPAddressConfiguration = new - { - provision = "batchmanaged", - ipAddressIds = new object[] - { -"" - }, - }, - enableAcceleratedNetworking = true, - }, - startTask = new - { - commandLine = "", - resourceFiles = new object[] - { -null - }, - environmentSettings = new object[] - { -null - }, - maxTaskRetryCount = 1234, - waitForSuccess = true, - }, - applicationPackageReferences = new object[] - { -null - }, - userAccounts = new object[] - { -new -{ -name = "", -password = "", -elevationLevel = "nonadmin", -linuxUserConfiguration = new -{ -uid = 1234, -gid = 1234, -sshPrivateKey = "", -}, -windowsUserConfiguration = new -{ -loginMode = "batch", -}, -} - }, - metadata = new object[] - { -new -{ -name = "", -value = "", -} - }, - mountConfiguration = new object[] - { -new -{ -azureBlobFileSystemConfiguration = new -{ -accountName = "", -containerName = "", -accountKey = "", -sasKey = "", -blobfuseOptions = "", -relativeMountPath = "", -}, -nfsMountConfiguration = new -{ -source = "", -relativeMountPath = "", -mountOptions = "", -}, -cifsMountConfiguration = new -{ -username = "", -source = "", -relativeMountPath = "", -mountOptions = "", -password = "", -}, -azureFileShareConfiguration = new -{ -accountName = "", -azureFileUrl = "", -accountKey = "", -relativeMountPath = "", -mountOptions = "", -}, -} - }, - targetNodeCommunicationMode = "default", - upgradePolicy = new - { - mode = "automatic", - automaticOSUpgradePolicy = new - { - disableAutomaticRollback = true, - enableAutomaticOSUpgrade = true, - useRollingUpgradePolicy = true, - osRollingUpgradeDeferral = true, - }, - rollingUpgradePolicy = new - { - enableCrossZoneUpgrade = true, - maxBatchInstancePercent = 1234, - maxUnhealthyInstancePercent = 1234, - maxUnhealthyUpgradedInstancePercent = 1234, - pauseTimeBetweenBatches = "PT1H23M45S", - prioritizeUnhealthyInstances = true, - rollbackFailedInstancesOnPolicyBreach = true, - }, - }, - }, - }, - }, - metadata = new object[] - { -null - }, - }, - metadata = new object[] - { -null - }, - }); - Response response = await client.CreateJobScheduleAsync(content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_CreateJobSchedule_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - BatchJobScheduleCreateContent jobSchedule = new BatchJobScheduleCreateContent("", new BatchJobScheduleConfiguration - { - DoNotRunUntil = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), - DoNotRunAfter = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), - StartWindow = XmlConvert.ToTimeSpan("PT1H23M45S"), - RecurrenceInterval = XmlConvert.ToTimeSpan("PT1H23M45S"), - }, new BatchJobSpecification(new BatchPoolInfo - { - PoolId = "", - AutoPoolSpecification = new BatchAutoPoolSpecification(BatchPoolLifetimeOption.JobSchedule) - { - AutoPoolIdPrefix = "", - KeepAlive = true, - Pool = new BatchPoolSpecification("") - { - DisplayName = "", - VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference - { - Publisher = "", - Offer = "", - Sku = "", - Version = "", - VirtualMachineImageId = "", - }, "") - { - WindowsConfiguration = new WindowsConfiguration - { - EnableAutomaticUpdates = true, - }, - DataDisks = {new DataDisk(1234, 1234) -{ -Caching = CachingType.None, -StorageAccountType = StorageAccountType.StandardLRS, -}}, - LicenseType = "", - ContainerConfiguration = new ContainerConfiguration(ContainerType.DockerCompatible) - { - ContainerImageNames = { "" }, - ContainerRegistries = { default }, - }, - DiskEncryptionConfiguration = new DiskEncryptionConfiguration - { - Targets = { DiskEncryptionTarget.OsDisk }, - }, - NodePlacementConfiguration = new BatchNodePlacementConfiguration - { - Policy = BatchNodePlacementPolicyType.Regional, - }, - Extensions = {new VMExtension("", "", "") -{ -TypeHandlerVersion = "", -AutoUpgradeMinorVersion = true, -EnableAutomaticUpgrade = true, -Settings = -{ -["key"] = "" -}, -ProtectedSettings = -{ -["key"] = "" -}, -ProvisionAfterExtensions = {""}, -}}, - OsDisk = new OSDisk - { - EphemeralOSDiskSettings = new DiffDiskSettings - { - Placement = DiffDiskPlacement.CacheDisk, - }, - Caching = CachingType.None, - DiskSizeGB = 1234, - ManagedDisk = new ManagedDisk(StorageAccountType.StandardLRS), - WriteAcceleratorEnabled = true, - }, - SecurityProfile = new SecurityProfile(true, SecurityTypes.TrustedLaunch, new UefiSettings - { - SecureBootEnabled = true, - VTpmEnabled = true, - }), - ServiceArtifactReference = new ServiceArtifactReference(""), - }, - TaskSlotsPerNode = 1234, - TaskSchedulingPolicy = new BatchTaskSchedulingPolicy(BatchNodeFillType.Spread), - ResizeTimeout = XmlConvert.ToTimeSpan("PT1H23M45S"), - ResourceTags = "", - TargetDedicatedNodes = 1234, - TargetLowPriorityNodes = 1234, - EnableAutoScale = true, - AutoScaleFormula = "", - AutoScaleEvaluationInterval = XmlConvert.ToTimeSpan("PT1H23M45S"), - EnableInterNodeCommunication = true, - NetworkConfiguration = new NetworkConfiguration - { - SubnetId = "", - DynamicVNetAssignmentScope = DynamicVNetAssignmentScope.None, - EndpointConfiguration = new BatchPoolEndpointConfiguration(new InboundNatPool[] - { -new InboundNatPool("", InboundEndpointProtocol.Tcp, 1234, 1234, 1234) -{ -NetworkSecurityGroupRules = {new NetworkSecurityGroupRule(1234, NetworkSecurityGroupRuleAccess.Allow, "") -{ -SourcePortRanges = {""}, -}}, -} - }), - PublicIpAddressConfiguration = new PublicIpAddressConfiguration - { - IpAddressProvisioningType = IpAddressProvisioningType.BatchManaged, - IpAddressIds = { "" }, - }, - EnableAcceleratedNetworking = true, - }, - StartTask = new BatchStartTask("") - { - ContainerSettings = default, - ResourceFiles = { default }, - EnvironmentSettings = { default }, - UserIdentity = default, - MaxTaskRetryCount = 1234, - WaitForSuccess = true, - }, - ApplicationPackageReferences = { default }, - UserAccounts = {new UserAccount("", "") -{ -ElevationLevel = ElevationLevel.NonAdmin, -LinuxUserConfiguration = new LinuxUserConfiguration -{ -Uid = 1234, -Gid = 1234, -SshPrivateKey = "", -}, -WindowsUserConfiguration = new WindowsUserConfiguration -{ -LoginMode = LoginMode.Batch, -}, -}}, - Metadata = { new MetadataItem("", "") }, - MountConfiguration = {new MountConfiguration -{ -AzureBlobFileSystemConfiguration = new AzureBlobFileSystemConfiguration("", "", "") -{ -AccountKey = "", -SasKey = "", -BlobfuseOptions = "", -IdentityReference = default, -}, -NfsMountConfiguration = new NfsMountConfiguration("", "") -{ -MountOptions = "", -}, -CifsMountConfiguration = new CifsMountConfiguration("", "", "", "") -{ -MountOptions = "", -}, -AzureFileShareConfiguration = new AzureFileShareConfiguration("", "", "", "") -{ -MountOptions = "", -}, -}}, - TargetNodeCommunicationMode = BatchNodeCommunicationMode.Default, - UpgradePolicy = new UpgradePolicy(UpgradeMode.Automatic) - { - AutomaticOsUpgradePolicy = new AutomaticOsUpgradePolicy - { - DisableAutomaticRollback = true, - EnableAutomaticOsUpgrade = true, - UseRollingUpgradePolicy = true, - OsRollingUpgradeDeferral = true, - }, - RollingUpgradePolicy = new RollingUpgradePolicy - { - EnableCrossZoneUpgrade = true, - MaxBatchInstancePercent = 1234, - MaxUnhealthyInstancePercent = 1234, - MaxUnhealthyUpgradedInstancePercent = 1234, - PauseTimeBetweenBatches = XmlConvert.ToTimeSpan("PT1H23M45S"), - PrioritizeUnhealthyInstances = true, - RollbackFailedInstancesOnPolicyBreach = true, - }, - }, - }, - }, - }) - { - Priority = 1234, - AllowTaskPreemption = true, - MaxParallelTasks = 1234, - DisplayName = "", - UsesTaskDependencies = true, - OnAllTasksComplete = OnAllBatchTasksComplete.NoAction, - OnTaskFailure = OnBatchTaskFailure.NoAction, - NetworkConfiguration = new BatchJobNetworkConfiguration(""), - Constraints = new BatchJobConstraints - { - MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - MaxTaskRetryCount = 1234, - }, - JobManagerTask = new BatchJobManagerTask("", "") - { - DisplayName = "", - ContainerSettings = new BatchTaskContainerSettings("") - { - ContainerRunOptions = "", - Registry = new ContainerRegistryReference - { - Username = "", - Password = "", - RegistryServer = "", - IdentityReference = new BatchNodeIdentityReference - { - ResourceId = "", - }, - }, - WorkingDirectory = ContainerWorkingDirectory.TaskWorkingDirectory, - }, - ResourceFiles = {new ResourceFile -{ -AutoStorageContainerName = "", -StorageContainerUrl = "", -HttpUrl = "", -BlobPrefix = "", -FilePath = "", -FileMode = "", -IdentityReference = default, -}}, - OutputFiles = {new OutputFile("", new OutputFileDestination -{ -Container = new OutputFileBlobContainerDestination("") -{ -Path = "", -IdentityReference = default, -UploadHeaders = {new HttpHeader("") -{ -Value = "", -}}, -}, -}, new OutputFileUploadConfig(OutputFileUploadCondition.TaskSuccess))}, - EnvironmentSettings = {new EnvironmentSetting("") -{ -Value = "", -}}, - Constraints = new BatchTaskConstraints - { - MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - RetentionTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - MaxTaskRetryCount = 1234, - }, - RequiredSlots = 1234, - KillJobOnCompletion = true, - UserIdentity = new UserIdentity - { - Username = "", - AutoUser = new AutoUserSpecification - { - Scope = AutoUserScope.Task, - ElevationLevel = ElevationLevel.NonAdmin, - }, - }, - RunExclusive = true, - ApplicationPackageReferences = {new BatchApplicationPackageReference("") -{ -Version = "", -}}, - AuthenticationTokenSettings = new AuthenticationTokenSettings - { - Access = { AccessScope.Job }, - }, - AllowLowPriorityNode = true, - }, - JobPreparationTask = new BatchJobPreparationTask("") - { - Id = "", - ContainerSettings = default, - ResourceFiles = { default }, - EnvironmentSettings = { default }, - Constraints = default, - WaitForSuccess = true, - UserIdentity = default, - RerunOnNodeRebootAfterSuccess = true, - }, - JobReleaseTask = new BatchJobReleaseTask("") - { - Id = "", - ContainerSettings = default, - ResourceFiles = { default }, - EnvironmentSettings = { default }, - MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - RetentionTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - UserIdentity = default, - }, - CommonEnvironmentSettings = { default }, - Metadata = { default }, - }) - { - DisplayName = "", - Metadata = { default }, - }; - Response response = client.CreateJobSchedule(jobSchedule, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_CreateJobSchedule_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - BatchJobScheduleCreateContent jobSchedule = new BatchJobScheduleCreateContent("", new BatchJobScheduleConfiguration - { - DoNotRunUntil = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), - DoNotRunAfter = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), - StartWindow = XmlConvert.ToTimeSpan("PT1H23M45S"), - RecurrenceInterval = XmlConvert.ToTimeSpan("PT1H23M45S"), - }, new BatchJobSpecification(new BatchPoolInfo - { - PoolId = "", - AutoPoolSpecification = new BatchAutoPoolSpecification(BatchPoolLifetimeOption.JobSchedule) - { - AutoPoolIdPrefix = "", - KeepAlive = true, - Pool = new BatchPoolSpecification("") - { - DisplayName = "", - VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference - { - Publisher = "", - Offer = "", - Sku = "", - Version = "", - VirtualMachineImageId = "", - }, "") - { - WindowsConfiguration = new WindowsConfiguration - { - EnableAutomaticUpdates = true, - }, - DataDisks = {new DataDisk(1234, 1234) -{ -Caching = CachingType.None, -StorageAccountType = StorageAccountType.StandardLRS, -}}, - LicenseType = "", - ContainerConfiguration = new ContainerConfiguration(ContainerType.DockerCompatible) - { - ContainerImageNames = { "" }, - ContainerRegistries = { default }, - }, - DiskEncryptionConfiguration = new DiskEncryptionConfiguration - { - Targets = { DiskEncryptionTarget.OsDisk }, - }, - NodePlacementConfiguration = new BatchNodePlacementConfiguration - { - Policy = BatchNodePlacementPolicyType.Regional, - }, - Extensions = {new VMExtension("", "", "") -{ -TypeHandlerVersion = "", -AutoUpgradeMinorVersion = true, -EnableAutomaticUpgrade = true, -Settings = -{ -["key"] = "" -}, -ProtectedSettings = -{ -["key"] = "" -}, -ProvisionAfterExtensions = {""}, -}}, - OsDisk = new OSDisk - { - EphemeralOSDiskSettings = new DiffDiskSettings - { - Placement = DiffDiskPlacement.CacheDisk, - }, - Caching = CachingType.None, - DiskSizeGB = 1234, - ManagedDisk = new ManagedDisk(StorageAccountType.StandardLRS), - WriteAcceleratorEnabled = true, - }, - SecurityProfile = new SecurityProfile(true, SecurityTypes.TrustedLaunch, new UefiSettings - { - SecureBootEnabled = true, - VTpmEnabled = true, - }), - ServiceArtifactReference = new ServiceArtifactReference(""), - }, - TaskSlotsPerNode = 1234, - TaskSchedulingPolicy = new BatchTaskSchedulingPolicy(BatchNodeFillType.Spread), - ResizeTimeout = XmlConvert.ToTimeSpan("PT1H23M45S"), - ResourceTags = "", - TargetDedicatedNodes = 1234, - TargetLowPriorityNodes = 1234, - EnableAutoScale = true, - AutoScaleFormula = "", - AutoScaleEvaluationInterval = XmlConvert.ToTimeSpan("PT1H23M45S"), - EnableInterNodeCommunication = true, - NetworkConfiguration = new NetworkConfiguration - { - SubnetId = "", - DynamicVNetAssignmentScope = DynamicVNetAssignmentScope.None, - EndpointConfiguration = new BatchPoolEndpointConfiguration(new InboundNatPool[] - { -new InboundNatPool("", InboundEndpointProtocol.Tcp, 1234, 1234, 1234) -{ -NetworkSecurityGroupRules = {new NetworkSecurityGroupRule(1234, NetworkSecurityGroupRuleAccess.Allow, "") -{ -SourcePortRanges = {""}, -}}, -} - }), - PublicIpAddressConfiguration = new PublicIpAddressConfiguration - { - IpAddressProvisioningType = IpAddressProvisioningType.BatchManaged, - IpAddressIds = { "" }, - }, - EnableAcceleratedNetworking = true, - }, - StartTask = new BatchStartTask("") - { - ContainerSettings = default, - ResourceFiles = { default }, - EnvironmentSettings = { default }, - UserIdentity = default, - MaxTaskRetryCount = 1234, - WaitForSuccess = true, - }, - ApplicationPackageReferences = { default }, - UserAccounts = {new UserAccount("", "") -{ -ElevationLevel = ElevationLevel.NonAdmin, -LinuxUserConfiguration = new LinuxUserConfiguration -{ -Uid = 1234, -Gid = 1234, -SshPrivateKey = "", -}, -WindowsUserConfiguration = new WindowsUserConfiguration -{ -LoginMode = LoginMode.Batch, -}, -}}, - Metadata = { new MetadataItem("", "") }, - MountConfiguration = {new MountConfiguration -{ -AzureBlobFileSystemConfiguration = new AzureBlobFileSystemConfiguration("", "", "") -{ -AccountKey = "", -SasKey = "", -BlobfuseOptions = "", -IdentityReference = default, -}, -NfsMountConfiguration = new NfsMountConfiguration("", "") -{ -MountOptions = "", -}, -CifsMountConfiguration = new CifsMountConfiguration("", "", "", "") -{ -MountOptions = "", -}, -AzureFileShareConfiguration = new AzureFileShareConfiguration("", "", "", "") -{ -MountOptions = "", -}, -}}, - TargetNodeCommunicationMode = BatchNodeCommunicationMode.Default, - UpgradePolicy = new UpgradePolicy(UpgradeMode.Automatic) - { - AutomaticOsUpgradePolicy = new AutomaticOsUpgradePolicy - { - DisableAutomaticRollback = true, - EnableAutomaticOsUpgrade = true, - UseRollingUpgradePolicy = true, - OsRollingUpgradeDeferral = true, - }, - RollingUpgradePolicy = new RollingUpgradePolicy - { - EnableCrossZoneUpgrade = true, - MaxBatchInstancePercent = 1234, - MaxUnhealthyInstancePercent = 1234, - MaxUnhealthyUpgradedInstancePercent = 1234, - PauseTimeBetweenBatches = XmlConvert.ToTimeSpan("PT1H23M45S"), - PrioritizeUnhealthyInstances = true, - RollbackFailedInstancesOnPolicyBreach = true, - }, - }, - }, - }, - }) - { - Priority = 1234, - AllowTaskPreemption = true, - MaxParallelTasks = 1234, - DisplayName = "", - UsesTaskDependencies = true, - OnAllTasksComplete = OnAllBatchTasksComplete.NoAction, - OnTaskFailure = OnBatchTaskFailure.NoAction, - NetworkConfiguration = new BatchJobNetworkConfiguration(""), - Constraints = new BatchJobConstraints - { - MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - MaxTaskRetryCount = 1234, - }, - JobManagerTask = new BatchJobManagerTask("", "") - { - DisplayName = "", - ContainerSettings = new BatchTaskContainerSettings("") - { - ContainerRunOptions = "", - Registry = new ContainerRegistryReference - { - Username = "", - Password = "", - RegistryServer = "", - IdentityReference = new BatchNodeIdentityReference - { - ResourceId = "", - }, - }, - WorkingDirectory = ContainerWorkingDirectory.TaskWorkingDirectory, - }, - ResourceFiles = {new ResourceFile -{ -AutoStorageContainerName = "", -StorageContainerUrl = "", -HttpUrl = "", -BlobPrefix = "", -FilePath = "", -FileMode = "", -IdentityReference = default, -}}, - OutputFiles = {new OutputFile("", new OutputFileDestination -{ -Container = new OutputFileBlobContainerDestination("") -{ -Path = "", -IdentityReference = default, -UploadHeaders = {new HttpHeader("") -{ -Value = "", -}}, -}, -}, new OutputFileUploadConfig(OutputFileUploadCondition.TaskSuccess))}, - EnvironmentSettings = {new EnvironmentSetting("") -{ -Value = "", -}}, - Constraints = new BatchTaskConstraints - { - MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - RetentionTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - MaxTaskRetryCount = 1234, - }, - RequiredSlots = 1234, - KillJobOnCompletion = true, - UserIdentity = new UserIdentity - { - Username = "", - AutoUser = new AutoUserSpecification - { - Scope = AutoUserScope.Task, - ElevationLevel = ElevationLevel.NonAdmin, - }, - }, - RunExclusive = true, - ApplicationPackageReferences = {new BatchApplicationPackageReference("") -{ -Version = "", -}}, - AuthenticationTokenSettings = new AuthenticationTokenSettings - { - Access = { AccessScope.Job }, - }, - AllowLowPriorityNode = true, - }, - JobPreparationTask = new BatchJobPreparationTask("") - { - Id = "", - ContainerSettings = default, - ResourceFiles = { default }, - EnvironmentSettings = { default }, - Constraints = default, - WaitForSuccess = true, - UserIdentity = default, - RerunOnNodeRebootAfterSuccess = true, - }, - JobReleaseTask = new BatchJobReleaseTask("") - { - Id = "", - ContainerSettings = default, - ResourceFiles = { default }, - EnvironmentSettings = { default }, - MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - RetentionTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - UserIdentity = default, - }, - CommonEnvironmentSettings = { default }, - Metadata = { default }, - }) - { - DisplayName = "", - Metadata = { default }, - }; - Response response = await client.CreateJobScheduleAsync(jobSchedule, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_CreateTask_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - id = "", - commandLine = "", - }); - Response response = client.CreateTask("", content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_CreateTask_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - id = "", - commandLine = "", - }); - Response response = await client.CreateTaskAsync("", content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_CreateTask_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - BatchTaskCreateContent task = new BatchTaskCreateContent("", ""); - Response response = client.CreateTask("", task); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_CreateTask_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - BatchTaskCreateContent task = new BatchTaskCreateContent("", ""); - Response response = await client.CreateTaskAsync("", task); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_CreateTask_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - id = "", - displayName = "", - exitConditions = new Dictionary - { - ["exitCodes"] = new object[] - { -new -{ -code = 1234, -exitOptions = new -{ -jobAction = "none", -dependencyAction = "satisfy", -}, -} - }, - ["exitCodeRanges"] = new object[] - { -new -{ -start = 1234, -end = 1234, -} - }, - ["preProcessingError"] = null, - ["fileUploadError"] = null, - ["default"] = null - }, - commandLine = "", - containerSettings = new - { - containerRunOptions = "", - imageName = "", - registry = new - { - username = "", - password = "", - registryServer = "", - identityReference = new - { - resourceId = "", - }, - }, - workingDirectory = "taskWorkingDirectory", - }, - resourceFiles = new object[] - { -new -{ -autoStorageContainerName = "", -storageContainerUrl = "", -httpUrl = "", -blobPrefix = "", -filePath = "", -fileMode = "", -} - }, - outputFiles = new object[] - { -new -{ -filePattern = "", -destination = new -{ -container = new -{ -path = "", -containerUrl = "", -uploadHeaders = new object[] -{ -new -{ -name = "", -value = "", -} -}, -}, -}, -uploadOptions = new -{ -uploadCondition = "tasksuccess", -}, -} - }, - environmentSettings = new object[] - { -new -{ -name = "", -value = "", -} - }, - affinityInfo = new - { - affinityId = "", - }, - constraints = new - { - maxWallClockTime = "PT1H23M45S", - retentionTime = "PT1H23M45S", - maxTaskRetryCount = 1234, - }, - requiredSlots = 1234, - userIdentity = new - { - username = "", - autoUser = new - { - scope = "task", - elevationLevel = "nonadmin", - }, - }, - multiInstanceSettings = new - { - numberOfInstances = 1234, - coordinationCommandLine = "", - commonResourceFiles = new object[] - { -null - }, - }, - dependsOn = new - { - taskIds = new object[] - { -"" - }, - taskIdRanges = new object[] - { -new -{ -start = 1234, -end = 1234, -} - }, - }, - applicationPackageReferences = new object[] - { -new -{ -applicationId = "", -version = "", -} - }, - authenticationTokenSettings = new - { - access = new object[] - { -"job" - }, - }, - }); - Response response = client.CreateTask("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_CreateTask_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - id = "", - displayName = "", - exitConditions = new Dictionary - { - ["exitCodes"] = new object[] - { -new -{ -code = 1234, -exitOptions = new -{ -jobAction = "none", -dependencyAction = "satisfy", -}, -} - }, - ["exitCodeRanges"] = new object[] - { -new -{ -start = 1234, -end = 1234, -} - }, - ["preProcessingError"] = null, - ["fileUploadError"] = null, - ["default"] = null - }, - commandLine = "", - containerSettings = new - { - containerRunOptions = "", - imageName = "", - registry = new - { - username = "", - password = "", - registryServer = "", - identityReference = new - { - resourceId = "", - }, - }, - workingDirectory = "taskWorkingDirectory", - }, - resourceFiles = new object[] - { -new -{ -autoStorageContainerName = "", -storageContainerUrl = "", -httpUrl = "", -blobPrefix = "", -filePath = "", -fileMode = "", -} - }, - outputFiles = new object[] - { -new -{ -filePattern = "", -destination = new -{ -container = new -{ -path = "", -containerUrl = "", -uploadHeaders = new object[] -{ -new -{ -name = "", -value = "", -} -}, -}, -}, -uploadOptions = new -{ -uploadCondition = "tasksuccess", -}, -} - }, - environmentSettings = new object[] - { -new -{ -name = "", -value = "", -} - }, - affinityInfo = new - { - affinityId = "", - }, - constraints = new - { - maxWallClockTime = "PT1H23M45S", - retentionTime = "PT1H23M45S", - maxTaskRetryCount = 1234, - }, - requiredSlots = 1234, - userIdentity = new - { - username = "", - autoUser = new - { - scope = "task", - elevationLevel = "nonadmin", - }, - }, - multiInstanceSettings = new - { - numberOfInstances = 1234, - coordinationCommandLine = "", - commonResourceFiles = new object[] - { -null - }, - }, - dependsOn = new - { - taskIds = new object[] - { -"" - }, - taskIdRanges = new object[] - { -new -{ -start = 1234, -end = 1234, -} - }, - }, - applicationPackageReferences = new object[] - { -new -{ -applicationId = "", -version = "", -} - }, - authenticationTokenSettings = new - { - access = new object[] - { -"job" - }, - }, - }); - Response response = await client.CreateTaskAsync("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_CreateTask_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - BatchTaskCreateContent task = new BatchTaskCreateContent("", "") - { - DisplayName = "", - ExitConditions = new ExitConditions - { - ExitCodes = {new ExitCodeMapping(1234, new ExitOptions -{ -JobAction = BatchJobAction.None, -DependencyAction = DependencyAction.Satisfy, -})}, - ExitCodeRanges = { new ExitCodeRangeMapping(1234, 1234, default) }, - PreProcessingError = default, - FileUploadError = default, - Default = default, - }, - ContainerSettings = new BatchTaskContainerSettings("") - { - ContainerRunOptions = "", - Registry = new ContainerRegistryReference - { - Username = "", - Password = "", - RegistryServer = "", - IdentityReference = new BatchNodeIdentityReference - { - ResourceId = "", - }, - }, - WorkingDirectory = ContainerWorkingDirectory.TaskWorkingDirectory, - }, - ResourceFiles = {new ResourceFile -{ -AutoStorageContainerName = "", -StorageContainerUrl = "", -HttpUrl = "", -BlobPrefix = "", -FilePath = "", -FileMode = "", -IdentityReference = default, -}}, - OutputFiles = {new OutputFile("", new OutputFileDestination -{ -Container = new OutputFileBlobContainerDestination("") -{ -Path = "", -IdentityReference = default, -UploadHeaders = {new HttpHeader("") -{ -Value = "", -}}, -}, -}, new OutputFileUploadConfig(OutputFileUploadCondition.TaskSuccess))}, - EnvironmentSettings = {new EnvironmentSetting("") -{ -Value = "", -}}, - AffinityInfo = new AffinityInfo(""), - Constraints = new BatchTaskConstraints - { - MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - RetentionTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - MaxTaskRetryCount = 1234, - }, - RequiredSlots = 1234, - UserIdentity = new UserIdentity - { - Username = "", - AutoUser = new AutoUserSpecification - { - Scope = AutoUserScope.Task, - ElevationLevel = ElevationLevel.NonAdmin, - }, - }, - MultiInstanceSettings = new MultiInstanceSettings("") - { - NumberOfInstances = 1234, - CommonResourceFiles = { default }, - }, - DependsOn = new BatchTaskDependencies - { - TaskIds = { "" }, - TaskIdRanges = { new BatchTaskIdRange(1234, 1234) }, - }, - ApplicationPackageReferences = {new BatchApplicationPackageReference("") -{ -Version = "", -}}, - AuthenticationTokenSettings = new AuthenticationTokenSettings - { - Access = { AccessScope.Job }, - }, - }; - Response response = client.CreateTask("", task, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_CreateTask_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - BatchTaskCreateContent task = new BatchTaskCreateContent("", "") - { - DisplayName = "", - ExitConditions = new ExitConditions - { - ExitCodes = {new ExitCodeMapping(1234, new ExitOptions -{ -JobAction = BatchJobAction.None, -DependencyAction = DependencyAction.Satisfy, -})}, - ExitCodeRanges = { new ExitCodeRangeMapping(1234, 1234, default) }, - PreProcessingError = default, - FileUploadError = default, - Default = default, - }, - ContainerSettings = new BatchTaskContainerSettings("") - { - ContainerRunOptions = "", - Registry = new ContainerRegistryReference - { - Username = "", - Password = "", - RegistryServer = "", - IdentityReference = new BatchNodeIdentityReference - { - ResourceId = "", - }, - }, - WorkingDirectory = ContainerWorkingDirectory.TaskWorkingDirectory, - }, - ResourceFiles = {new ResourceFile -{ -AutoStorageContainerName = "", -StorageContainerUrl = "", -HttpUrl = "", -BlobPrefix = "", -FilePath = "", -FileMode = "", -IdentityReference = default, -}}, - OutputFiles = {new OutputFile("", new OutputFileDestination -{ -Container = new OutputFileBlobContainerDestination("") -{ -Path = "", -IdentityReference = default, -UploadHeaders = {new HttpHeader("") -{ -Value = "", -}}, -}, -}, new OutputFileUploadConfig(OutputFileUploadCondition.TaskSuccess))}, - EnvironmentSettings = {new EnvironmentSetting("") -{ -Value = "", -}}, - AffinityInfo = new AffinityInfo(""), - Constraints = new BatchTaskConstraints - { - MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - RetentionTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - MaxTaskRetryCount = 1234, - }, - RequiredSlots = 1234, - UserIdentity = new UserIdentity - { - Username = "", - AutoUser = new AutoUserSpecification - { - Scope = AutoUserScope.Task, - ElevationLevel = ElevationLevel.NonAdmin, - }, - }, - MultiInstanceSettings = new MultiInstanceSettings("") - { - NumberOfInstances = 1234, - CommonResourceFiles = { default }, - }, - DependsOn = new BatchTaskDependencies - { - TaskIds = { "" }, - TaskIdRanges = { new BatchTaskIdRange(1234, 1234) }, - }, - ApplicationPackageReferences = {new BatchApplicationPackageReference("") -{ -Version = "", -}}, - AuthenticationTokenSettings = new AuthenticationTokenSettings - { - Access = { AccessScope.Job }, - }, - }; - Response response = await client.CreateTaskAsync("", task, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_CreateTaskCollection_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - value = new object[] - { -new -{ -id = "", -commandLine = "", -} - }, - }); - Response response = client.CreateTaskCollection("", content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_CreateTaskCollection_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - value = new object[] - { -new -{ -id = "", -commandLine = "", -} - }, - }); - Response response = await client.CreateTaskCollectionAsync("", content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_CreateTaskCollection_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - BatchTaskGroup taskCollection = new BatchTaskGroup(new BatchTaskCreateContent[] - { -new BatchTaskCreateContent("", "") - }); - Response response = client.CreateTaskCollection("", taskCollection); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_CreateTaskCollection_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - BatchTaskGroup taskCollection = new BatchTaskGroup(new BatchTaskCreateContent[] - { -new BatchTaskCreateContent("", "") - }); - Response response = await client.CreateTaskCollectionAsync("", taskCollection); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_CreateTaskCollection_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - value = new object[] - { -new -{ -id = "", -displayName = "", -exitConditions = new Dictionary -{ -["exitCodes"] = new object[] -{ -new -{ -code = 1234, -exitOptions = new -{ -jobAction = "none", -dependencyAction = "satisfy", -}, -} -}, -["exitCodeRanges"] = new object[] -{ -new -{ -start = 1234, -end = 1234, -} -}, -["preProcessingError"] = null, -["fileUploadError"] = null, -["default"] = null -}, -commandLine = "", -containerSettings = new -{ -containerRunOptions = "", -imageName = "", -registry = new -{ -username = "", -password = "", -registryServer = "", -identityReference = new -{ -resourceId = "", -}, -}, -workingDirectory = "taskWorkingDirectory", -}, -resourceFiles = new object[] -{ -new -{ -autoStorageContainerName = "", -storageContainerUrl = "", -httpUrl = "", -blobPrefix = "", -filePath = "", -fileMode = "", -} -}, -outputFiles = new object[] -{ -new -{ -filePattern = "", -destination = new -{ -container = new -{ -path = "", -containerUrl = "", -uploadHeaders = new object[] -{ -new -{ -name = "", -value = "", -} -}, -}, -}, -uploadOptions = new -{ -uploadCondition = "tasksuccess", -}, -} -}, -environmentSettings = new object[] -{ -new -{ -name = "", -value = "", -} -}, -affinityInfo = new -{ -affinityId = "", -}, -constraints = new -{ -maxWallClockTime = "PT1H23M45S", -retentionTime = "PT1H23M45S", -maxTaskRetryCount = 1234, -}, -requiredSlots = 1234, -userIdentity = new -{ -username = "", -autoUser = new -{ -scope = "task", -elevationLevel = "nonadmin", -}, -}, -multiInstanceSettings = new -{ -numberOfInstances = 1234, -coordinationCommandLine = "", -commonResourceFiles = new object[] -{ -null -}, -}, -dependsOn = new -{ -taskIds = new object[] -{ -"" -}, -taskIdRanges = new object[] -{ -new -{ -start = 1234, -end = 1234, -} -}, -}, -applicationPackageReferences = new object[] -{ -new -{ -applicationId = "", -version = "", -} -}, -authenticationTokenSettings = new -{ -access = new object[] -{ -"job" -}, -}, -} - }, - }); - Response response = client.CreateTaskCollection("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("value")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("taskId").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("lastModified").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("location").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("error").GetProperty("message").GetProperty("lang").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("error").GetProperty("message").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("error").GetProperty("values")[0].GetProperty("key").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("error").GetProperty("values")[0].GetProperty("value").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_CreateTaskCollection_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - value = new object[] - { -new -{ -id = "", -displayName = "", -exitConditions = new Dictionary -{ -["exitCodes"] = new object[] -{ -new -{ -code = 1234, -exitOptions = new -{ -jobAction = "none", -dependencyAction = "satisfy", -}, -} -}, -["exitCodeRanges"] = new object[] -{ -new -{ -start = 1234, -end = 1234, -} -}, -["preProcessingError"] = null, -["fileUploadError"] = null, -["default"] = null -}, -commandLine = "", -containerSettings = new -{ -containerRunOptions = "", -imageName = "", -registry = new -{ -username = "", -password = "", -registryServer = "", -identityReference = new -{ -resourceId = "", -}, -}, -workingDirectory = "taskWorkingDirectory", -}, -resourceFiles = new object[] -{ -new -{ -autoStorageContainerName = "", -storageContainerUrl = "", -httpUrl = "", -blobPrefix = "", -filePath = "", -fileMode = "", -} -}, -outputFiles = new object[] -{ -new -{ -filePattern = "", -destination = new -{ -container = new -{ -path = "", -containerUrl = "", -uploadHeaders = new object[] -{ -new -{ -name = "", -value = "", -} -}, -}, -}, -uploadOptions = new -{ -uploadCondition = "tasksuccess", -}, -} -}, -environmentSettings = new object[] -{ -new -{ -name = "", -value = "", -} -}, -affinityInfo = new -{ -affinityId = "", -}, -constraints = new -{ -maxWallClockTime = "PT1H23M45S", -retentionTime = "PT1H23M45S", -maxTaskRetryCount = 1234, -}, -requiredSlots = 1234, -userIdentity = new -{ -username = "", -autoUser = new -{ -scope = "task", -elevationLevel = "nonadmin", -}, -}, -multiInstanceSettings = new -{ -numberOfInstances = 1234, -coordinationCommandLine = "", -commonResourceFiles = new object[] -{ -null -}, -}, -dependsOn = new -{ -taskIds = new object[] -{ -"" -}, -taskIdRanges = new object[] -{ -new -{ -start = 1234, -end = 1234, -} -}, -}, -applicationPackageReferences = new object[] -{ -new -{ -applicationId = "", -version = "", -} -}, -authenticationTokenSettings = new -{ -access = new object[] -{ -"job" -}, -}, -} - }, - }); - Response response = await client.CreateTaskCollectionAsync("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("value")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("taskId").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("lastModified").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("location").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("error").GetProperty("message").GetProperty("lang").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("error").GetProperty("message").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("error").GetProperty("values")[0].GetProperty("key").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("error").GetProperty("values")[0].GetProperty("value").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_CreateTaskCollection_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - BatchTaskGroup taskCollection = new BatchTaskGroup(new BatchTaskCreateContent[] - { -new BatchTaskCreateContent("", "") -{ -DisplayName = "", -ExitConditions = new ExitConditions -{ -ExitCodes = {new ExitCodeMapping(1234, new ExitOptions -{ -JobAction = BatchJobAction.None, -DependencyAction = DependencyAction.Satisfy, -})}, -ExitCodeRanges = {new ExitCodeRangeMapping(1234, 1234, default)}, -PreProcessingError = default, -FileUploadError = default, -Default = default, -}, -ContainerSettings = new BatchTaskContainerSettings("") -{ -ContainerRunOptions = "", -Registry = new ContainerRegistryReference -{ -Username = "", -Password = "", -RegistryServer = "", -IdentityReference = new BatchNodeIdentityReference -{ -ResourceId = "", -}, -}, -WorkingDirectory = ContainerWorkingDirectory.TaskWorkingDirectory, -}, -ResourceFiles = {new ResourceFile -{ -AutoStorageContainerName = "", -StorageContainerUrl = "", -HttpUrl = "", -BlobPrefix = "", -FilePath = "", -FileMode = "", -IdentityReference = default, -}}, -OutputFiles = {new OutputFile("", new OutputFileDestination -{ -Container = new OutputFileBlobContainerDestination("") -{ -Path = "", -IdentityReference = default, -UploadHeaders = {new HttpHeader("") -{ -Value = "", -}}, -}, -}, new OutputFileUploadConfig(OutputFileUploadCondition.TaskSuccess))}, -EnvironmentSettings = {new EnvironmentSetting("") -{ -Value = "", -}}, -AffinityInfo = new AffinityInfo(""), -Constraints = new BatchTaskConstraints -{ -MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), -RetentionTime = XmlConvert.ToTimeSpan("PT1H23M45S"), -MaxTaskRetryCount = 1234, -}, -RequiredSlots = 1234, -UserIdentity = new UserIdentity -{ -Username = "", -AutoUser = new AutoUserSpecification -{ -Scope = AutoUserScope.Task, -ElevationLevel = ElevationLevel.NonAdmin, -}, -}, -MultiInstanceSettings = new MultiInstanceSettings("") -{ -NumberOfInstances = 1234, -CommonResourceFiles = {default}, -}, -DependsOn = new BatchTaskDependencies -{ -TaskIds = {""}, -TaskIdRanges = {new BatchTaskIdRange(1234, 1234)}, -}, -ApplicationPackageReferences = {new BatchApplicationPackageReference("") -{ -Version = "", -}}, -AuthenticationTokenSettings = new AuthenticationTokenSettings -{ -Access = {AccessScope.Job}, -}, -} - }); - Response response = client.CreateTaskCollection("", taskCollection, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_CreateTaskCollection_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - BatchTaskGroup taskCollection = new BatchTaskGroup(new BatchTaskCreateContent[] - { -new BatchTaskCreateContent("", "") -{ -DisplayName = "", -ExitConditions = new ExitConditions -{ -ExitCodes = {new ExitCodeMapping(1234, new ExitOptions -{ -JobAction = BatchJobAction.None, -DependencyAction = DependencyAction.Satisfy, -})}, -ExitCodeRanges = {new ExitCodeRangeMapping(1234, 1234, default)}, -PreProcessingError = default, -FileUploadError = default, -Default = default, -}, -ContainerSettings = new BatchTaskContainerSettings("") -{ -ContainerRunOptions = "", -Registry = new ContainerRegistryReference -{ -Username = "", -Password = "", -RegistryServer = "", -IdentityReference = new BatchNodeIdentityReference -{ -ResourceId = "", -}, -}, -WorkingDirectory = ContainerWorkingDirectory.TaskWorkingDirectory, -}, -ResourceFiles = {new ResourceFile -{ -AutoStorageContainerName = "", -StorageContainerUrl = "", -HttpUrl = "", -BlobPrefix = "", -FilePath = "", -FileMode = "", -IdentityReference = default, -}}, -OutputFiles = {new OutputFile("", new OutputFileDestination -{ -Container = new OutputFileBlobContainerDestination("") -{ -Path = "", -IdentityReference = default, -UploadHeaders = {new HttpHeader("") -{ -Value = "", -}}, -}, -}, new OutputFileUploadConfig(OutputFileUploadCondition.TaskSuccess))}, -EnvironmentSettings = {new EnvironmentSetting("") -{ -Value = "", -}}, -AffinityInfo = new AffinityInfo(""), -Constraints = new BatchTaskConstraints -{ -MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), -RetentionTime = XmlConvert.ToTimeSpan("PT1H23M45S"), -MaxTaskRetryCount = 1234, -}, -RequiredSlots = 1234, -UserIdentity = new UserIdentity -{ -Username = "", -AutoUser = new AutoUserSpecification -{ -Scope = AutoUserScope.Task, -ElevationLevel = ElevationLevel.NonAdmin, -}, -}, -MultiInstanceSettings = new MultiInstanceSettings("") -{ -NumberOfInstances = 1234, -CommonResourceFiles = {default}, -}, -DependsOn = new BatchTaskDependencies -{ -TaskIds = {""}, -TaskIdRanges = {new BatchTaskIdRange(1234, 1234)}, -}, -ApplicationPackageReferences = {new BatchApplicationPackageReference("") -{ -Version = "", -}}, -AuthenticationTokenSettings = new AuthenticationTokenSettings -{ -Access = {AccessScope.Job}, -}, -} - }); - Response response = await client.CreateTaskCollectionAsync("", taskCollection, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_DeleteTask_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - Response response = client.DeleteTask("", ""); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_DeleteTask_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - Response response = await client.DeleteTaskAsync("", ""); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_DeleteTask_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - Response response = client.DeleteTask("", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_DeleteTask_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - Response response = await client.DeleteTaskAsync("", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetTask_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - Response response = client.GetTask("", "", null, null, null, null, null, null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetTask_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - Response response = await client.GetTaskAsync("", "", null, null, null, null, null, null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetTask_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - Response response = client.GetTask("", ""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetTask_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - Response response = await client.GetTaskAsync("", ""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetTask_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - Response response = client.GetTask("", "", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), new string[] { "" }, new string[] { "" }, null, null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("url").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("lastModified").ToString()); - Console.WriteLine(result.GetProperty("creationTime").ToString()); - Console.WriteLine(result.GetProperty("exitConditions").GetProperty("exitCodes")[0].GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("exitConditions").GetProperty("exitCodes")[0].GetProperty("exitOptions").GetProperty("jobAction").ToString()); - Console.WriteLine(result.GetProperty("exitConditions").GetProperty("exitCodes")[0].GetProperty("exitOptions").GetProperty("dependencyAction").ToString()); - Console.WriteLine(result.GetProperty("exitConditions").GetProperty("exitCodeRanges")[0].GetProperty("start").ToString()); - Console.WriteLine(result.GetProperty("exitConditions").GetProperty("exitCodeRanges")[0].GetProperty("end").ToString()); - Console.WriteLine(result.GetProperty("exitConditions").GetProperty("exitCodeRanges")[0].GetProperty("exitOptions").GetProperty("jobAction").ToString()); - Console.WriteLine(result.GetProperty("exitConditions").GetProperty("exitCodeRanges")[0].GetProperty("exitOptions").GetProperty("dependencyAction").ToString()); - Console.WriteLine(result.GetProperty("exitConditions").GetProperty("preProcessingError").GetProperty("jobAction").ToString()); - Console.WriteLine(result.GetProperty("exitConditions").GetProperty("preProcessingError").GetProperty("dependencyAction").ToString()); - Console.WriteLine(result.GetProperty("exitConditions").GetProperty("fileUploadError").GetProperty("jobAction").ToString()); - Console.WriteLine(result.GetProperty("exitConditions").GetProperty("fileUploadError").GetProperty("dependencyAction").ToString()); - Console.WriteLine(result.GetProperty("exitConditions").GetProperty("default").GetProperty("jobAction").ToString()); - Console.WriteLine(result.GetProperty("exitConditions").GetProperty("default").GetProperty("dependencyAction").ToString()); - Console.WriteLine(result.GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("stateTransitionTime").ToString()); - Console.WriteLine(result.GetProperty("previousState").ToString()); - Console.WriteLine(result.GetProperty("previousStateTransitionTime").ToString()); - Console.WriteLine(result.GetProperty("commandLine").ToString()); - Console.WriteLine(result.GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); - Console.WriteLine(result.GetProperty("containerSettings").GetProperty("imageName").ToString()); - Console.WriteLine(result.GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); - Console.WriteLine(result.GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); - Console.WriteLine(result.GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); - Console.WriteLine(result.GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); - Console.WriteLine(result.GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); - Console.WriteLine(result.GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); - Console.WriteLine(result.GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); - Console.WriteLine(result.GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); - Console.WriteLine(result.GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); - Console.WriteLine(result.GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("outputFiles")[0].GetProperty("filePattern").ToString()); - Console.WriteLine(result.GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("path").ToString()); - Console.WriteLine(result.GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("containerUrl").ToString()); - Console.WriteLine(result.GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("uploadHeaders")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("uploadHeaders")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("outputFiles")[0].GetProperty("uploadOptions").GetProperty("uploadCondition").ToString()); - Console.WriteLine(result.GetProperty("environmentSettings")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("environmentSettings")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("affinityInfo").GetProperty("affinityId").ToString()); - Console.WriteLine(result.GetProperty("constraints").GetProperty("maxWallClockTime").ToString()); - Console.WriteLine(result.GetProperty("constraints").GetProperty("retentionTime").ToString()); - Console.WriteLine(result.GetProperty("constraints").GetProperty("maxTaskRetryCount").ToString()); - Console.WriteLine(result.GetProperty("requiredSlots").ToString()); - Console.WriteLine(result.GetProperty("userIdentity").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); - Console.WriteLine(result.GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("exitCode").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("containerInfo").GetProperty("containerId").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("containerInfo").GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("containerInfo").GetProperty("error").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("failureInfo").GetProperty("category").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("failureInfo").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("failureInfo").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("failureInfo").GetProperty("details")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("failureInfo").GetProperty("details")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("retryCount").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("lastRetryTime").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("requeueCount").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("lastRequeueTime").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("result").ToString()); - Console.WriteLine(result.GetProperty("nodeInfo").GetProperty("affinityId").ToString()); - Console.WriteLine(result.GetProperty("nodeInfo").GetProperty("nodeUrl").ToString()); - Console.WriteLine(result.GetProperty("nodeInfo").GetProperty("poolId").ToString()); - Console.WriteLine(result.GetProperty("nodeInfo").GetProperty("nodeId").ToString()); - Console.WriteLine(result.GetProperty("nodeInfo").GetProperty("taskRootDirectory").ToString()); - Console.WriteLine(result.GetProperty("nodeInfo").GetProperty("taskRootDirectoryUrl").ToString()); - Console.WriteLine(result.GetProperty("multiInstanceSettings").GetProperty("numberOfInstances").ToString()); - Console.WriteLine(result.GetProperty("multiInstanceSettings").GetProperty("coordinationCommandLine").ToString()); - Console.WriteLine(result.GetProperty("multiInstanceSettings").GetProperty("commonResourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); - Console.WriteLine(result.GetProperty("multiInstanceSettings").GetProperty("commonResourceFiles")[0].GetProperty("storageContainerUrl").ToString()); - Console.WriteLine(result.GetProperty("multiInstanceSettings").GetProperty("commonResourceFiles")[0].GetProperty("httpUrl").ToString()); - Console.WriteLine(result.GetProperty("multiInstanceSettings").GetProperty("commonResourceFiles")[0].GetProperty("blobPrefix").ToString()); - Console.WriteLine(result.GetProperty("multiInstanceSettings").GetProperty("commonResourceFiles")[0].GetProperty("filePath").ToString()); - Console.WriteLine(result.GetProperty("multiInstanceSettings").GetProperty("commonResourceFiles")[0].GetProperty("fileMode").ToString()); - Console.WriteLine(result.GetProperty("multiInstanceSettings").GetProperty("commonResourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("url").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("lastUpdateTime").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("userCPUTime").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("kernelCPUTime").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("wallClockTime").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("readIOps").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("writeIOps").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("readIOGiB").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("writeIOGiB").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("waitTime").ToString()); - Console.WriteLine(result.GetProperty("dependsOn").GetProperty("taskIds")[0].ToString()); - Console.WriteLine(result.GetProperty("dependsOn").GetProperty("taskIdRanges")[0].GetProperty("start").ToString()); - Console.WriteLine(result.GetProperty("dependsOn").GetProperty("taskIdRanges")[0].GetProperty("end").ToString()); - Console.WriteLine(result.GetProperty("applicationPackageReferences")[0].GetProperty("applicationId").ToString()); - Console.WriteLine(result.GetProperty("applicationPackageReferences")[0].GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("authenticationTokenSettings").GetProperty("access")[0].ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetTask_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - Response response = client.GetTask("", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), select: new string[] { "" }, expand: new string[] { "" }, requestConditions: null); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_ReplaceTask_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new object()); - Response response = client.ReplaceTask("", "", content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_ReplaceTask_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new object()); - Response response = await client.ReplaceTaskAsync("", "", content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_ReplaceTask_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - BatchTask task = new BatchTask(); - Response response = client.ReplaceTask("", "", task); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_ReplaceTask_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - BatchTask task = new BatchTask(); - Response response = await client.ReplaceTaskAsync("", "", task); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_ReplaceTask_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - constraints = new - { - maxWallClockTime = "PT1H23M45S", - retentionTime = "PT1H23M45S", - maxTaskRetryCount = 1234, - }, - }); - Response response = client.ReplaceTask("", "", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_ReplaceTask_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - constraints = new - { - maxWallClockTime = "PT1H23M45S", - retentionTime = "PT1H23M45S", - maxTaskRetryCount = 1234, - }, - }); - Response response = await client.ReplaceTaskAsync("", "", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_ReplaceTask_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - BatchTask task = new BatchTask - { - Constraints = new BatchTaskConstraints - { - MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - RetentionTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - MaxTaskRetryCount = 1234, - }, - }; - Response response = client.ReplaceTask("", "", task, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_ReplaceTask_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - BatchTask task = new BatchTask - { - Constraints = new BatchTaskConstraints - { - MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - RetentionTime = XmlConvert.ToTimeSpan("PT1H23M45S"), - MaxTaskRetryCount = 1234, - }, - }; - Response response = await client.ReplaceTaskAsync("", "", task, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_TerminateTask_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - Response response = client.TerminateTask("", ""); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_TerminateTask_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - Response response = await client.TerminateTaskAsync("", ""); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_TerminateTask_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - Response response = client.TerminateTask("", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_TerminateTask_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - Response response = await client.TerminateTaskAsync("", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + poolId = "poolId", + }, + }); + Response response = await client.ReplaceJobAsync("jobId", content); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_ReactivateTask_ShortVersion() + public void Example_Batch_ReplaceJob_JobUpdate_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - Response response = client.ReactivateTask("", ""); - - Console.WriteLine(response.Status); + BatchJob job = new BatchJob(new BatchPoolInfo + { + PoolId = "poolId", + }) + { + Priority = 100, + Constraints = new BatchJobConstraints + { + MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H"), + MaxTaskRetryCount = -1, + }, + }; + Response response = client.ReplaceJob("jobId", job); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_ReactivateTask_ShortVersion_Async() + public async Task Example_Batch_ReplaceJob_JobUpdate_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - Response response = await client.ReactivateTaskAsync("", ""); - - Console.WriteLine(response.Status); + BatchJob job = new BatchJob(new BatchPoolInfo + { + PoolId = "poolId", + }) + { + Priority = 100, + Constraints = new BatchJobConstraints + { + MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H"), + MaxTaskRetryCount = -1, + }, + }; + Response response = await client.ReplaceJobAsync("jobId", job); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_ReactivateTask_AllParameters() + public void Example_Batch_DisableJob_JobDisable() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - Response response = client.ReactivateTask("", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + using RequestContent content = RequestContent.Create(new + { + disableTasks = "terminate", + }); + Response response = client.DisableJob("jobId", content); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_ReactivateTask_AllParameters_Async() + public async Task Example_Batch_DisableJob_JobDisable_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - Response response = await client.ReactivateTaskAsync("", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + using RequestContent content = RequestContent.Create(new + { + disableTasks = "terminate", + }); + Response response = await client.DisableJobAsync("jobId", content); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_DeleteTaskFile_ShortVersion() + public void Example_Batch_DisableJob_JobDisable_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - Response response = client.DeleteTaskFile("", "", ""); - - Console.WriteLine(response.Status); + BatchJobDisableContent content = new BatchJobDisableContent(DisableBatchJobOption.Terminate); + Response response = client.DisableJob("jobId", content); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_DeleteTaskFile_ShortVersion_Async() + public async Task Example_Batch_DisableJob_JobDisable_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - Response response = await client.DeleteTaskFileAsync("", "", ""); - - Console.WriteLine(response.Status); + BatchJobDisableContent content = new BatchJobDisableContent(DisableBatchJobOption.Terminate); + Response response = await client.DisableJobAsync("jobId", content); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_DeleteTaskFile_AllParameters() + public void Example_Batch_EnableJob_JobEnable() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - Response response = client.DeleteTaskFile("", "", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), recursive: true); + Response response = client.EnableJob("jobId"); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_DeleteTaskFile_AllParameters_Async() + public async Task Example_Batch_EnableJob_JobEnable_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - Response response = await client.DeleteTaskFileAsync("", "", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), recursive: true); + Response response = await client.EnableJobAsync("jobId"); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetTaskFile_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - Response response = client.GetTaskFile("", "", "", null, null, null, null, null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetTaskFile_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - Response response = await client.GetTaskFileAsync("", "", "", null, null, null, null, null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetTaskFile_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - Response response = client.GetTaskFile("", "", ""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetTaskFile_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - Response response = await client.GetTaskFileAsync("", "", ""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetTaskFile_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - Response response = client.GetTaskFile("", "", "", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), "", null, null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetTaskFile_AllParameters_Async() + public void Example_Batch_TerminateJob_JobTerminate() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - Response response = await client.GetTaskFileAsync("", "", "", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), "", null, null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetTaskFile_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - Response response = client.GetTaskFile("", "", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), ocpRange: "", requestConditions: null); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetTaskFile_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - Response response = await client.GetTaskFileAsync("", "", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), ocpRange: "", requestConditions: null); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_CreateNodeUser_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - name = "", - }); - Response response = client.CreateNodeUser("", "", content); + using RequestContent content = null; + Response response = client.TerminateJob("jobId", content); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_CreateNodeUser_ShortVersion_Async() + public async Task Example_Batch_TerminateJob_JobTerminate_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - using RequestContent content = RequestContent.Create(new - { - name = "", - }); - Response response = await client.CreateNodeUserAsync("", "", content); + using RequestContent content = null; + Response response = await client.TerminateJobAsync("jobId", content); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_CreateNodeUser_ShortVersion_Convenience() + public void Example_Batch_TerminateJob_JobTerminate_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - BatchNodeUserCreateContent user = new BatchNodeUserCreateContent(""); - Response response = client.CreateNodeUser("", "", user); + Response response = client.TerminateJob("jobId"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_CreateNodeUser_ShortVersion_Convenience_Async() + public async Task Example_Batch_TerminateJob_JobTerminate_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - BatchNodeUserCreateContent user = new BatchNodeUserCreateContent(""); - Response response = await client.CreateNodeUserAsync("", "", user); + Response response = await client.TerminateJobAsync("jobId"); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_CreateNodeUser_AllParameters() + public void Example_Batch_CreateJob_CreatesABasicJob() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - name = "", - isAdmin = true, - expiryTime = "2022-05-10T18:57:31.2311892Z", - password = "", - sshPublicKey = "", + id = "jobId", + priority = 0, + poolInfo = new + { + poolId = "poolId", + }, }); - Response response = client.CreateNodeUser("", "", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + Response response = client.CreateJob(content); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_CreateNodeUser_AllParameters_Async() + public async Task Example_Batch_CreateJob_CreatesABasicJob_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - name = "", - isAdmin = true, - expiryTime = "2022-05-10T18:57:31.2311892Z", - password = "", - sshPublicKey = "", + id = "jobId", + priority = 0, + poolInfo = new + { + poolId = "poolId", + }, }); - Response response = await client.CreateNodeUserAsync("", "", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + Response response = await client.CreateJobAsync(content); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_CreateNodeUser_AllParameters_Convenience() + public void Example_Batch_CreateJob_CreatesABasicJob_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - BatchNodeUserCreateContent user = new BatchNodeUserCreateContent("") + BatchJobCreateContent job = new BatchJobCreateContent("jobId", new BatchPoolInfo + { + PoolId = "poolId", + }) { - IsAdmin = true, - ExpiryTime = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), - Password = "", - SshPublicKey = "", + Priority = 0, }; - Response response = client.CreateNodeUser("", "", user, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + Response response = client.CreateJob(job); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_CreateNodeUser_AllParameters_Convenience_Async() + public async Task Example_Batch_CreateJob_CreatesABasicJob_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - BatchNodeUserCreateContent user = new BatchNodeUserCreateContent("") + BatchJobCreateContent job = new BatchJobCreateContent("jobId", new BatchPoolInfo + { + PoolId = "poolId", + }) { - IsAdmin = true, - ExpiryTime = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), - Password = "", - SshPublicKey = "", + Priority = 0, }; - Response response = await client.CreateNodeUserAsync("", "", user, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_DeleteNodeUser_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - Response response = client.DeleteNodeUser("", "", ""); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_DeleteNodeUser_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - Response response = await client.DeleteNodeUserAsync("", "", ""); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_DeleteNodeUser_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - Response response = client.DeleteNodeUser("", "", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_DeleteNodeUser_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - Response response = await client.DeleteNodeUserAsync("", "", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); - - Console.WriteLine(response.Status); + Response response = await client.CreateJobAsync(job); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_ReplaceNodeUser_ShortVersion() + public void Example_Batch_CreateJob_CreatesAComplexJob() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - using RequestContent content = RequestContent.Create(new object()); - Response response = client.ReplaceNodeUser("", "", "", content); + using RequestContent content = RequestContent.Create(new + { + id = "jobId", + priority = 100, + constraints = new + { + maxWallClockTime = "PT1H", + maxTaskRetryCount = -1, + }, + jobManagerTask = new + { + id = "taskId", + commandLine = "myprogram.exe", + resourceFiles = new object[] + { +new +{ +httpUrl = "http://mystorage1.blob.core.windows.net/scripts/myprogram.exe?sas", +filePath = "myprogram.exe", +}, +new +{ +storageContainerUrl = "http://mystorage1.blob.core.windows.net/data?sas", +filePath = "datafolder", +} + }, + environmentSettings = new object[] + { +new +{ +name = "myvariable", +value = "myvalue", +} + }, + constraints = new + { + maxWallClockTime = "PT1H", + maxTaskRetryCount = 0, + retentionTime = "PT1H", + }, + requiredSlots = 2, + killJobOnCompletion = false, + userIdentity = new + { + autoUser = new + { + scope = "task", + elevationLevel = "admin", + }, + }, + runExclusive = true, + }, + poolInfo = new + { + autoPoolSpecification = new + { + autoPoolIdPrefix = "mypool", + poolLifetimeOption = "job", + pool = new + { + vmSize = "Standard_D1_v2", + virtualMachineConfiguration = new + { + imageReference = new + { + publisher = "MicrosoftWindowsServer", + offer = "WindowsServer", + sku = "2016-datacenter-smalldisk", + version = "latest", + }, + nodeAgentSKUId = "batch.node.windows amd64", + }, + resizeTimeout = "PT15M", + targetDedicatedNodes = 3, + targetLowPriorityNodes = 0, + taskSlotsPerNode = 2, + taskSchedulingPolicy = new + { + nodeFillType = "spread", + }, + enableAutoScale = false, + enableInterNodeCommunication = true, + startTask = new + { + commandLine = "myprogram2.exe", + resourceFiles = new object[] + { +new +{ +httpUrl = "http://mystorage1.blob.core.windows.net/scripts/myprogram2.exe?sas", +filePath = "myprogram2.exe", +} + }, + environmentSettings = new object[] + { +new +{ +name = "myvariable", +value = "myvalue", +} + }, + userIdentity = new + { + autoUser = new + { + scope = "task", + elevationLevel = "admin", + }, + }, + maxTaskRetryCount = 2, + waitForSuccess = true, + }, + metadata = new object[] + { +new +{ +name = "myproperty", +value = "myvalue", +} + }, + targetNodeCommunicationMode = "default", + }, + }, + }, + metadata = new object[] + { +new +{ +name = "myproperty", +value = "myvalue", +} + }, + }); + Response response = client.CreateJob(content); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_ReplaceNodeUser_ShortVersion_Async() + public async Task Example_Batch_CreateJob_CreatesAComplexJob_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - using RequestContent content = RequestContent.Create(new object()); - Response response = await client.ReplaceNodeUserAsync("", "", "", content); + using RequestContent content = RequestContent.Create(new + { + id = "jobId", + priority = 100, + constraints = new + { + maxWallClockTime = "PT1H", + maxTaskRetryCount = -1, + }, + jobManagerTask = new + { + id = "taskId", + commandLine = "myprogram.exe", + resourceFiles = new object[] + { +new +{ +httpUrl = "http://mystorage1.blob.core.windows.net/scripts/myprogram.exe?sas", +filePath = "myprogram.exe", +}, +new +{ +storageContainerUrl = "http://mystorage1.blob.core.windows.net/data?sas", +filePath = "datafolder", +} + }, + environmentSettings = new object[] + { +new +{ +name = "myvariable", +value = "myvalue", +} + }, + constraints = new + { + maxWallClockTime = "PT1H", + maxTaskRetryCount = 0, + retentionTime = "PT1H", + }, + requiredSlots = 2, + killJobOnCompletion = false, + userIdentity = new + { + autoUser = new + { + scope = "task", + elevationLevel = "admin", + }, + }, + runExclusive = true, + }, + poolInfo = new + { + autoPoolSpecification = new + { + autoPoolIdPrefix = "mypool", + poolLifetimeOption = "job", + pool = new + { + vmSize = "Standard_D1_v2", + virtualMachineConfiguration = new + { + imageReference = new + { + publisher = "MicrosoftWindowsServer", + offer = "WindowsServer", + sku = "2016-datacenter-smalldisk", + version = "latest", + }, + nodeAgentSKUId = "batch.node.windows amd64", + }, + resizeTimeout = "PT15M", + targetDedicatedNodes = 3, + targetLowPriorityNodes = 0, + taskSlotsPerNode = 2, + taskSchedulingPolicy = new + { + nodeFillType = "spread", + }, + enableAutoScale = false, + enableInterNodeCommunication = true, + startTask = new + { + commandLine = "myprogram2.exe", + resourceFiles = new object[] + { +new +{ +httpUrl = "http://mystorage1.blob.core.windows.net/scripts/myprogram2.exe?sas", +filePath = "myprogram2.exe", +} + }, + environmentSettings = new object[] + { +new +{ +name = "myvariable", +value = "myvalue", +} + }, + userIdentity = new + { + autoUser = new + { + scope = "task", + elevationLevel = "admin", + }, + }, + maxTaskRetryCount = 2, + waitForSuccess = true, + }, + metadata = new object[] + { +new +{ +name = "myproperty", +value = "myvalue", +} + }, + targetNodeCommunicationMode = "default", + }, + }, + }, + metadata = new object[] + { +new +{ +name = "myproperty", +value = "myvalue", +} + }, + }); + Response response = await client.CreateJobAsync(content); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_ReplaceNodeUser_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - BatchNodeUserUpdateContent content = new BatchNodeUserUpdateContent(); - Response response = client.ReplaceNodeUser("", "", "", content); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_ReplaceNodeUser_ShortVersion_Convenience_Async() + public void Example_Batch_CreateJob_CreatesAComplexJob_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - BatchNodeUserUpdateContent content = new BatchNodeUserUpdateContent(); - Response response = await client.ReplaceNodeUserAsync("", "", "", content); + BatchJobCreateContent job = new BatchJobCreateContent("jobId", new BatchPoolInfo + { + AutoPoolSpecification = new BatchAutoPoolSpecification(BatchPoolLifetimeOption.Job) + { + AutoPoolIdPrefix = "mypool", + Pool = new BatchPoolSpecification("Standard_D1_v2") + { + VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference + { + Publisher = "MicrosoftWindowsServer", + Offer = "WindowsServer", + Sku = "2016-datacenter-smalldisk", + Version = "latest", + }, "batch.node.windows amd64"), + TaskSlotsPerNode = 2, + TaskSchedulingPolicy = new BatchTaskSchedulingPolicy(BatchNodeFillType.Spread), + ResizeTimeout = XmlConvert.ToTimeSpan("PT15M"), + TargetDedicatedNodes = 3, + TargetLowPriorityNodes = 0, + EnableAutoScale = false, + EnableInterNodeCommunication = true, + StartTask = new BatchStartTask("myprogram2.exe") + { + ResourceFiles = {new ResourceFile +{ +HttpUrl = "http://mystorage1.blob.core.windows.net/scripts/myprogram2.exe?sas", +FilePath = "myprogram2.exe", +}}, + EnvironmentSettings = {new EnvironmentSetting("myvariable") +{ +Value = "myvalue", +}}, + UserIdentity = new UserIdentity + { + AutoUser = new AutoUserSpecification + { + Scope = AutoUserScope.Task, + ElevationLevel = ElevationLevel.Admin, + }, + }, + MaxTaskRetryCount = 2, + WaitForSuccess = true, + }, + Metadata = { new MetadataItem("myproperty", "myvalue") }, + TargetNodeCommunicationMode = BatchNodeCommunicationMode.Default, + }, + }, + }) + { + Priority = 100, + Constraints = new BatchJobConstraints + { + MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H"), + MaxTaskRetryCount = -1, + }, + JobManagerTask = new BatchJobManagerTask("taskId", "myprogram.exe") + { + ResourceFiles = {new ResourceFile +{ +HttpUrl = "http://mystorage1.blob.core.windows.net/scripts/myprogram.exe?sas", +FilePath = "myprogram.exe", +}, new ResourceFile +{ +StorageContainerUrl = "http://mystorage1.blob.core.windows.net/data?sas", +FilePath = "datafolder", +}}, + EnvironmentSettings = {new EnvironmentSetting("myvariable") +{ +Value = "myvalue", +}}, + Constraints = new BatchTaskConstraints + { + MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H"), + RetentionTime = XmlConvert.ToTimeSpan("PT1H"), + MaxTaskRetryCount = 0, + }, + RequiredSlots = 2, + KillJobOnCompletion = false, + UserIdentity = new UserIdentity + { + AutoUser = new AutoUserSpecification + { + Scope = AutoUserScope.Task, + ElevationLevel = ElevationLevel.Admin, + }, + }, + RunExclusive = true, + }, + Metadata = { new MetadataItem("myproperty", "myvalue") }, + }; + Response response = client.CreateJob(job); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_ReplaceNodeUser_AllParameters() + public async Task Example_Batch_CreateJob_CreatesAComplexJob_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - using RequestContent content = RequestContent.Create(new + BatchJobCreateContent job = new BatchJobCreateContent("jobId", new BatchPoolInfo { - password = "", - expiryTime = "2022-05-10T18:57:31.2311892Z", - sshPublicKey = "", - }); - Response response = client.ReplaceNodeUser("", "", "", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); - - Console.WriteLine(response.Status); + AutoPoolSpecification = new BatchAutoPoolSpecification(BatchPoolLifetimeOption.Job) + { + AutoPoolIdPrefix = "mypool", + Pool = new BatchPoolSpecification("Standard_D1_v2") + { + VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference + { + Publisher = "MicrosoftWindowsServer", + Offer = "WindowsServer", + Sku = "2016-datacenter-smalldisk", + Version = "latest", + }, "batch.node.windows amd64"), + TaskSlotsPerNode = 2, + TaskSchedulingPolicy = new BatchTaskSchedulingPolicy(BatchNodeFillType.Spread), + ResizeTimeout = XmlConvert.ToTimeSpan("PT15M"), + TargetDedicatedNodes = 3, + TargetLowPriorityNodes = 0, + EnableAutoScale = false, + EnableInterNodeCommunication = true, + StartTask = new BatchStartTask("myprogram2.exe") + { + ResourceFiles = {new ResourceFile +{ +HttpUrl = "http://mystorage1.blob.core.windows.net/scripts/myprogram2.exe?sas", +FilePath = "myprogram2.exe", +}}, + EnvironmentSettings = {new EnvironmentSetting("myvariable") +{ +Value = "myvalue", +}}, + UserIdentity = new UserIdentity + { + AutoUser = new AutoUserSpecification + { + Scope = AutoUserScope.Task, + ElevationLevel = ElevationLevel.Admin, + }, + }, + MaxTaskRetryCount = 2, + WaitForSuccess = true, + }, + Metadata = { new MetadataItem("myproperty", "myvalue") }, + TargetNodeCommunicationMode = BatchNodeCommunicationMode.Default, + }, + }, + }) + { + Priority = 100, + Constraints = new BatchJobConstraints + { + MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H"), + MaxTaskRetryCount = -1, + }, + JobManagerTask = new BatchJobManagerTask("taskId", "myprogram.exe") + { + ResourceFiles = {new ResourceFile +{ +HttpUrl = "http://mystorage1.blob.core.windows.net/scripts/myprogram.exe?sas", +FilePath = "myprogram.exe", +}, new ResourceFile +{ +StorageContainerUrl = "http://mystorage1.blob.core.windows.net/data?sas", +FilePath = "datafolder", +}}, + EnvironmentSettings = {new EnvironmentSetting("myvariable") +{ +Value = "myvalue", +}}, + Constraints = new BatchTaskConstraints + { + MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H"), + RetentionTime = XmlConvert.ToTimeSpan("PT1H"), + MaxTaskRetryCount = 0, + }, + RequiredSlots = 2, + KillJobOnCompletion = false, + UserIdentity = new UserIdentity + { + AutoUser = new AutoUserSpecification + { + Scope = AutoUserScope.Task, + ElevationLevel = ElevationLevel.Admin, + }, + }, + RunExclusive = true, + }, + Metadata = { new MetadataItem("myproperty", "myvalue") }, + }; + Response response = await client.CreateJobAsync(job); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_ReplaceNodeUser_AllParameters_Async() + public void Example_Batch_GetJobTaskCounts_JobGetTaskCounts() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - using RequestContent content = RequestContent.Create(new - { - password = "", - expiryTime = "2022-05-10T18:57:31.2311892Z", - sshPublicKey = "", - }); - Response response = await client.ReplaceNodeUserAsync("", "", "", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + Response response = client.GetJobTaskCounts("jobId", null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null); - Console.WriteLine(response.Status); + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("taskCounts").GetProperty("active").ToString()); + Console.WriteLine(result.GetProperty("taskCounts").GetProperty("running").ToString()); + Console.WriteLine(result.GetProperty("taskCounts").GetProperty("completed").ToString()); + Console.WriteLine(result.GetProperty("taskCounts").GetProperty("succeeded").ToString()); + Console.WriteLine(result.GetProperty("taskCounts").GetProperty("failed").ToString()); + Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("active").ToString()); + Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("running").ToString()); + Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("completed").ToString()); + Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("succeeded").ToString()); + Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("failed").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_ReplaceNodeUser_AllParameters_Convenience() + public async Task Example_Batch_GetJobTaskCounts_JobGetTaskCounts_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - BatchNodeUserUpdateContent content = new BatchNodeUserUpdateContent - { - Password = "", - ExpiryTime = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), - SshPublicKey = "", - }; - Response response = client.ReplaceNodeUser("", "", "", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + Response response = await client.GetJobTaskCountsAsync("jobId", null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("taskCounts").GetProperty("active").ToString()); + Console.WriteLine(result.GetProperty("taskCounts").GetProperty("running").ToString()); + Console.WriteLine(result.GetProperty("taskCounts").GetProperty("completed").ToString()); + Console.WriteLine(result.GetProperty("taskCounts").GetProperty("succeeded").ToString()); + Console.WriteLine(result.GetProperty("taskCounts").GetProperty("failed").ToString()); + Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("active").ToString()); + Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("running").ToString()); + Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("completed").ToString()); + Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("succeeded").ToString()); + Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("failed").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_ReplaceNodeUser_AllParameters_Convenience_Async() + public void Example_Batch_GetJobTaskCounts_JobGetTaskCounts_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - BatchNodeUserUpdateContent content = new BatchNodeUserUpdateContent - { - Password = "", - ExpiryTime = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), - SshPublicKey = "", - }; - Response response = await client.ReplaceNodeUserAsync("", "", "", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + Response response = client.GetJobTaskCounts("jobId"); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetNode_ShortVersion() + public async Task Example_Batch_GetJobTaskCounts_JobGetTaskCounts_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - Response response = client.GetNode("", "", null, null, null, null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); + Response response = await client.GetJobTaskCountsAsync("jobId"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetNode_ShortVersion_Async() + public void Example_Batch_DeleteJobSchedule_JobScheduleDelete() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - Response response = await client.GetNodeAsync("", "", null, null, null, null); + Response response = client.DeleteJobSchedule("jobScheduleId"); - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetNode_ShortVersion_Convenience() + public async Task Example_Batch_DeleteJobSchedule_JobScheduleDelete_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - Response response = client.GetNode("", ""); + Response response = await client.DeleteJobScheduleAsync("jobScheduleId"); + + Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetNode_ShortVersion_Convenience_Async() + public void Example_Batch_GetJobSchedule_JobScheduleGet() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - Response response = await client.GetNodeAsync("", ""); + Response response = client.GetJobSchedule("jobScheduleId", null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null, null, null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetNode_AllParameters() + public async Task Example_Batch_GetJobSchedule_JobScheduleGet_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - Response response = client.GetNode("", "", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), new string[] { "" }, null); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").ToString()); + } - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("url").ToString()); - Console.WriteLine(result.GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("schedulingState").ToString()); - Console.WriteLine(result.GetProperty("stateTransitionTime").ToString()); - Console.WriteLine(result.GetProperty("lastBootTime").ToString()); - Console.WriteLine(result.GetProperty("allocationTime").ToString()); - Console.WriteLine(result.GetProperty("ipAddress").ToString()); - Console.WriteLine(result.GetProperty("affinityId").ToString()); - Console.WriteLine(result.GetProperty("vmSize").ToString()); - Console.WriteLine(result.GetProperty("totalTasksRun").ToString()); - Console.WriteLine(result.GetProperty("runningTasksCount").ToString()); - Console.WriteLine(result.GetProperty("runningTaskSlotsCount").ToString()); - Console.WriteLine(result.GetProperty("totalTasksSucceeded").ToString()); - Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("taskUrl").ToString()); - Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("jobId").ToString()); - Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("taskId").ToString()); - Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("subtaskId").ToString()); - Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("taskState").ToString()); - Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("exitCode").ToString()); - Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("containerInfo").GetProperty("containerId").ToString()); - Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("containerInfo").GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("containerInfo").GetProperty("error").ToString()); - Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("failureInfo").GetProperty("category").ToString()); - Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("failureInfo").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("failureInfo").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("failureInfo").GetProperty("details")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("failureInfo").GetProperty("details")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("retryCount").ToString()); - Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("lastRetryTime").ToString()); - Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("requeueCount").ToString()); - Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("lastRequeueTime").ToString()); - Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("result").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("commandLine").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("userIdentity").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("maxTaskRetryCount").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("waitForSuccess").ToString()); - Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("exitCode").ToString()); - Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("containerInfo").GetProperty("containerId").ToString()); - Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("containerInfo").GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("containerInfo").GetProperty("error").ToString()); - Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("failureInfo").GetProperty("category").ToString()); - Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("failureInfo").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("failureInfo").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("failureInfo").GetProperty("details")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("failureInfo").GetProperty("details")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("retryCount").ToString()); - Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("lastRetryTime").ToString()); - Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("result").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("errorDetails")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("errorDetails")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("isDedicated").ToString()); - Console.WriteLine(result.GetProperty("endpointConfiguration").GetProperty("inboundEndpoints")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("endpointConfiguration").GetProperty("inboundEndpoints")[0].GetProperty("protocol").ToString()); - Console.WriteLine(result.GetProperty("endpointConfiguration").GetProperty("inboundEndpoints")[0].GetProperty("publicIPAddress").ToString()); - Console.WriteLine(result.GetProperty("endpointConfiguration").GetProperty("inboundEndpoints")[0].GetProperty("publicFQDN").ToString()); - Console.WriteLine(result.GetProperty("endpointConfiguration").GetProperty("inboundEndpoints")[0].GetProperty("frontendPort").ToString()); - Console.WriteLine(result.GetProperty("endpointConfiguration").GetProperty("inboundEndpoints")[0].GetProperty("backendPort").ToString()); - Console.WriteLine(result.GetProperty("nodeAgentInfo").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("nodeAgentInfo").GetProperty("lastUpdateTime").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineInfo").GetProperty("imageReference").GetProperty("publisher").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineInfo").GetProperty("imageReference").GetProperty("offer").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineInfo").GetProperty("imageReference").GetProperty("sku").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineInfo").GetProperty("imageReference").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineInfo").GetProperty("imageReference").GetProperty("virtualMachineImageId").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineInfo").GetProperty("imageReference").GetProperty("exactVersion").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineInfo").GetProperty("scaleSetVmResourceId").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetNode_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - Response response = client.GetNode("", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), select: new string[] { "" }); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_RebootNode_ShortVersion() - { - Uri endpoint = new Uri(""); + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetJobSchedule_JobScheduleGet_Convenience() + { + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - using RequestContent content = null; - Response response = client.RebootNode("", "", content); - - Console.WriteLine(response.Status); + Response response = client.GetJobSchedule("jobScheduleId"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_RebootNode_ShortVersion_Async() + public async Task Example_Batch_GetJobSchedule_JobScheduleGet_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - using RequestContent content = null; - Response response = await client.RebootNodeAsync("", "", content); - - Console.WriteLine(response.Status); + Response response = await client.GetJobScheduleAsync("jobScheduleId"); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_RebootNode_ShortVersion_Convenience() + public void Example_Batch_UpdateJobSchedule_JobSchedulePatch() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - Response response = client.RebootNode("", ""); + using RequestContent content = RequestContent.Create(new + { + schedule = new + { + doNotRunUntil = "2025-01-01T12:30:00Z", + }, + jobSpecification = new + { + priority = 0, + usesTaskDependencies = false, + constraints = new + { + maxWallClockTime = "P10675199DT2H48M5.4775807S", + maxTaskRetryCount = 0, + }, + poolInfo = new + { + poolId = "poolId", + }, + }, + }); + Response response = client.UpdateJobSchedule("jobScheduleId", content); + + Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_RebootNode_ShortVersion_Convenience_Async() + public async Task Example_Batch_UpdateJobSchedule_JobSchedulePatch_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - Response response = await client.RebootNodeAsync("", ""); + using RequestContent content = RequestContent.Create(new + { + schedule = new + { + doNotRunUntil = "2025-01-01T12:30:00Z", + }, + jobSpecification = new + { + priority = 0, + usesTaskDependencies = false, + constraints = new + { + maxWallClockTime = "P10675199DT2H48M5.4775807S", + maxTaskRetryCount = 0, + }, + poolInfo = new + { + poolId = "poolId", + }, + }, + }); + Response response = await client.UpdateJobScheduleAsync("jobScheduleId", content); + + Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_RebootNode_AllParameters() + public void Example_Batch_ReplaceJobSchedule_JobScheduleUpdate() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - nodeRebootOption = "requeue", + schedule = new + { + doNotRunUntil = "2025-01-01T12:30:00Z", + }, + jobSpecification = new + { + priority = 0, + usesTaskDependencies = false, + constraints = new + { + maxWallClockTime = "P10675199DT2H48M5.4775807S", + maxTaskRetryCount = 0, + }, + poolInfo = new + { + poolId = "poolId", + }, + }, }); - Response response = client.RebootNode("", "", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + Response response = client.ReplaceJobSchedule("jobScheduleId", content); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_RebootNode_AllParameters_Async() + public async Task Example_Batch_ReplaceJobSchedule_JobScheduleUpdate_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - nodeRebootOption = "requeue", + schedule = new + { + doNotRunUntil = "2025-01-01T12:30:00Z", + }, + jobSpecification = new + { + priority = 0, + usesTaskDependencies = false, + constraints = new + { + maxWallClockTime = "P10675199DT2H48M5.4775807S", + maxTaskRetryCount = 0, + }, + poolInfo = new + { + poolId = "poolId", + }, + }, }); - Response response = await client.RebootNodeAsync("", "", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + Response response = await client.ReplaceJobScheduleAsync("jobScheduleId", content); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_RebootNode_AllParameters_Convenience() + public void Example_Batch_ReplaceJobSchedule_JobScheduleUpdate_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - BatchNodeRebootContent parameters = new BatchNodeRebootContent + BatchJobSchedule jobSchedule = new BatchJobSchedule(new BatchJobSpecification(new BatchPoolInfo + { + PoolId = "poolId", + }) + { + Priority = 0, + UsesTaskDependencies = false, + Constraints = new BatchJobConstraints + { + MaxWallClockTime = XmlConvert.ToTimeSpan("P10675199DT2H48M5.4775807S"), + MaxTaskRetryCount = 0, + }, + }) { - NodeRebootOption = BatchNodeRebootOption.Requeue, + Schedule = new BatchJobScheduleConfiguration + { + DoNotRunUntil = DateTimeOffset.Parse("2025-01-01T12:30:00Z"), + }, }; - Response response = client.RebootNode("", "", parameters: parameters, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + Response response = client.ReplaceJobSchedule("jobScheduleId", jobSchedule); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_RebootNode_AllParameters_Convenience_Async() + public async Task Example_Batch_ReplaceJobSchedule_JobScheduleUpdate_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - BatchNodeRebootContent parameters = new BatchNodeRebootContent + BatchJobSchedule jobSchedule = new BatchJobSchedule(new BatchJobSpecification(new BatchPoolInfo + { + PoolId = "poolId", + }) + { + Priority = 0, + UsesTaskDependencies = false, + Constraints = new BatchJobConstraints + { + MaxWallClockTime = XmlConvert.ToTimeSpan("P10675199DT2H48M5.4775807S"), + MaxTaskRetryCount = 0, + }, + }) { - NodeRebootOption = BatchNodeRebootOption.Requeue, + Schedule = new BatchJobScheduleConfiguration + { + DoNotRunUntil = DateTimeOffset.Parse("2025-01-01T12:30:00Z"), + }, }; - Response response = await client.RebootNodeAsync("", "", parameters: parameters, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + Response response = await client.ReplaceJobScheduleAsync("jobScheduleId", jobSchedule); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_DisableNodeScheduling_ShortVersion() + public void Example_Batch_DisableJobSchedule_JobScheduleDisable() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - using RequestContent content = null; - Response response = client.DisableNodeScheduling("", "", content); + Response response = client.DisableJobSchedule("jobScheduleId"); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_DisableNodeScheduling_ShortVersion_Async() + public async Task Example_Batch_DisableJobSchedule_JobScheduleDisable_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - using RequestContent content = null; - Response response = await client.DisableNodeSchedulingAsync("", "", content); + Response response = await client.DisableJobScheduleAsync("jobScheduleId"); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_DisableNodeScheduling_ShortVersion_Convenience() + public void Example_Batch_EnableJobSchedule_JobScheduleEnable() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - Response response = client.DisableNodeScheduling("", ""); + Response response = client.EnableJobSchedule("jobScheduleId"); + + Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_DisableNodeScheduling_ShortVersion_Convenience_Async() + public async Task Example_Batch_EnableJobSchedule_JobScheduleEnable_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - Response response = await client.DisableNodeSchedulingAsync("", ""); + Response response = await client.EnableJobScheduleAsync("jobScheduleId"); + + Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_DisableNodeScheduling_AllParameters() + public void Example_Batch_TerminateJobSchedule_JobScheduleTerminate() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - using RequestContent content = RequestContent.Create(new - { - nodeDisableSchedulingOption = "requeue", - }); - Response response = client.DisableNodeScheduling("", "", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + Response response = client.TerminateJobSchedule("jobScheduleId"); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_DisableNodeScheduling_AllParameters_Async() + public async Task Example_Batch_TerminateJobSchedule_JobScheduleTerminate_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - using RequestContent content = RequestContent.Create(new - { - nodeDisableSchedulingOption = "requeue", - }); - Response response = await client.DisableNodeSchedulingAsync("", "", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + Response response = await client.TerminateJobScheduleAsync("jobScheduleId"); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_DisableNodeScheduling_AllParameters_Convenience() + public void Example_Batch_CreateJobSchedule_CreatesABasicJobSchedule() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - BatchNodeDisableSchedulingContent parameters = new BatchNodeDisableSchedulingContent + using RequestContent content = RequestContent.Create(new { - NodeDisableSchedulingOption = BatchNodeDisableSchedulingOption.Requeue, - }; - Response response = client.DisableNodeScheduling("", "", parameters: parameters, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + id = "jobScheduleId", + schedule = new + { + recurrenceInterval = "PT5M", + }, + jobSpecification = new + { + poolInfo = new + { + poolId = "poolId", + }, + }, + }); + Response response = client.CreateJobSchedule(content); + + Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_DisableNodeScheduling_AllParameters_Convenience_Async() + public async Task Example_Batch_CreateJobSchedule_CreatesABasicJobSchedule_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - BatchNodeDisableSchedulingContent parameters = new BatchNodeDisableSchedulingContent + using RequestContent content = RequestContent.Create(new { - NodeDisableSchedulingOption = BatchNodeDisableSchedulingOption.Requeue, - }; - Response response = await client.DisableNodeSchedulingAsync("", "", parameters: parameters, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + id = "jobScheduleId", + schedule = new + { + recurrenceInterval = "PT5M", + }, + jobSpecification = new + { + poolInfo = new + { + poolId = "poolId", + }, + }, + }); + Response response = await client.CreateJobScheduleAsync(content); + + Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_EnableNodeScheduling_ShortVersion() + public void Example_Batch_CreateJobSchedule_CreatesABasicJobSchedule_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - Response response = client.EnableNodeScheduling("", ""); - - Console.WriteLine(response.Status); + BatchJobScheduleCreateContent jobSchedule = new BatchJobScheduleCreateContent("jobScheduleId", new BatchJobScheduleConfiguration + { + RecurrenceInterval = XmlConvert.ToTimeSpan("PT5M"), + }, new BatchJobSpecification(new BatchPoolInfo + { + PoolId = "poolId", + })); + Response response = client.CreateJobSchedule(jobSchedule); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_EnableNodeScheduling_ShortVersion_Async() + public async Task Example_Batch_CreateJobSchedule_CreatesABasicJobSchedule_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - Response response = await client.EnableNodeSchedulingAsync("", ""); - - Console.WriteLine(response.Status); + BatchJobScheduleCreateContent jobSchedule = new BatchJobScheduleCreateContent("jobScheduleId", new BatchJobScheduleConfiguration + { + RecurrenceInterval = XmlConvert.ToTimeSpan("PT5M"), + }, new BatchJobSpecification(new BatchPoolInfo + { + PoolId = "poolId", + })); + Response response = await client.CreateJobScheduleAsync(jobSchedule); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_EnableNodeScheduling_AllParameters() + public void Example_Batch_CreateJobSchedule_CreatesAComplexJobScheduleAdd() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - Response response = client.EnableNodeScheduling("", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + using RequestContent content = RequestContent.Create(new + { + id = "jobScheduleId", + schedule = new + { + doNotRunUntil = "2014-09-10T02:30:00.000Z", + doNotRunAfter = "2014-09-10T06:30:00.000Z", + startWindow = "PT1M", + recurrenceInterval = "PT5M", + }, + jobSpecification = new + { + priority = 100, + constraints = new + { + maxWallClockTime = "PT1H", + maxTaskRetryCount = -1, + }, + jobManagerTask = new + { + id = "mytask1", + commandLine = "myprogram.exe", + resourceFiles = new object[] + { +new +{ +httpUrl = "http://mystorage1.blob.core.windows.net/scripts/myprogram.exe?sas", +filePath = "myprogram.exe", +}, +new +{ +httpUrl = "http://mystorage1.blob.core.windows.net/scripts/test.txt?sas", +filePath = "test.txt", +} + }, + environmentSettings = new object[] + { +new +{ +name = "myvariable", +value = "myvalue", +} + }, + constraints = new + { + maxWallClockTime = "PT1H", + maxTaskRetryCount = 0, + retentionTime = "PT1H", + }, + requiredSlots = 2, + killJobOnCompletion = true, + userIdentity = new + { + autoUser = new + { + scope = "task", + elevationLevel = "nonadmin", + }, + }, + runExclusive = true, + }, + poolInfo = new + { + autoPoolSpecification = new + { + autoPoolIdPrefix = "mypool", + poolLifetimeOption = "jobschedule", + pool = new + { + vmSize = "Standard_D1_v2", + virtualMachineConfiguration = new + { + imageReference = new + { + publisher = "MicrosoftWindowsServer", + offer = "WindowsServer", + sku = "2016-datacenter-smalldisk", + version = "latest", + }, + nodeAgentSKUId = "batch.node.windows amd64", + }, + resizeTimeout = "PT15M", + targetDedicatedNodes = 3, + targetLowPriorityNodes = 0, + taskSlotsPerNode = 2, + taskSchedulingPolicy = new + { + nodeFillType = "spread", + }, + enableAutoScale = false, + enableInterNodeCommunication = true, + startTask = new + { + commandLine = "myprogram2.exe", + resourceFiles = new object[] + { +new +{ +httpUrl = "http://mystorage1.blob.core.windows.net/scripts/myprogram2.exe?sas", +filePath = "myprogram2.exe", +} + }, + environmentSettings = new object[] + { +new +{ +name = "myvariable", +value = "myvalue", +} + }, + userIdentity = new + { + autoUser = new + { + scope = "task", + elevationLevel = "admin", + }, + }, + maxTaskRetryCount = 2, + waitForSuccess = true, + }, + metadata = new object[] + { +new +{ +name = "myproperty", +value = "myvalue", +} + }, + targetNodeCommunicationMode = "default", + }, + }, + }, + }, + metadata = new object[] + { +new +{ +name = "myproperty", +value = "myvalue", +} + }, + }); + Response response = client.CreateJobSchedule(content); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_EnableNodeScheduling_AllParameters_Async() + public async Task Example_Batch_CreateJobSchedule_CreatesAComplexJobScheduleAdd_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - Response response = await client.EnableNodeSchedulingAsync("", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + using RequestContent content = RequestContent.Create(new + { + id = "jobScheduleId", + schedule = new + { + doNotRunUntil = "2014-09-10T02:30:00.000Z", + doNotRunAfter = "2014-09-10T06:30:00.000Z", + startWindow = "PT1M", + recurrenceInterval = "PT5M", + }, + jobSpecification = new + { + priority = 100, + constraints = new + { + maxWallClockTime = "PT1H", + maxTaskRetryCount = -1, + }, + jobManagerTask = new + { + id = "mytask1", + commandLine = "myprogram.exe", + resourceFiles = new object[] + { +new +{ +httpUrl = "http://mystorage1.blob.core.windows.net/scripts/myprogram.exe?sas", +filePath = "myprogram.exe", +}, +new +{ +httpUrl = "http://mystorage1.blob.core.windows.net/scripts/test.txt?sas", +filePath = "test.txt", +} + }, + environmentSettings = new object[] + { +new +{ +name = "myvariable", +value = "myvalue", +} + }, + constraints = new + { + maxWallClockTime = "PT1H", + maxTaskRetryCount = 0, + retentionTime = "PT1H", + }, + requiredSlots = 2, + killJobOnCompletion = true, + userIdentity = new + { + autoUser = new + { + scope = "task", + elevationLevel = "nonadmin", + }, + }, + runExclusive = true, + }, + poolInfo = new + { + autoPoolSpecification = new + { + autoPoolIdPrefix = "mypool", + poolLifetimeOption = "jobschedule", + pool = new + { + vmSize = "Standard_D1_v2", + virtualMachineConfiguration = new + { + imageReference = new + { + publisher = "MicrosoftWindowsServer", + offer = "WindowsServer", + sku = "2016-datacenter-smalldisk", + version = "latest", + }, + nodeAgentSKUId = "batch.node.windows amd64", + }, + resizeTimeout = "PT15M", + targetDedicatedNodes = 3, + targetLowPriorityNodes = 0, + taskSlotsPerNode = 2, + taskSchedulingPolicy = new + { + nodeFillType = "spread", + }, + enableAutoScale = false, + enableInterNodeCommunication = true, + startTask = new + { + commandLine = "myprogram2.exe", + resourceFiles = new object[] + { +new +{ +httpUrl = "http://mystorage1.blob.core.windows.net/scripts/myprogram2.exe?sas", +filePath = "myprogram2.exe", +} + }, + environmentSettings = new object[] + { +new +{ +name = "myvariable", +value = "myvalue", +} + }, + userIdentity = new + { + autoUser = new + { + scope = "task", + elevationLevel = "admin", + }, + }, + maxTaskRetryCount = 2, + waitForSuccess = true, + }, + metadata = new object[] + { +new +{ +name = "myproperty", +value = "myvalue", +} + }, + targetNodeCommunicationMode = "default", + }, + }, + }, + }, + metadata = new object[] + { +new +{ +name = "myproperty", +value = "myvalue", +} + }, + }); + Response response = await client.CreateJobScheduleAsync(content); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetNodeRemoteLoginSettings_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - Response response = client.GetNodeRemoteLoginSettings("", "", null, null, null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("remoteLoginIPAddress").ToString()); - Console.WriteLine(result.GetProperty("remoteLoginPort").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetNodeRemoteLoginSettings_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - Response response = await client.GetNodeRemoteLoginSettingsAsync("", "", null, null, null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("remoteLoginIPAddress").ToString()); - Console.WriteLine(result.GetProperty("remoteLoginPort").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetNodeRemoteLoginSettings_ShortVersion_Convenience() + public void Example_Batch_CreateJobSchedule_CreatesAComplexJobScheduleAdd_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - Response response = client.GetNodeRemoteLoginSettings("", ""); + BatchJobScheduleCreateContent jobSchedule = new BatchJobScheduleCreateContent("jobScheduleId", new BatchJobScheduleConfiguration + { + DoNotRunUntil = DateTimeOffset.Parse("2014-09-10T02:30:00.000Z"), + DoNotRunAfter = DateTimeOffset.Parse("2014-09-10T06:30:00.000Z"), + StartWindow = XmlConvert.ToTimeSpan("PT1M"), + RecurrenceInterval = XmlConvert.ToTimeSpan("PT5M"), + }, new BatchJobSpecification(new BatchPoolInfo + { + AutoPoolSpecification = new BatchAutoPoolSpecification(BatchPoolLifetimeOption.JobSchedule) + { + AutoPoolIdPrefix = "mypool", + Pool = new BatchPoolSpecification("Standard_D1_v2") + { + VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference + { + Publisher = "MicrosoftWindowsServer", + Offer = "WindowsServer", + Sku = "2016-datacenter-smalldisk", + Version = "latest", + }, "batch.node.windows amd64"), + TaskSlotsPerNode = 2, + TaskSchedulingPolicy = new BatchTaskSchedulingPolicy(BatchNodeFillType.Spread), + ResizeTimeout = XmlConvert.ToTimeSpan("PT15M"), + TargetDedicatedNodes = 3, + TargetLowPriorityNodes = 0, + EnableAutoScale = false, + EnableInterNodeCommunication = true, + StartTask = new BatchStartTask("myprogram2.exe") + { + ResourceFiles = {new ResourceFile +{ +HttpUrl = "http://mystorage1.blob.core.windows.net/scripts/myprogram2.exe?sas", +FilePath = "myprogram2.exe", +}}, + EnvironmentSettings = {new EnvironmentSetting("myvariable") +{ +Value = "myvalue", +}}, + UserIdentity = new UserIdentity + { + AutoUser = new AutoUserSpecification + { + Scope = AutoUserScope.Task, + ElevationLevel = ElevationLevel.Admin, + }, + }, + MaxTaskRetryCount = 2, + WaitForSuccess = true, + }, + Metadata = { new MetadataItem("myproperty", "myvalue") }, + TargetNodeCommunicationMode = BatchNodeCommunicationMode.Default, + }, + }, + }) + { + Priority = 100, + Constraints = new BatchJobConstraints + { + MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H"), + MaxTaskRetryCount = -1, + }, + JobManagerTask = new BatchJobManagerTask("mytask1", "myprogram.exe") + { + ResourceFiles = {new ResourceFile +{ +HttpUrl = "http://mystorage1.blob.core.windows.net/scripts/myprogram.exe?sas", +FilePath = "myprogram.exe", +}, new ResourceFile +{ +HttpUrl = "http://mystorage1.blob.core.windows.net/scripts/test.txt?sas", +FilePath = "test.txt", +}}, + EnvironmentSettings = {new EnvironmentSetting("myvariable") +{ +Value = "myvalue", +}}, + Constraints = new BatchTaskConstraints + { + MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H"), + RetentionTime = XmlConvert.ToTimeSpan("PT1H"), + MaxTaskRetryCount = 0, + }, + RequiredSlots = 2, + KillJobOnCompletion = true, + UserIdentity = new UserIdentity + { + AutoUser = new AutoUserSpecification + { + Scope = AutoUserScope.Task, + ElevationLevel = ElevationLevel.NonAdmin, + }, + }, + RunExclusive = true, + }, + }) + { + Metadata = { new MetadataItem("myproperty", "myvalue") }, + }; + Response response = client.CreateJobSchedule(jobSchedule); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetNodeRemoteLoginSettings_ShortVersion_Convenience_Async() + public async Task Example_Batch_CreateJobSchedule_CreatesAComplexJobScheduleAdd_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - Response response = await client.GetNodeRemoteLoginSettingsAsync("", ""); + BatchJobScheduleCreateContent jobSchedule = new BatchJobScheduleCreateContent("jobScheduleId", new BatchJobScheduleConfiguration + { + DoNotRunUntil = DateTimeOffset.Parse("2014-09-10T02:30:00.000Z"), + DoNotRunAfter = DateTimeOffset.Parse("2014-09-10T06:30:00.000Z"), + StartWindow = XmlConvert.ToTimeSpan("PT1M"), + RecurrenceInterval = XmlConvert.ToTimeSpan("PT5M"), + }, new BatchJobSpecification(new BatchPoolInfo + { + AutoPoolSpecification = new BatchAutoPoolSpecification(BatchPoolLifetimeOption.JobSchedule) + { + AutoPoolIdPrefix = "mypool", + Pool = new BatchPoolSpecification("Standard_D1_v2") + { + VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference + { + Publisher = "MicrosoftWindowsServer", + Offer = "WindowsServer", + Sku = "2016-datacenter-smalldisk", + Version = "latest", + }, "batch.node.windows amd64"), + TaskSlotsPerNode = 2, + TaskSchedulingPolicy = new BatchTaskSchedulingPolicy(BatchNodeFillType.Spread), + ResizeTimeout = XmlConvert.ToTimeSpan("PT15M"), + TargetDedicatedNodes = 3, + TargetLowPriorityNodes = 0, + EnableAutoScale = false, + EnableInterNodeCommunication = true, + StartTask = new BatchStartTask("myprogram2.exe") + { + ResourceFiles = {new ResourceFile +{ +HttpUrl = "http://mystorage1.blob.core.windows.net/scripts/myprogram2.exe?sas", +FilePath = "myprogram2.exe", +}}, + EnvironmentSettings = {new EnvironmentSetting("myvariable") +{ +Value = "myvalue", +}}, + UserIdentity = new UserIdentity + { + AutoUser = new AutoUserSpecification + { + Scope = AutoUserScope.Task, + ElevationLevel = ElevationLevel.Admin, + }, + }, + MaxTaskRetryCount = 2, + WaitForSuccess = true, + }, + Metadata = { new MetadataItem("myproperty", "myvalue") }, + TargetNodeCommunicationMode = BatchNodeCommunicationMode.Default, + }, + }, + }) + { + Priority = 100, + Constraints = new BatchJobConstraints + { + MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H"), + MaxTaskRetryCount = -1, + }, + JobManagerTask = new BatchJobManagerTask("mytask1", "myprogram.exe") + { + ResourceFiles = {new ResourceFile +{ +HttpUrl = "http://mystorage1.blob.core.windows.net/scripts/myprogram.exe?sas", +FilePath = "myprogram.exe", +}, new ResourceFile +{ +HttpUrl = "http://mystorage1.blob.core.windows.net/scripts/test.txt?sas", +FilePath = "test.txt", +}}, + EnvironmentSettings = {new EnvironmentSetting("myvariable") +{ +Value = "myvalue", +}}, + Constraints = new BatchTaskConstraints + { + MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H"), + RetentionTime = XmlConvert.ToTimeSpan("PT1H"), + MaxTaskRetryCount = 0, + }, + RequiredSlots = 2, + KillJobOnCompletion = true, + UserIdentity = new UserIdentity + { + AutoUser = new AutoUserSpecification + { + Scope = AutoUserScope.Task, + ElevationLevel = ElevationLevel.NonAdmin, + }, + }, + RunExclusive = true, + }, + }) + { + Metadata = { new MetadataItem("myproperty", "myvalue") }, + }; + Response response = await client.CreateJobScheduleAsync(jobSchedule); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetNodeRemoteLoginSettings_AllParameters() + public void Example_Batch_CreateTask_CreatesABasicTask() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - Response response = client.GetNodeRemoteLoginSettings("", "", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), null); + using RequestContent content = RequestContent.Create(new + { + id = "task1", + commandLine = "cmd /c echo task1", + }); + Response response = client.CreateTask("jobId", content); - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("remoteLoginIPAddress").ToString()); - Console.WriteLine(result.GetProperty("remoteLoginPort").ToString()); + Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetNodeRemoteLoginSettings_AllParameters_Async() + public async Task Example_Batch_CreateTask_CreatesABasicTask_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - Response response = await client.GetNodeRemoteLoginSettingsAsync("", "", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), null); + using RequestContent content = RequestContent.Create(new + { + id = "task1", + commandLine = "cmd /c echo task1", + }); + Response response = await client.CreateTaskAsync("jobId", content); - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("remoteLoginIPAddress").ToString()); - Console.WriteLine(result.GetProperty("remoteLoginPort").ToString()); + Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetNodeRemoteLoginSettings_AllParameters_Convenience() + public void Example_Batch_CreateTask_CreatesABasicTask_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - Response response = client.GetNodeRemoteLoginSettings("", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + BatchTaskCreateContent task = new BatchTaskCreateContent("task1", "cmd /c echo task1"); + Response response = client.CreateTask("jobId", task); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetNodeRemoteLoginSettings_AllParameters_Convenience_Async() + public async Task Example_Batch_CreateTask_CreatesABasicTask_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - Response response = await client.GetNodeRemoteLoginSettingsAsync("", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + BatchTaskCreateContent task = new BatchTaskCreateContent("task1", "cmd /c echo task1"); + Response response = await client.CreateTaskAsync("jobId", task); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_UploadNodeLogs_ShortVersion() + public void Example_Batch_CreateTask_CreatesATaskWithContainerSettings() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - containerUrl = "", - startTime = "2022-05-10T18:57:31.2311892Z", + id = "taskId", + commandLine = "bash -c 'echo hello'", + containerSettings = new + { + imageName = "ubuntu", + containerRunOptions = "--rm", + }, + userIdentity = new + { + autoUser = new + { + scope = "task", + elevationLevel = "nonadmin", + }, + }, }); - Response response = client.UploadNodeLogs("", "", content); + Response response = client.CreateTask("jobId", content); - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("virtualDirectoryName").ToString()); - Console.WriteLine(result.GetProperty("numberOfFilesUploaded").ToString()); + Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_UploadNodeLogs_ShortVersion_Async() + public async Task Example_Batch_CreateTask_CreatesATaskWithContainerSettings_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - containerUrl = "", - startTime = "2022-05-10T18:57:31.2311892Z", + id = "taskId", + commandLine = "bash -c 'echo hello'", + containerSettings = new + { + imageName = "ubuntu", + containerRunOptions = "--rm", + }, + userIdentity = new + { + autoUser = new + { + scope = "task", + elevationLevel = "nonadmin", + }, + }, }); - Response response = await client.UploadNodeLogsAsync("", "", content); + Response response = await client.CreateTaskAsync("jobId", content); - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("virtualDirectoryName").ToString()); - Console.WriteLine(result.GetProperty("numberOfFilesUploaded").ToString()); + Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_UploadNodeLogs_ShortVersion_Convenience() + public void Example_Batch_CreateTask_CreatesATaskWithContainerSettings_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - UploadBatchServiceLogsContent content = new UploadBatchServiceLogsContent("", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); - Response response = client.UploadNodeLogs("", "", content); + BatchTaskCreateContent task = new BatchTaskCreateContent("taskId", "bash -c 'echo hello'") + { + ContainerSettings = new BatchTaskContainerSettings("ubuntu") + { + ContainerRunOptions = "--rm", + }, + UserIdentity = new UserIdentity + { + AutoUser = new AutoUserSpecification + { + Scope = AutoUserScope.Task, + ElevationLevel = ElevationLevel.NonAdmin, + }, + }, + }; + Response response = client.CreateTask("jobId", task); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_UploadNodeLogs_ShortVersion_Convenience_Async() + public async Task Example_Batch_CreateTask_CreatesATaskWithContainerSettings_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - UploadBatchServiceLogsContent content = new UploadBatchServiceLogsContent("", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); - Response response = await client.UploadNodeLogsAsync("", "", content); + BatchTaskCreateContent task = new BatchTaskCreateContent("taskId", "bash -c 'echo hello'") + { + ContainerSettings = new BatchTaskContainerSettings("ubuntu") + { + ContainerRunOptions = "--rm", + }, + UserIdentity = new UserIdentity + { + AutoUser = new AutoUserSpecification + { + Scope = AutoUserScope.Task, + ElevationLevel = ElevationLevel.NonAdmin, + }, + }, + }; + Response response = await client.CreateTaskAsync("jobId", task); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_UploadNodeLogs_AllParameters() + public void Example_Batch_CreateTask_CreatesATaskWithExitConditions() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - containerUrl = "", - startTime = "2022-05-10T18:57:31.2311892Z", - endTime = "2022-05-10T18:57:31.2311892Z", - identityReference = new + id = "taskId", + commandLine = "cmd /c exit 3", + exitConditions = new + { + exitCodeRanges = new object[] + { +new +{ +start = 2, +end = 4, +exitOptions = new +{ +jobAction = "terminate", +}, +} + }, + }, + userIdentity = new { - resourceId = "", + autoUser = new + { + scope = "task", + elevationLevel = "nonadmin", + }, }, }); - Response response = client.UploadNodeLogs("", "", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + Response response = client.CreateTask("jobId", content); - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("virtualDirectoryName").ToString()); - Console.WriteLine(result.GetProperty("numberOfFilesUploaded").ToString()); + Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_UploadNodeLogs_AllParameters_Async() + public async Task Example_Batch_CreateTask_CreatesATaskWithExitConditions_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - containerUrl = "", - startTime = "2022-05-10T18:57:31.2311892Z", - endTime = "2022-05-10T18:57:31.2311892Z", - identityReference = new + id = "taskId", + commandLine = "cmd /c exit 3", + exitConditions = new + { + exitCodeRanges = new object[] + { +new +{ +start = 2, +end = 4, +exitOptions = new +{ +jobAction = "terminate", +}, +} + }, + }, + userIdentity = new { - resourceId = "", + autoUser = new + { + scope = "task", + elevationLevel = "nonadmin", + }, }, }); - Response response = await client.UploadNodeLogsAsync("", "", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + Response response = await client.CreateTaskAsync("jobId", content); - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("virtualDirectoryName").ToString()); - Console.WriteLine(result.GetProperty("numberOfFilesUploaded").ToString()); + Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_UploadNodeLogs_AllParameters_Convenience() + public void Example_Batch_CreateTask_CreatesATaskWithExitConditions_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - UploadBatchServiceLogsContent content = new UploadBatchServiceLogsContent("", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")) + BatchTaskCreateContent task = new BatchTaskCreateContent("taskId", "cmd /c exit 3") { - EndTime = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), - IdentityReference = new BatchNodeIdentityReference + ExitConditions = new ExitConditions + { + ExitCodeRanges = {new ExitCodeRangeMapping(2, 4, new ExitOptions +{ +JobAction = BatchJobAction.Terminate, +})}, + }, + UserIdentity = new UserIdentity { - ResourceId = "", + AutoUser = new AutoUserSpecification + { + Scope = AutoUserScope.Task, + ElevationLevel = ElevationLevel.NonAdmin, + }, }, }; - Response response = client.UploadNodeLogs("", "", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + Response response = client.CreateTask("jobId", task); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_UploadNodeLogs_AllParameters_Convenience_Async() + public async Task Example_Batch_CreateTask_CreatesATaskWithExitConditions_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - UploadBatchServiceLogsContent content = new UploadBatchServiceLogsContent("", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")) + BatchTaskCreateContent task = new BatchTaskCreateContent("taskId", "cmd /c exit 3") { - EndTime = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), - IdentityReference = new BatchNodeIdentityReference + ExitConditions = new ExitConditions + { + ExitCodeRanges = {new ExitCodeRangeMapping(2, 4, new ExitOptions +{ +JobAction = BatchJobAction.Terminate, +})}, + }, + UserIdentity = new UserIdentity { - ResourceId = "", + AutoUser = new AutoUserSpecification + { + Scope = AutoUserScope.Task, + ElevationLevel = ElevationLevel.NonAdmin, + }, }, }; - Response response = await client.UploadNodeLogsAsync("", "", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + Response response = await client.CreateTaskAsync("jobId", task); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetNodeExtension_ShortVersion() + public void Example_Batch_CreateTask_CreatesATaskWithExtraSlotRequirement() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - Response response = client.GetNodeExtension("", "", "", null, null, null, null); + using RequestContent content = RequestContent.Create(new + { + id = "task1", + requiredSlots = 2, + commandLine = "cmd /c echo task1", + }); + Response response = client.CreateTask("jobId", content); - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetNodeExtension_ShortVersion_Async() + public async Task Example_Batch_CreateTask_CreatesATaskWithExtraSlotRequirement_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - Response response = await client.GetNodeExtensionAsync("", "", "", null, null, null, null); + using RequestContent content = RequestContent.Create(new + { + id = "task1", + requiredSlots = 2, + commandLine = "cmd /c echo task1", + }); + Response response = await client.CreateTaskAsync("jobId", content); - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetNodeExtension_ShortVersion_Convenience() + public void Example_Batch_CreateTask_CreatesATaskWithExtraSlotRequirement_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - Response response = client.GetNodeExtension("", "", ""); + BatchTaskCreateContent task = new BatchTaskCreateContent("task1", "cmd /c echo task1") + { + RequiredSlots = 2, + }; + Response response = client.CreateTask("jobId", task); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetNodeExtension_ShortVersion_Convenience_Async() + public async Task Example_Batch_CreateTask_CreatesATaskWithExtraSlotRequirement_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - Response response = await client.GetNodeExtensionAsync("", "", ""); + BatchTaskCreateContent task = new BatchTaskCreateContent("task1", "cmd /c echo task1") + { + RequiredSlots = 2, + }; + Response response = await client.CreateTaskAsync("jobId", task); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetNodeExtension_AllParameters() + public void Example_Batch_CreateTaskCollection_CreatesABasicCollectionOfTasks() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - Response response = client.GetNodeExtension("", "", "", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), new string[] { "" }, null); + using RequestContent content = RequestContent.Create(new + { + value = new object[] + { +new +{ +id = "simple1", +commandLine = "cmd /c dir /s", +}, +new +{ +id = "simple2", +commandLine = "cmd /c dir /s", +} + }, + }); + Response response = await client.CreateTaskCollectionAsync("jobId", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("provisioningState").ToString()); - Console.WriteLine(result.GetProperty("vmExtension").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("vmExtension").GetProperty("publisher").ToString()); - Console.WriteLine(result.GetProperty("vmExtension").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("vmExtension").GetProperty("typeHandlerVersion").ToString()); - Console.WriteLine(result.GetProperty("vmExtension").GetProperty("autoUpgradeMinorVersion").ToString()); - Console.WriteLine(result.GetProperty("vmExtension").GetProperty("enableAutomaticUpgrade").ToString()); - Console.WriteLine(result.GetProperty("vmExtension").GetProperty("settings").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("vmExtension").GetProperty("protectedSettings").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("vmExtension").GetProperty("provisionAfterExtensions")[0].ToString()); - Console.WriteLine(result.GetProperty("instanceView").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("instanceView").GetProperty("statuses")[0].GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("instanceView").GetProperty("statuses")[0].GetProperty("displayStatus").ToString()); - Console.WriteLine(result.GetProperty("instanceView").GetProperty("statuses")[0].GetProperty("level").ToString()); - Console.WriteLine(result.GetProperty("instanceView").GetProperty("statuses")[0].GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("instanceView").GetProperty("statuses")[0].GetProperty("time").ToString()); - Console.WriteLine(result.GetProperty("instanceView").GetProperty("subStatuses")[0].GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("instanceView").GetProperty("subStatuses")[0].GetProperty("displayStatus").ToString()); - Console.WriteLine(result.GetProperty("instanceView").GetProperty("subStatuses")[0].GetProperty("level").ToString()); - Console.WriteLine(result.GetProperty("instanceView").GetProperty("subStatuses")[0].GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("instanceView").GetProperty("subStatuses")[0].GetProperty("time").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetNodeExtension_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); - - Response response = client.GetNodeExtension("", "", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), select: new string[] { "" }); + BatchTaskGroup taskCollection = new BatchTaskGroup(new BatchTaskCreateContent[] + { +new BatchTaskCreateContent("simple1", "cmd /c dir /s"), +new BatchTaskCreateContent("simple2", "cmd /c dir /s") + }); + Response response = client.CreateTaskCollection("jobId", taskCollection); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_DeleteNodeFile_ShortVersion() + public async Task Example_Batch_CreateTaskCollection_CreatesABasicCollectionOfTasks_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - Response response = client.DeleteNodeFile("", "", ""); - - Console.WriteLine(response.Status); + BatchTaskGroup taskCollection = new BatchTaskGroup(new BatchTaskCreateContent[] + { +new BatchTaskCreateContent("simple1", "cmd /c dir /s"), +new BatchTaskCreateContent("simple2", "cmd /c dir /s") + }); + Response response = await client.CreateTaskCollectionAsync("jobId", taskCollection); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_DeleteNodeFile_ShortVersion_Async() + public void Example_Batch_CreateTaskCollection_CreatesAComplexCollectionOfTasks() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - Response response = await client.DeleteNodeFileAsync("", "", ""); + using RequestContent content = RequestContent.Create(new + { + value = new object[] + { +new +{ +id = "complex1", +commandLine = "cmd /c dir /s", +resourceFiles = new object[] +{ +new +{ +autoStorageContainerName = "containerName", +filePath = "data", +} +}, +environmentSettings = new object[] +{ +new +{ +name = "env1", +value = "value1", +}, +new +{ +name = "env2", +value = "value2", +} +}, +affinityInfo = new +{ +affinityId = "affinityId", +}, +constraints = new +{ +maxWallClockTime = "P1D", +retentionTime = "P2D", +maxTaskRetryCount = 5, +}, +requiredSlots = 2, +multiInstanceSettings = new +{ +numberOfInstances = 3, +coordinationCommandLine = "cmd /c echo coordinating", +commonResourceFiles = new object[] +{ +new +{ +httpUrl = "https://common.blob.core.windows.net/", +filePath = "common.exe", +} +}, +}, +}, +new +{ +id = "simple3", +commandLine = "cmd /c dir /s", +} + }, + }); + Response response = client.CreateTaskCollection("jobId", content); - Console.WriteLine(response.Status); + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_DeleteNodeFile_AllParameters() + public async Task Example_Batch_CreateTaskCollection_CreatesAComplexCollectionOfTasks_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - Response response = client.DeleteNodeFile("", "", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), recursive: true); + using RequestContent content = RequestContent.Create(new + { + value = new object[] + { +new +{ +id = "complex1", +commandLine = "cmd /c dir /s", +resourceFiles = new object[] +{ +new +{ +autoStorageContainerName = "containerName", +filePath = "data", +} +}, +environmentSettings = new object[] +{ +new +{ +name = "env1", +value = "value1", +}, +new +{ +name = "env2", +value = "value2", +} +}, +affinityInfo = new +{ +affinityId = "affinityId", +}, +constraints = new +{ +maxWallClockTime = "P1D", +retentionTime = "P2D", +maxTaskRetryCount = 5, +}, +requiredSlots = 2, +multiInstanceSettings = new +{ +numberOfInstances = 3, +coordinationCommandLine = "cmd /c echo coordinating", +commonResourceFiles = new object[] +{ +new +{ +httpUrl = "https://common.blob.core.windows.net/", +filePath = "common.exe", +} +}, +}, +}, +new +{ +id = "simple3", +commandLine = "cmd /c dir /s", +} + }, + }); + Response response = await client.CreateTaskCollectionAsync("jobId", content); - Console.WriteLine(response.Status); + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_DeleteNodeFile_AllParameters_Async() + public void Example_Batch_CreateTaskCollection_CreatesAComplexCollectionOfTasks_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - Response response = await client.DeleteNodeFileAsync("", "", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), recursive: true); - - Console.WriteLine(response.Status); + BatchTaskGroup taskCollection = new BatchTaskGroup(new BatchTaskCreateContent[] + { +new BatchTaskCreateContent("complex1", "cmd /c dir /s") +{ +ResourceFiles = {new ResourceFile +{ +AutoStorageContainerName = "containerName", +FilePath = "data", +}}, +EnvironmentSettings = {new EnvironmentSetting("env1") +{ +Value = "value1", +}, new EnvironmentSetting("env2") +{ +Value = "value2", +}}, +AffinityInfo = new AffinityInfo("affinityId"), +Constraints = new BatchTaskConstraints +{ +MaxWallClockTime = XmlConvert.ToTimeSpan("P1D"), +RetentionTime = XmlConvert.ToTimeSpan("P2D"), +MaxTaskRetryCount = 5, +}, +RequiredSlots = 2, +MultiInstanceSettings = new MultiInstanceSettings("cmd /c echo coordinating") +{ +NumberOfInstances = 3, +CommonResourceFiles = {new ResourceFile +{ +HttpUrl = "https://common.blob.core.windows.net/", +FilePath = "common.exe", +}}, +}, +}, +new BatchTaskCreateContent("simple3", "cmd /c dir /s") + }); + Response response = client.CreateTaskCollection("jobId", taskCollection); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetNodeFile_ShortVersion() + public async Task Example_Batch_CreateTaskCollection_CreatesAComplexCollectionOfTasks_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - Response response = client.GetNodeFile("", "", "", null, null, null, null, null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); + BatchTaskGroup taskCollection = new BatchTaskGroup(new BatchTaskCreateContent[] + { +new BatchTaskCreateContent("complex1", "cmd /c dir /s") +{ +ResourceFiles = {new ResourceFile +{ +AutoStorageContainerName = "containerName", +FilePath = "data", +}}, +EnvironmentSettings = {new EnvironmentSetting("env1") +{ +Value = "value1", +}, new EnvironmentSetting("env2") +{ +Value = "value2", +}}, +AffinityInfo = new AffinityInfo("affinityId"), +Constraints = new BatchTaskConstraints +{ +MaxWallClockTime = XmlConvert.ToTimeSpan("P1D"), +RetentionTime = XmlConvert.ToTimeSpan("P2D"), +MaxTaskRetryCount = 5, +}, +RequiredSlots = 2, +MultiInstanceSettings = new MultiInstanceSettings("cmd /c echo coordinating") +{ +NumberOfInstances = 3, +CommonResourceFiles = {new ResourceFile +{ +HttpUrl = "https://common.blob.core.windows.net/", +FilePath = "common.exe", +}}, +}, +}, +new BatchTaskCreateContent("simple3", "cmd /c dir /s") + }); + Response response = await client.CreateTaskCollectionAsync("jobId", taskCollection); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetNodeFile_ShortVersion_Async() + public void Example_Batch_DeleteTask_TaskDelete() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - Response response = await client.GetNodeFileAsync("", "", "", null, null, null, null, null); + Response response = client.DeleteTask("jobId", "taskId"); - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetNodeFile_ShortVersion_Convenience() + public async Task Example_Batch_DeleteTask_TaskDelete_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - Response response = client.GetNodeFile("", "", ""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetNodeFile_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); + Response response = await client.DeleteTaskAsync("jobId", "taskId"); - Response response = await client.GetNodeFileAsync("", "", ""); + Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetNodeFile_AllParameters() + public void Example_Batch_GetTask_TaskGet() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - Response response = client.GetNodeFile("", "", "", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), "", null, null); + Response response = client.GetTask("jobId", "taskId", null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null, null, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -16000,13 +5016,13 @@ public void Example_Batch_GetNodeFile_AllParameters() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetNodeFile_AllParameters_Async() + public async Task Example_Batch_GetTask_TaskGet_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - Response response = await client.GetNodeFileAsync("", "", "", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), "", null, null); + Response response = await client.GetTaskAsync("jobId", "taskId", null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null, null, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -16014,3663 +5030,1243 @@ public async Task Example_Batch_GetNodeFile_AllParameters_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetNodeFile_AllParameters_Convenience() + public void Example_Batch_GetTask_TaskGet_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - Response response = client.GetNodeFile("", "", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), ocpRange: "", requestConditions: null); + Response response = client.GetTask("jobId", "taskId"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetNodeFile_AllParameters_Convenience_Async() + public async Task Example_Batch_GetTask_TaskGet_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - Response response = await client.GetNodeFileAsync("", "", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), ocpRange: "", requestConditions: null); + Response response = await client.GetTaskAsync("jobId", "taskId"); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetApplications_ShortVersion() + public void Example_Batch_ReplaceTask_TaskUpdate() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - foreach (BinaryData item in client.GetApplications(null, null, null, null)) + using RequestContent content = RequestContent.Create(new { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("versions")[0].ToString()); - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetApplications_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); + constraints = new + { + maxWallClockTime = "PT1H", + maxTaskRetryCount = 3, + retentionTime = "PT1H", + }, + }); + Response response = client.ReplaceTask("jobId", "taskId", content); - await foreach (BinaryData item in client.GetApplicationsAsync(null, null, null, null)) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("versions")[0].ToString()); - } + Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetApplications_ShortVersion_Convenience() + public async Task Example_Batch_ReplaceTask_TaskUpdate_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - foreach (BatchApplication item in client.GetApplications()) + using RequestContent content = RequestContent.Create(new { - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetApplications_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); + constraints = new + { + maxWallClockTime = "PT1H", + maxTaskRetryCount = 3, + retentionTime = "PT1H", + }, + }); + Response response = await client.ReplaceTaskAsync("jobId", "taskId", content); - await foreach (BatchApplication item in client.GetApplicationsAsync()) - { - } + Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetApplications_AllParameters() + public void Example_Batch_ReplaceTask_TaskUpdate_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - foreach (BinaryData item in client.GetApplications(1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), 1234, null)) + BatchTask task = new BatchTask { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("versions")[0].ToString()); - } + Constraints = new BatchTaskConstraints + { + MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H"), + RetentionTime = XmlConvert.ToTimeSpan("PT1H"), + MaxTaskRetryCount = 3, + }, + }; + Response response = client.ReplaceTask("jobId", "taskId", task); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetApplications_AllParameters_Async() + public async Task Example_Batch_ReplaceTask_TaskUpdate_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - await foreach (BinaryData item in client.GetApplicationsAsync(1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), 1234, null)) + BatchTask task = new BatchTask { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("versions")[0].ToString()); - } + Constraints = new BatchTaskConstraints + { + MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H"), + RetentionTime = XmlConvert.ToTimeSpan("PT1H"), + MaxTaskRetryCount = 3, + }, + }; + Response response = await client.ReplaceTaskAsync("jobId", "taskId", task); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetApplications_AllParameters_Convenience() + public void Example_Batch_TerminateTask_TaskTerminate() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - foreach (BatchApplication item in client.GetApplications(timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), maxresults: 1234)) - { - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetApplications_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); + Response response = client.TerminateTask("jobId", "taskId"); - await foreach (BatchApplication item in client.GetApplicationsAsync(timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), maxresults: 1234)) - { - } + Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetPoolUsageMetrics_ShortVersion() + public async Task Example_Batch_TerminateTask_TaskTerminate_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - foreach (BinaryData item in client.GetPoolUsageMetrics(null, null, null, null, null, null, null)) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("poolId").ToString()); - Console.WriteLine(result.GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("vmSize").ToString()); - Console.WriteLine(result.GetProperty("totalCoreHours").ToString()); - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetPoolUsageMetrics_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - BatchClient client = new BatchClient(endpoint, credential); + Response response = await client.TerminateTaskAsync("jobId", "taskId"); - await foreach (BinaryData item in client.GetPoolUsageMetricsAsync(null, null, null, null, null, null, null)) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("poolId").ToString()); - Console.WriteLine(result.GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("vmSize").ToString()); - Console.WriteLine(result.GetProperty("totalCoreHours").ToString()); - } + Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetPoolUsageMetrics_ShortVersion_Convenience() + public void Example_Batch_ReactivateTask_TaskReactivate() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - foreach (BatchPoolUsageMetrics item in client.GetPoolUsageMetrics()) - { - } + Response response = client.ReactivateTask("jobId", "taskId"); + + Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetPoolUsageMetrics_ShortVersion_Convenience_Async() + public async Task Example_Batch_ReactivateTask_TaskReactivate_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - await foreach (BatchPoolUsageMetrics item in client.GetPoolUsageMetricsAsync()) - { - } + Response response = await client.ReactivateTaskAsync("jobId", "taskId"); + + Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetPoolUsageMetrics_AllParameters() + public void Example_Batch_DeleteTaskFile_FileDeleteFromTask() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - foreach (BinaryData item in client.GetPoolUsageMetrics(1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), 1234, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), "", null)) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("poolId").ToString()); - Console.WriteLine(result.GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("vmSize").ToString()); - Console.WriteLine(result.GetProperty("totalCoreHours").ToString()); - } + Response response = client.DeleteTaskFile("jobId", "task1", "wd\\testFile.txt"); + + Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetPoolUsageMetrics_AllParameters_Async() + public async Task Example_Batch_DeleteTaskFile_FileDeleteFromTask_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - await foreach (BinaryData item in client.GetPoolUsageMetricsAsync(1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), 1234, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), "", null)) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("poolId").ToString()); - Console.WriteLine(result.GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("vmSize").ToString()); - Console.WriteLine(result.GetProperty("totalCoreHours").ToString()); - } + Response response = await client.DeleteTaskFileAsync("jobId", "task1", "wd\\testFile.txt"); + + Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetPoolUsageMetrics_AllParameters_Convenience() + public void Example_Batch_GetTaskFile_GetFileFromTask() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - foreach (BatchPoolUsageMetrics item in client.GetPoolUsageMetrics(timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), maxresults: 1234, starttime: DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), endtime: DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), filter: "")) - { - } + Response response = client.GetTaskFile("jobId", "task1", "wd\\testFile.txt", null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null, null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetPoolUsageMetrics_AllParameters_Convenience_Async() + public async Task Example_Batch_GetTaskFile_GetFileFromTask_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - await foreach (BatchPoolUsageMetrics item in client.GetPoolUsageMetricsAsync(timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), maxresults: 1234, starttime: DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), endtime: DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), filter: "")) - { - } + Response response = await client.GetTaskFileAsync("jobId", "task1", "wd\\testFile.txt", null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null, null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetPools_ShortVersion() + public void Example_Batch_GetTaskFile_GetFileFromTask_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - foreach (BinaryData item in client.GetPools(null, null, null, null, null, null, null)) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); - } + Response response = client.GetTaskFile("jobId", "task1", "wd\\testFile.txt"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetPools_ShortVersion_Async() + public async Task Example_Batch_GetTaskFile_GetFileFromTask_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - await foreach (BinaryData item in client.GetPoolsAsync(null, null, null, null, null, null, null)) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); - } + Response response = await client.GetTaskFileAsync("jobId", "task1", "wd\\testFile.txt"); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetPools_ShortVersion_Convenience() + public void Example_Batch_CreateNodeUser_NodeCreateUser() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - foreach (BatchPool item in client.GetPools()) + using RequestContent content = RequestContent.Create(new { - } + name = "userName", + isAdmin = false, + expiryTime = "2017-08-01T00:00:00Z", + password = "Password", + }); + Response response = client.CreateNodeUser("poolId", "tvm-1695681911_1-20161121t182739z", content); + + Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetPools_ShortVersion_Convenience_Async() + public async Task Example_Batch_CreateNodeUser_NodeCreateUser_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - await foreach (BatchPool item in client.GetPoolsAsync()) + using RequestContent content = RequestContent.Create(new { - } + name = "userName", + isAdmin = false, + expiryTime = "2017-08-01T00:00:00Z", + password = "Password", + }); + Response response = await client.CreateNodeUserAsync("poolId", "tvm-1695681911_1-20161121t182739z", content); + + Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetPools_AllParameters() + public void Example_Batch_CreateNodeUser_NodeCreateUser_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - foreach (BinaryData item in client.GetPools(1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), 1234, "", new string[] { "" }, new string[] { "" }, null)) + BatchNodeUserCreateContent user = new BatchNodeUserCreateContent("userName") { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("url").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("lastModified").ToString()); - Console.WriteLine(result.GetProperty("creationTime").ToString()); - Console.WriteLine(result.GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("stateTransitionTime").ToString()); - Console.WriteLine(result.GetProperty("allocationState").ToString()); - Console.WriteLine(result.GetProperty("allocationStateTransitionTime").ToString()); - Console.WriteLine(result.GetProperty("vmSize").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("publisher").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("offer").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("sku").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("virtualMachineImageId").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("exactVersion").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("nodeAgentSKUId").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("windowsConfiguration").GetProperty("enableAutomaticUpdates").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("lun").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("caching").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("diskSizeGB").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("storageAccountType").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("licenseType").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerImageNames")[0].ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("password").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("registryServer").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("diskEncryptionConfiguration").GetProperty("targets")[0].ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("nodePlacementConfiguration").GetProperty("policy").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("publisher").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("typeHandlerVersion").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("autoUpgradeMinorVersion").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("enableAutomaticUpgrade").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("settings").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("protectedSettings").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("provisionAfterExtensions")[0].ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("ephemeralOSDiskSettings").GetProperty("placement").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("caching").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("managedDisk").GetProperty("storageAccountType").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("writeAcceleratorEnabled").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("encryptionAtHost").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("securityType").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("uefiSettings").GetProperty("secureBootEnabled").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("uefiSettings").GetProperty("vTpmEnabled").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("serviceArtifactReference").GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("resizeTimeout").ToString()); - Console.WriteLine(result.GetProperty("resizeErrors")[0].GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("resizeErrors")[0].GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("resizeErrors")[0].GetProperty("values")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("resizeErrors")[0].GetProperty("values")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("resourceTags").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("currentDedicatedNodes").ToString()); - Console.WriteLine(result.GetProperty("currentLowPriorityNodes").ToString()); - Console.WriteLine(result.GetProperty("targetDedicatedNodes").ToString()); - Console.WriteLine(result.GetProperty("targetLowPriorityNodes").ToString()); - Console.WriteLine(result.GetProperty("enableAutoScale").ToString()); - Console.WriteLine(result.GetProperty("autoScaleFormula").ToString()); - Console.WriteLine(result.GetProperty("autoScaleEvaluationInterval").ToString()); - Console.WriteLine(result.GetProperty("autoScaleRun").GetProperty("timestamp").ToString()); - Console.WriteLine(result.GetProperty("autoScaleRun").GetProperty("results").ToString()); - Console.WriteLine(result.GetProperty("autoScaleRun").GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("autoScaleRun").GetProperty("error").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("autoScaleRun").GetProperty("error").GetProperty("values")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("autoScaleRun").GetProperty("error").GetProperty("values")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("enableInterNodeCommunication").ToString()); - Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("subnetId").ToString()); - Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("dynamicVNetAssignmentScope").ToString()); - Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("protocol").ToString()); - Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("backendPort").ToString()); - Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("frontendPortRangeStart").ToString()); - Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("frontendPortRangeEnd").ToString()); - Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("priority").ToString()); - Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("access").ToString()); - Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("sourceAddressPrefix").ToString()); - Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("sourcePortRanges")[0].ToString()); - Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("publicIPAddressConfiguration").GetProperty("provision").ToString()); - Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("publicIPAddressConfiguration").GetProperty("ipAddressIds")[0].ToString()); - Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("enableAcceleratedNetworking").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("commandLine").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("userIdentity").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("maxTaskRetryCount").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("waitForSuccess").ToString()); - Console.WriteLine(result.GetProperty("applicationPackageReferences")[0].GetProperty("applicationId").ToString()); - Console.WriteLine(result.GetProperty("applicationPackageReferences")[0].GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("taskSlotsPerNode").ToString()); - Console.WriteLine(result.GetProperty("taskSchedulingPolicy").GetProperty("nodeFillType").ToString()); - Console.WriteLine(result.GetProperty("userAccounts")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("userAccounts")[0].GetProperty("password").ToString()); - Console.WriteLine(result.GetProperty("userAccounts")[0].GetProperty("elevationLevel").ToString()); - Console.WriteLine(result.GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("uid").ToString()); - Console.WriteLine(result.GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("gid").ToString()); - Console.WriteLine(result.GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("sshPrivateKey").ToString()); - Console.WriteLine(result.GetProperty("userAccounts")[0].GetProperty("windowsUserConfiguration").GetProperty("loginMode").ToString()); - Console.WriteLine(result.GetProperty("metadata")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("metadata")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("url").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("lastUpdateTime").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("usageStats").GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("usageStats").GetProperty("lastUpdateTime").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("usageStats").GetProperty("dedicatedCoreTime").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("lastUpdateTime").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("avgCPUPercentage").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("avgMemoryGiB").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("peakMemoryGiB").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("avgDiskGiB").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("peakDiskGiB").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("diskReadIOps").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("diskWriteIOps").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("diskReadGiB").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("diskWriteGiB").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("networkReadGiB").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("networkWriteGiB").ToString()); - Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("accountName").ToString()); - Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("containerName").ToString()); - Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("accountKey").ToString()); - Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("sasKey").ToString()); - Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("blobfuseOptions").ToString()); - Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("relativeMountPath").ToString()); - Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("relativeMountPath").ToString()); - Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("mountOptions").ToString()); - Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("relativeMountPath").ToString()); - Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("mountOptions").ToString()); - Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("password").ToString()); - Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("accountName").ToString()); - Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("azureFileUrl").ToString()); - Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("accountKey").ToString()); - Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("relativeMountPath").ToString()); - Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("mountOptions").ToString()); - Console.WriteLine(result.GetProperty("identity").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("identity").GetProperty("userAssignedIdentities")[0].GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("identity").GetProperty("userAssignedIdentities")[0].GetProperty("clientId").ToString()); - Console.WriteLine(result.GetProperty("identity").GetProperty("userAssignedIdentities")[0].GetProperty("principalId").ToString()); - Console.WriteLine(result.GetProperty("targetNodeCommunicationMode").ToString()); - Console.WriteLine(result.GetProperty("currentNodeCommunicationMode").ToString()); - Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("mode").ToString()); - Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("disableAutomaticRollback").ToString()); - Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("enableAutomaticOSUpgrade").ToString()); - Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("useRollingUpgradePolicy").ToString()); - Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("osRollingUpgradeDeferral").ToString()); - Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("enableCrossZoneUpgrade").ToString()); - Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxBatchInstancePercent").ToString()); - Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxUnhealthyInstancePercent").ToString()); - Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxUnhealthyUpgradedInstancePercent").ToString()); - Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("pauseTimeBetweenBatches").ToString()); - Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("prioritizeUnhealthyInstances").ToString()); - Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("rollbackFailedInstancesOnPolicyBreach").ToString()); - } + IsAdmin = false, + ExpiryTime = DateTimeOffset.Parse("2017-08-01T00:00:00Z"), + Password = "Password", + }; + Response response = await client.CreateNodeUserAsync("poolId", "tvm-1695681911_1-20161121t182739z", user); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetPools_AllParameters_Convenience() + public void Example_Batch_DeleteNodeUser_NodeDeleteUser() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - foreach (BatchPool item in client.GetPools(timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), maxresults: 1234, filter: "", select: new string[] { "" }, expand: new string[] { "" })) - { - } + Response response = await client.DeleteNodeUserAsync("poolId", "tvm-1695681911_1-20161121t182739z", "userName"); + + Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetSupportedImages_ShortVersion() + public void Example_Batch_ReplaceNodeUser_NodeUpdateUser() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - foreach (BinaryData item in client.GetSupportedImages(null, null, null, null, null)) + using RequestContent content = RequestContent.Create(new { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("nodeAgentSKUId").ToString()); - Console.WriteLine(result.GetProperty("imageReference").ToString()); - Console.WriteLine(result.GetProperty("osType").ToString()); - Console.WriteLine(result.GetProperty("verificationType").ToString()); - } + password = "12345", + expiryTime = "2016-11-27T00:45:48.7320857Z", + }); + Response response = client.ReplaceNodeUser("poolId", "tvm-1695681911_1-20161121t182739z", "userName", content); + + Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetSupportedImages_ShortVersion_Async() + public async Task Example_Batch_ReplaceNodeUser_NodeUpdateUser_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - await foreach (BinaryData item in client.GetSupportedImagesAsync(null, null, null, null, null)) + using RequestContent content = RequestContent.Create(new { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("nodeAgentSKUId").ToString()); - Console.WriteLine(result.GetProperty("imageReference").ToString()); - Console.WriteLine(result.GetProperty("osType").ToString()); - Console.WriteLine(result.GetProperty("verificationType").ToString()); - } + password = "12345", + expiryTime = "2016-11-27T00:45:48.7320857Z", + }); + Response response = await client.ReplaceNodeUserAsync("poolId", "tvm-1695681911_1-20161121t182739z", "userName", content); + + Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetSupportedImages_ShortVersion_Convenience() + public void Example_Batch_ReplaceNodeUser_NodeUpdateUser_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - foreach (BatchSupportedImage item in client.GetSupportedImages()) + BatchNodeUserUpdateContent content = new BatchNodeUserUpdateContent { - } + Password = "12345", + ExpiryTime = DateTimeOffset.Parse("2016-11-27T00:45:48.7320857Z"), + }; + Response response = client.ReplaceNodeUser("poolId", "tvm-1695681911_1-20161121t182739z", "userName", content); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetSupportedImages_ShortVersion_Convenience_Async() + public async Task Example_Batch_ReplaceNodeUser_NodeUpdateUser_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - await foreach (BatchSupportedImage item in client.GetSupportedImagesAsync()) + BatchNodeUserUpdateContent content = new BatchNodeUserUpdateContent { - } + Password = "12345", + ExpiryTime = DateTimeOffset.Parse("2016-11-27T00:45:48.7320857Z"), + }; + Response response = await client.ReplaceNodeUserAsync("poolId", "tvm-1695681911_1-20161121t182739z", "userName", content); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetSupportedImages_AllParameters() + public void Example_Batch_GetNode_NodeGet() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - foreach (BinaryData item in client.GetSupportedImages(1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), 1234, "", null)) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("nodeAgentSKUId").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("publisher").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("offer").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("sku").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("virtualMachineImageId").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("exactVersion").ToString()); - Console.WriteLine(result.GetProperty("osType").ToString()); - Console.WriteLine(result.GetProperty("capabilities")[0].ToString()); - Console.WriteLine(result.GetProperty("batchSupportEndOfLife").ToString()); - Console.WriteLine(result.GetProperty("verificationType").ToString()); - } + Response response = client.GetNode("poolId", "tvm-1695681911_2-20161122t193202z", null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetSupportedImages_AllParameters_Async() + public async Task Example_Batch_GetNode_NodeGet_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - await foreach (BinaryData item in client.GetSupportedImagesAsync(1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), 1234, "", null)) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("nodeAgentSKUId").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("publisher").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("offer").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("sku").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("virtualMachineImageId").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("exactVersion").ToString()); - Console.WriteLine(result.GetProperty("osType").ToString()); - Console.WriteLine(result.GetProperty("capabilities")[0].ToString()); - Console.WriteLine(result.GetProperty("batchSupportEndOfLife").ToString()); - Console.WriteLine(result.GetProperty("verificationType").ToString()); - } + Response response = await client.GetNodeAsync("poolId", "tvm-1695681911_2-20161122t193202z", null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetSupportedImages_AllParameters_Convenience() + public void Example_Batch_GetNode_NodeGet_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - foreach (BatchSupportedImage item in client.GetSupportedImages(timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), maxresults: 1234, filter: "")) - { - } + Response response = client.GetNode("poolId", "tvm-1695681911_2-20161122t193202z"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetSupportedImages_AllParameters_Convenience_Async() + public async Task Example_Batch_GetNode_NodeGet_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - await foreach (BatchSupportedImage item in client.GetSupportedImagesAsync(timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), maxresults: 1234, filter: "")) - { - } + Response response = await client.GetNodeAsync("poolId", "tvm-1695681911_2-20161122t193202z"); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetPoolNodeCounts_ShortVersion() + public void Example_Batch_RebootNode_NodeReboot() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - foreach (BinaryData item in client.GetPoolNodeCounts(null, null, null, null, null)) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("poolId").ToString()); - } + using RequestContent content = null; + Response response = client.RebootNode("poolId", "tvm-1695681911_1-20161122t193202z", content); + + Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetPoolNodeCounts_ShortVersion_Async() + public async Task Example_Batch_RebootNode_NodeReboot_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - await foreach (BinaryData item in client.GetPoolNodeCountsAsync(null, null, null, null, null)) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("poolId").ToString()); - } + using RequestContent content = null; + Response response = await client.RebootNodeAsync("poolId", "tvm-1695681911_1-20161122t193202z", content); + + Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetPoolNodeCounts_ShortVersion_Convenience() + public void Example_Batch_RebootNode_NodeReboot_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - foreach (BatchPoolNodeCounts item in client.GetPoolNodeCounts()) - { - } + Response response = client.RebootNode("poolId", "tvm-1695681911_1-20161122t193202z"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetPoolNodeCounts_ShortVersion_Convenience_Async() + public async Task Example_Batch_RebootNode_NodeReboot_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - await foreach (BatchPoolNodeCounts item in client.GetPoolNodeCountsAsync()) - { - } + Response response = await client.RebootNodeAsync("poolId", "tvm-1695681911_1-20161122t193202z"); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetPoolNodeCounts_AllParameters() + public void Example_Batch_DisableNodeScheduling_NodeDisableScheduling() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - foreach (BinaryData item in client.GetPoolNodeCounts(1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), 1234, "", null)) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("poolId").ToString()); - Console.WriteLine(result.GetProperty("dedicated").GetProperty("creating").ToString()); - Console.WriteLine(result.GetProperty("dedicated").GetProperty("idle").ToString()); - Console.WriteLine(result.GetProperty("dedicated").GetProperty("offline").ToString()); - Console.WriteLine(result.GetProperty("dedicated").GetProperty("preempted").ToString()); - Console.WriteLine(result.GetProperty("dedicated").GetProperty("rebooting").ToString()); - Console.WriteLine(result.GetProperty("dedicated").GetProperty("reimaging").ToString()); - Console.WriteLine(result.GetProperty("dedicated").GetProperty("running").ToString()); - Console.WriteLine(result.GetProperty("dedicated").GetProperty("starting").ToString()); - Console.WriteLine(result.GetProperty("dedicated").GetProperty("startTaskFailed").ToString()); - Console.WriteLine(result.GetProperty("dedicated").GetProperty("leavingPool").ToString()); - Console.WriteLine(result.GetProperty("dedicated").GetProperty("unknown").ToString()); - Console.WriteLine(result.GetProperty("dedicated").GetProperty("unusable").ToString()); - Console.WriteLine(result.GetProperty("dedicated").GetProperty("waitingForStartTask").ToString()); - Console.WriteLine(result.GetProperty("dedicated").GetProperty("total").ToString()); - Console.WriteLine(result.GetProperty("dedicated").GetProperty("upgradingOS").ToString()); - Console.WriteLine(result.GetProperty("lowPriority").GetProperty("creating").ToString()); - Console.WriteLine(result.GetProperty("lowPriority").GetProperty("idle").ToString()); - Console.WriteLine(result.GetProperty("lowPriority").GetProperty("offline").ToString()); - Console.WriteLine(result.GetProperty("lowPriority").GetProperty("preempted").ToString()); - Console.WriteLine(result.GetProperty("lowPriority").GetProperty("rebooting").ToString()); - Console.WriteLine(result.GetProperty("lowPriority").GetProperty("reimaging").ToString()); - Console.WriteLine(result.GetProperty("lowPriority").GetProperty("running").ToString()); - Console.WriteLine(result.GetProperty("lowPriority").GetProperty("starting").ToString()); - Console.WriteLine(result.GetProperty("lowPriority").GetProperty("startTaskFailed").ToString()); - Console.WriteLine(result.GetProperty("lowPriority").GetProperty("leavingPool").ToString()); - Console.WriteLine(result.GetProperty("lowPriority").GetProperty("unknown").ToString()); - Console.WriteLine(result.GetProperty("lowPriority").GetProperty("unusable").ToString()); - Console.WriteLine(result.GetProperty("lowPriority").GetProperty("waitingForStartTask").ToString()); - Console.WriteLine(result.GetProperty("lowPriority").GetProperty("total").ToString()); - Console.WriteLine(result.GetProperty("lowPriority").GetProperty("upgradingOS").ToString()); - } + using RequestContent content = null; + Response response = client.DisableNodeScheduling("poolId", "tvm-1695681911_1-20161122t193202z", content); + + Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetPoolNodeCounts_AllParameters_Async() + public async Task Example_Batch_DisableNodeScheduling_NodeDisableScheduling_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - await foreach (BinaryData item in client.GetPoolNodeCountsAsync(1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), 1234, "", null)) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("poolId").ToString()); - Console.WriteLine(result.GetProperty("dedicated").GetProperty("creating").ToString()); - Console.WriteLine(result.GetProperty("dedicated").GetProperty("idle").ToString()); - Console.WriteLine(result.GetProperty("dedicated").GetProperty("offline").ToString()); - Console.WriteLine(result.GetProperty("dedicated").GetProperty("preempted").ToString()); - Console.WriteLine(result.GetProperty("dedicated").GetProperty("rebooting").ToString()); - Console.WriteLine(result.GetProperty("dedicated").GetProperty("reimaging").ToString()); - Console.WriteLine(result.GetProperty("dedicated").GetProperty("running").ToString()); - Console.WriteLine(result.GetProperty("dedicated").GetProperty("starting").ToString()); - Console.WriteLine(result.GetProperty("dedicated").GetProperty("startTaskFailed").ToString()); - Console.WriteLine(result.GetProperty("dedicated").GetProperty("leavingPool").ToString()); - Console.WriteLine(result.GetProperty("dedicated").GetProperty("unknown").ToString()); - Console.WriteLine(result.GetProperty("dedicated").GetProperty("unusable").ToString()); - Console.WriteLine(result.GetProperty("dedicated").GetProperty("waitingForStartTask").ToString()); - Console.WriteLine(result.GetProperty("dedicated").GetProperty("total").ToString()); - Console.WriteLine(result.GetProperty("dedicated").GetProperty("upgradingOS").ToString()); - Console.WriteLine(result.GetProperty("lowPriority").GetProperty("creating").ToString()); - Console.WriteLine(result.GetProperty("lowPriority").GetProperty("idle").ToString()); - Console.WriteLine(result.GetProperty("lowPriority").GetProperty("offline").ToString()); - Console.WriteLine(result.GetProperty("lowPriority").GetProperty("preempted").ToString()); - Console.WriteLine(result.GetProperty("lowPriority").GetProperty("rebooting").ToString()); - Console.WriteLine(result.GetProperty("lowPriority").GetProperty("reimaging").ToString()); - Console.WriteLine(result.GetProperty("lowPriority").GetProperty("running").ToString()); - Console.WriteLine(result.GetProperty("lowPriority").GetProperty("starting").ToString()); - Console.WriteLine(result.GetProperty("lowPriority").GetProperty("startTaskFailed").ToString()); - Console.WriteLine(result.GetProperty("lowPriority").GetProperty("leavingPool").ToString()); - Console.WriteLine(result.GetProperty("lowPriority").GetProperty("unknown").ToString()); - Console.WriteLine(result.GetProperty("lowPriority").GetProperty("unusable").ToString()); - Console.WriteLine(result.GetProperty("lowPriority").GetProperty("waitingForStartTask").ToString()); - Console.WriteLine(result.GetProperty("lowPriority").GetProperty("total").ToString()); - Console.WriteLine(result.GetProperty("lowPriority").GetProperty("upgradingOS").ToString()); - } + using RequestContent content = null; + Response response = await client.DisableNodeSchedulingAsync("poolId", "tvm-1695681911_1-20161122t193202z", content); + + Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetPoolNodeCounts_AllParameters_Convenience() + public void Example_Batch_DisableNodeScheduling_NodeDisableScheduling_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - foreach (BatchPoolNodeCounts item in client.GetPoolNodeCounts(timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), maxresults: 1234, filter: "")) - { - } + Response response = client.DisableNodeScheduling("poolId", "tvm-1695681911_1-20161122t193202z"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetPoolNodeCounts_AllParameters_Convenience_Async() + public async Task Example_Batch_DisableNodeScheduling_NodeDisableScheduling_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - await foreach (BatchPoolNodeCounts item in client.GetPoolNodeCountsAsync(timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), maxresults: 1234, filter: "")) - { - } + Response response = await client.DisableNodeSchedulingAsync("poolId", "tvm-1695681911_1-20161122t193202z"); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetJobs_ShortVersion() + public void Example_Batch_EnableNodeScheduling_NodeEnableScheduling() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - foreach (BinaryData item in client.GetJobs(null, null, null, null, null, null, null)) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("poolInfo").ToString()); - } + Response response = client.EnableNodeScheduling("poolId", "tvm-1695681911_1-20161122t193202z"); + + Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetJobs_ShortVersion_Async() + public async Task Example_Batch_EnableNodeScheduling_NodeEnableScheduling_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - await foreach (BinaryData item in client.GetJobsAsync(null, null, null, null, null, null, null)) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("poolInfo").ToString()); - } + Response response = await client.EnableNodeSchedulingAsync("poolId", "tvm-1695681911_1-20161122t193202z"); + + Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetJobs_ShortVersion_Convenience() + public void Example_Batch_GetNodeRemoteLoginSettings_NodeGetRemoteLoginSettings() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - foreach (BatchJob item in client.GetJobs()) - { - } + Response response = client.GetNodeRemoteLoginSettings("poolId", "tvm-1695681911_1-20161121t182739z", null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("remoteLoginIPAddress").ToString()); + Console.WriteLine(result.GetProperty("remoteLoginPort").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetJobs_ShortVersion_Convenience_Async() + public async Task Example_Batch_GetNodeRemoteLoginSettings_NodeGetRemoteLoginSettings_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - await foreach (BatchJob item in client.GetJobsAsync()) - { - } + Response response = await client.GetNodeRemoteLoginSettingsAsync("poolId", "tvm-1695681911_1-20161121t182739z", null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("remoteLoginIPAddress").ToString()); + Console.WriteLine(result.GetProperty("remoteLoginPort").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetJobs_AllParameters() + public void Example_Batch_GetNodeRemoteLoginSettings_NodeGetRemoteLoginSettings_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - foreach (BinaryData item in client.GetJobs(1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), 1234, "", new string[] { "" }, new string[] { "" }, null)) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("usesTaskDependencies").ToString()); - Console.WriteLine(result.GetProperty("url").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("lastModified").ToString()); - Console.WriteLine(result.GetProperty("creationTime").ToString()); - Console.WriteLine(result.GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("stateTransitionTime").ToString()); - Console.WriteLine(result.GetProperty("previousState").ToString()); - Console.WriteLine(result.GetProperty("previousStateTransitionTime").ToString()); - Console.WriteLine(result.GetProperty("priority").ToString()); - Console.WriteLine(result.GetProperty("allowTaskPreemption").ToString()); - Console.WriteLine(result.GetProperty("maxParallelTasks").ToString()); - Console.WriteLine(result.GetProperty("constraints").GetProperty("maxWallClockTime").ToString()); - Console.WriteLine(result.GetProperty("constraints").GetProperty("maxTaskRetryCount").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("commandLine").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("filePattern").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("path").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("containerUrl").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("uploadHeaders")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("uploadHeaders")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("uploadOptions").GetProperty("uploadCondition").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("constraints").GetProperty("maxWallClockTime").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("constraints").GetProperty("retentionTime").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("constraints").GetProperty("maxTaskRetryCount").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("requiredSlots").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("killJobOnCompletion").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("userIdentity").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("runExclusive").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("applicationPackageReferences")[0].GetProperty("applicationId").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("applicationPackageReferences")[0].GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("authenticationTokenSettings").GetProperty("access")[0].ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("allowLowPriorityNode").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("commandLine").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("constraints").GetProperty("maxWallClockTime").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("constraints").GetProperty("retentionTime").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("constraints").GetProperty("maxTaskRetryCount").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("waitForSuccess").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("userIdentity").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("rerunOnNodeRebootAfterSuccess").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("commandLine").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("maxWallClockTime").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("retentionTime").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("userIdentity").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); - Console.WriteLine(result.GetProperty("commonEnvironmentSettings")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("commonEnvironmentSettings")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("poolId").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("autoPoolIdPrefix").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("poolLifetimeOption").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("keepAlive").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("vmSize").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("publisher").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("offer").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("sku").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("virtualMachineImageId").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("exactVersion").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("nodeAgentSKUId").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("windowsConfiguration").GetProperty("enableAutomaticUpdates").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("lun").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("caching").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("diskSizeGB").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("storageAccountType").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("licenseType").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerImageNames")[0].ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("password").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("registryServer").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("diskEncryptionConfiguration").GetProperty("targets")[0].ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("nodePlacementConfiguration").GetProperty("policy").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("publisher").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("typeHandlerVersion").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("autoUpgradeMinorVersion").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("enableAutomaticUpgrade").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("settings").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("protectedSettings").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("provisionAfterExtensions")[0].ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("ephemeralOSDiskSettings").GetProperty("placement").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("caching").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("managedDisk").GetProperty("storageAccountType").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("writeAcceleratorEnabled").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("encryptionAtHost").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("securityType").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("uefiSettings").GetProperty("secureBootEnabled").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("uefiSettings").GetProperty("vTpmEnabled").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("serviceArtifactReference").GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("taskSlotsPerNode").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("taskSchedulingPolicy").GetProperty("nodeFillType").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("resizeTimeout").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("resourceTags").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("targetDedicatedNodes").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("targetLowPriorityNodes").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("enableAutoScale").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("autoScaleFormula").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("autoScaleEvaluationInterval").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("enableInterNodeCommunication").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("subnetId").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("dynamicVNetAssignmentScope").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("protocol").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("backendPort").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("frontendPortRangeStart").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("frontendPortRangeEnd").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("priority").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("access").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("sourceAddressPrefix").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("sourcePortRanges")[0].ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("publicIPAddressConfiguration").GetProperty("provision").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("publicIPAddressConfiguration").GetProperty("ipAddressIds")[0].ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("enableAcceleratedNetworking").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("commandLine").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("userIdentity").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("maxTaskRetryCount").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("waitForSuccess").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("applicationPackageReferences")[0].GetProperty("applicationId").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("applicationPackageReferences")[0].GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("password").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("elevationLevel").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("uid").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("gid").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("sshPrivateKey").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("windowsUserConfiguration").GetProperty("loginMode").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("metadata")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("metadata")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("accountName").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("containerName").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("accountKey").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("sasKey").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("blobfuseOptions").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("relativeMountPath").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("relativeMountPath").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("mountOptions").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("relativeMountPath").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("mountOptions").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("password").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("accountName").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("azureFileUrl").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("accountKey").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("relativeMountPath").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("mountOptions").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("targetNodeCommunicationMode").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("mode").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("disableAutomaticRollback").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("enableAutomaticOSUpgrade").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("useRollingUpgradePolicy").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("osRollingUpgradeDeferral").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("enableCrossZoneUpgrade").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxBatchInstancePercent").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxUnhealthyInstancePercent").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxUnhealthyUpgradedInstancePercent").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("pauseTimeBetweenBatches").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("prioritizeUnhealthyInstances").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("rollbackFailedInstancesOnPolicyBreach").ToString()); - Console.WriteLine(result.GetProperty("onAllTasksComplete").ToString()); - Console.WriteLine(result.GetProperty("onTaskFailure").ToString()); - Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("subnetId").ToString()); - Console.WriteLine(result.GetProperty("metadata")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("metadata")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("poolId").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("schedulingError").GetProperty("category").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("schedulingError").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("schedulingError").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("schedulingError").GetProperty("details")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("schedulingError").GetProperty("details")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("terminateReason").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("url").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("lastUpdateTime").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("userCPUTime").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("kernelCPUTime").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("wallClockTime").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("readIOps").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("writeIOps").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("readIOGiB").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("writeIOGiB").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("numSucceededTasks").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("numFailedTasks").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("numTaskRetries").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("waitTime").ToString()); - } + Response response = await client.GetNodeRemoteLoginSettingsAsync("poolId", "tvm-1695681911_1-20161121t182739z"); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetJobs_AllParameters_Convenience() + public void Example_Batch_UploadNodeLogs_UploadBatchServiceLogs() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - foreach (BatchJob item in client.GetJobs(timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), maxresults: 1234, filter: "", select: new string[] { "" }, expand: new string[] { "" })) + using RequestContent content = RequestContent.Create(new { - } + containerUrl = "https://somestorageacct.blob.core.windows.net/batch-compute-node-logs?se=2017-12-09T18%3A51%3A00Z&sp=w&sv=2016-05-31&sr=c&sig", + startTime = "2017-11-27T00:00:00Z", + }); + Response response = await client.UploadNodeLogsAsync("poolId", "tvm-1695681911_1-20161121t182739z", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("virtualDirectoryName").ToString()); + Console.WriteLine(result.GetProperty("numberOfFilesUploaded").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetJobsFromSchedules_ShortVersion() + public void Example_Batch_UploadNodeLogs_UploadBatchServiceLogs_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - foreach (BinaryData item in client.GetJobsFromSchedules("", null, null, null, null, null, null, null)) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("poolInfo").ToString()); - } + UploadBatchServiceLogsContent content = new UploadBatchServiceLogsContent("https://somestorageacct.blob.core.windows.net/batch-compute-node-logs?se=2017-12-09T18%3A51%3A00Z&sp=w&sv=2016-05-31&sr=c&sig", DateTimeOffset.Parse("2017-11-27T00:00:00Z")); + Response response = client.UploadNodeLogs("poolId", "tvm-1695681911_1-20161121t182739z", content); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetJobsFromSchedules_ShortVersion_Async() + public async Task Example_Batch_UploadNodeLogs_UploadBatchServiceLogs_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - await foreach (BinaryData item in client.GetJobsFromSchedulesAsync("", null, null, null, null, null, null, null)) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("poolInfo").ToString()); - } + UploadBatchServiceLogsContent content = new UploadBatchServiceLogsContent("https://somestorageacct.blob.core.windows.net/batch-compute-node-logs?se=2017-12-09T18%3A51%3A00Z&sp=w&sv=2016-05-31&sr=c&sig", DateTimeOffset.Parse("2017-11-27T00:00:00Z")); + Response response = await client.UploadNodeLogsAsync("poolId", "tvm-1695681911_1-20161121t182739z", content); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetJobsFromSchedules_ShortVersion_Convenience() + public void Example_Batch_GetNodeExtension_GetBatchNodeExtension() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - foreach (BatchJob item in client.GetJobsFromSchedules("")) - { - } + Response response = client.GetNodeExtension("poolId", "tvm-1695681911_2-20161122t193202z", "batchNodeExtension", null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetJobsFromSchedules_ShortVersion_Convenience_Async() + public async Task Example_Batch_GetNodeExtension_GetBatchNodeExtension_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - await foreach (BatchJob item in client.GetJobsFromSchedulesAsync("")) - { - } + Response response = await client.GetNodeExtensionAsync("poolId", "tvm-1695681911_2-20161122t193202z", "batchNodeExtension", null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetJobsFromSchedules_AllParameters() + public void Example_Batch_GetNodeExtension_GetBatchNodeExtension_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - foreach (BinaryData item in client.GetJobsFromSchedules("", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), 1234, "", new string[] { "" }, new string[] { "" }, null)) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("usesTaskDependencies").ToString()); - Console.WriteLine(result.GetProperty("url").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("lastModified").ToString()); - Console.WriteLine(result.GetProperty("creationTime").ToString()); - Console.WriteLine(result.GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("stateTransitionTime").ToString()); - Console.WriteLine(result.GetProperty("previousState").ToString()); - Console.WriteLine(result.GetProperty("previousStateTransitionTime").ToString()); - Console.WriteLine(result.GetProperty("priority").ToString()); - Console.WriteLine(result.GetProperty("allowTaskPreemption").ToString()); - Console.WriteLine(result.GetProperty("maxParallelTasks").ToString()); - Console.WriteLine(result.GetProperty("constraints").GetProperty("maxWallClockTime").ToString()); - Console.WriteLine(result.GetProperty("constraints").GetProperty("maxTaskRetryCount").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("commandLine").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("filePattern").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("path").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("containerUrl").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("uploadHeaders")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("uploadHeaders")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("uploadOptions").GetProperty("uploadCondition").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("constraints").GetProperty("maxWallClockTime").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("constraints").GetProperty("retentionTime").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("constraints").GetProperty("maxTaskRetryCount").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("requiredSlots").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("killJobOnCompletion").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("userIdentity").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("runExclusive").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("applicationPackageReferences")[0].GetProperty("applicationId").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("applicationPackageReferences")[0].GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("authenticationTokenSettings").GetProperty("access")[0].ToString()); - Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("allowLowPriorityNode").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("commandLine").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("constraints").GetProperty("maxWallClockTime").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("constraints").GetProperty("retentionTime").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("constraints").GetProperty("maxTaskRetryCount").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("waitForSuccess").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("userIdentity").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("rerunOnNodeRebootAfterSuccess").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("commandLine").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("maxWallClockTime").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("retentionTime").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("userIdentity").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); - Console.WriteLine(result.GetProperty("commonEnvironmentSettings")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("commonEnvironmentSettings")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("poolId").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("autoPoolIdPrefix").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("poolLifetimeOption").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("keepAlive").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("vmSize").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("publisher").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("offer").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("sku").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("virtualMachineImageId").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("exactVersion").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("nodeAgentSKUId").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("windowsConfiguration").GetProperty("enableAutomaticUpdates").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("lun").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("caching").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("diskSizeGB").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("storageAccountType").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("licenseType").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerImageNames")[0].ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("password").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("registryServer").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("diskEncryptionConfiguration").GetProperty("targets")[0].ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("nodePlacementConfiguration").GetProperty("policy").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("publisher").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("typeHandlerVersion").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("autoUpgradeMinorVersion").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("enableAutomaticUpgrade").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("settings").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("protectedSettings").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("provisionAfterExtensions")[0].ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("ephemeralOSDiskSettings").GetProperty("placement").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("caching").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("managedDisk").GetProperty("storageAccountType").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("writeAcceleratorEnabled").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("encryptionAtHost").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("securityType").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("uefiSettings").GetProperty("secureBootEnabled").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("uefiSettings").GetProperty("vTpmEnabled").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("serviceArtifactReference").GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("taskSlotsPerNode").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("taskSchedulingPolicy").GetProperty("nodeFillType").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("resizeTimeout").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("resourceTags").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("targetDedicatedNodes").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("targetLowPriorityNodes").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("enableAutoScale").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("autoScaleFormula").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("autoScaleEvaluationInterval").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("enableInterNodeCommunication").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("subnetId").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("dynamicVNetAssignmentScope").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("protocol").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("backendPort").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("frontendPortRangeStart").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("frontendPortRangeEnd").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("priority").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("access").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("sourceAddressPrefix").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("sourcePortRanges")[0].ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("publicIPAddressConfiguration").GetProperty("provision").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("publicIPAddressConfiguration").GetProperty("ipAddressIds")[0].ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("enableAcceleratedNetworking").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("commandLine").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("userIdentity").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("maxTaskRetryCount").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("waitForSuccess").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("applicationPackageReferences")[0].GetProperty("applicationId").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("applicationPackageReferences")[0].GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("password").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("elevationLevel").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("uid").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("gid").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("sshPrivateKey").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("windowsUserConfiguration").GetProperty("loginMode").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("metadata")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("metadata")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("accountName").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("containerName").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("accountKey").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("sasKey").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("blobfuseOptions").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("relativeMountPath").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("relativeMountPath").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("mountOptions").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("relativeMountPath").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("mountOptions").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("password").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("accountName").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("azureFileUrl").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("accountKey").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("relativeMountPath").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("mountOptions").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("targetNodeCommunicationMode").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("mode").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("disableAutomaticRollback").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("enableAutomaticOSUpgrade").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("useRollingUpgradePolicy").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("osRollingUpgradeDeferral").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("enableCrossZoneUpgrade").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxBatchInstancePercent").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxUnhealthyInstancePercent").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxUnhealthyUpgradedInstancePercent").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("pauseTimeBetweenBatches").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("prioritizeUnhealthyInstances").ToString()); - Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("rollbackFailedInstancesOnPolicyBreach").ToString()); - Console.WriteLine(result.GetProperty("onAllTasksComplete").ToString()); - Console.WriteLine(result.GetProperty("onTaskFailure").ToString()); - Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("subnetId").ToString()); - Console.WriteLine(result.GetProperty("metadata")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("metadata")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("poolId").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("schedulingError").GetProperty("category").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("schedulingError").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("schedulingError").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("schedulingError").GetProperty("details")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("schedulingError").GetProperty("details")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("terminateReason").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("url").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("lastUpdateTime").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("userCPUTime").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("kernelCPUTime").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("wallClockTime").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("readIOps").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("writeIOps").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("readIOGiB").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("writeIOGiB").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("numSucceededTasks").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("numFailedTasks").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("numTaskRetries").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("waitTime").ToString()); - } + Response response = await client.GetNodeExtensionAsync("poolId", "tvm-1695681911_2-20161122t193202z", "batchNodeExtension"); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetJobsFromSchedules_AllParameters_Convenience() + public void Example_Batch_DeleteNodeFile_FileDeleteFromNode() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - foreach (BatchJob item in client.GetJobsFromSchedules("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), maxresults: 1234, filter: "", select: new string[] { "" }, expand: new string[] { "" })) - { - } + Response response = await client.DeleteNodeFileAsync("poolId", "tvm-1695681911_1-20161122t193202z", "workitems\\jobId\\job-1\\task1\\wd\\testFile.txt"); + + Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetJobPreparationAndReleaseTaskStatuses_ShortVersion() + public void Example_Batch_GetNodeFile_GetFileFromComputeNode() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - foreach (BinaryData item in client.GetJobPreparationAndReleaseTaskStatuses("", null, null, null, null, null, null)) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); - } + Response response = client.GetNodeFile("poolId", "nodeId", "workitems\\jobId\\job-1\\task1\\wd\\testFile.txt", null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null, null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetJobPreparationAndReleaseTaskStatuses_ShortVersion_Async() + public async Task Example_Batch_GetNodeFile_GetFileFromComputeNode_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - await foreach (BinaryData item in client.GetJobPreparationAndReleaseTaskStatusesAsync("", null, null, null, null, null, null)) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); - } + Response response = await client.GetNodeFileAsync("poolId", "nodeId", "workitems\\jobId\\job-1\\task1\\wd\\testFile.txt", null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null, null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetJobPreparationAndReleaseTaskStatuses_ShortVersion_Convenience() + public void Example_Batch_GetNodeFile_GetFileFromComputeNode_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - foreach (BatchJobPreparationAndReleaseTaskStatus item in client.GetJobPreparationAndReleaseTaskStatuses("")) - { - } + Response response = client.GetNodeFile("poolId", "nodeId", "workitems\\jobId\\job-1\\task1\\wd\\testFile.txt"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetJobPreparationAndReleaseTaskStatuses_ShortVersion_Convenience_Async() + public async Task Example_Batch_GetNodeFile_GetFileFromComputeNode_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - await foreach (BatchJobPreparationAndReleaseTaskStatus item in client.GetJobPreparationAndReleaseTaskStatusesAsync("")) - { - } + Response response = await client.GetNodeFileAsync("poolId", "nodeId", "workitems\\jobId\\job-1\\task1\\wd\\testFile.txt"); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetJobPreparationAndReleaseTaskStatuses_AllParameters() + public void Example_Batch_GetApplications_ListApplications() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - foreach (BinaryData item in client.GetJobPreparationAndReleaseTaskStatuses("", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), 1234, "", new string[] { "" }, null)) + await foreach (BinaryData item in client.GetApplicationsAsync(null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("poolId").ToString()); - Console.WriteLine(result.GetProperty("nodeId").ToString()); - Console.WriteLine(result.GetProperty("nodeUrl").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTaskExecutionInfo").GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTaskExecutionInfo").GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTaskExecutionInfo").GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTaskExecutionInfo").GetProperty("taskRootDirectory").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTaskExecutionInfo").GetProperty("taskRootDirectoryUrl").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTaskExecutionInfo").GetProperty("exitCode").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTaskExecutionInfo").GetProperty("containerInfo").GetProperty("containerId").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTaskExecutionInfo").GetProperty("containerInfo").GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTaskExecutionInfo").GetProperty("containerInfo").GetProperty("error").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTaskExecutionInfo").GetProperty("failureInfo").GetProperty("category").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTaskExecutionInfo").GetProperty("failureInfo").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTaskExecutionInfo").GetProperty("failureInfo").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTaskExecutionInfo").GetProperty("failureInfo").GetProperty("details")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTaskExecutionInfo").GetProperty("failureInfo").GetProperty("details")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTaskExecutionInfo").GetProperty("retryCount").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTaskExecutionInfo").GetProperty("lastRetryTime").ToString()); - Console.WriteLine(result.GetProperty("jobPreparationTaskExecutionInfo").GetProperty("result").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTaskExecutionInfo").GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTaskExecutionInfo").GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTaskExecutionInfo").GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTaskExecutionInfo").GetProperty("taskRootDirectory").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTaskExecutionInfo").GetProperty("taskRootDirectoryUrl").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTaskExecutionInfo").GetProperty("exitCode").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTaskExecutionInfo").GetProperty("containerInfo").GetProperty("containerId").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTaskExecutionInfo").GetProperty("containerInfo").GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTaskExecutionInfo").GetProperty("containerInfo").GetProperty("error").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTaskExecutionInfo").GetProperty("failureInfo").GetProperty("category").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTaskExecutionInfo").GetProperty("failureInfo").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTaskExecutionInfo").GetProperty("failureInfo").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTaskExecutionInfo").GetProperty("failureInfo").GetProperty("details")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTaskExecutionInfo").GetProperty("failureInfo").GetProperty("details")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("jobReleaseTaskExecutionInfo").GetProperty("result").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("versions")[0].ToString()); } } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetJobPreparationAndReleaseTaskStatuses_AllParameters_Convenience() + public void Example_Batch_GetApplications_ListApplications_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - foreach (BatchJobPreparationAndReleaseTaskStatus item in client.GetJobPreparationAndReleaseTaskStatuses("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), maxresults: 1234, filter: "", select: new string[] { "" })) + await foreach (BatchApplication item in client.GetApplicationsAsync()) { } } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetJobSchedules_ShortVersion() + public void Example_Batch_GetPoolUsageMetrics_PoolListUsageMetrics() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - foreach (BinaryData item in client.GetJobSchedules(null, null, null, null, null, null, null)) + foreach (BinaryData item in client.GetPoolUsageMetrics(null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").ToString()); + Console.WriteLine(result.GetProperty("poolId").ToString()); + Console.WriteLine(result.GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("vmSize").ToString()); + Console.WriteLine(result.GetProperty("totalCoreHours").ToString()); } } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetJobSchedules_ShortVersion_Async() + public async Task Example_Batch_GetPoolUsageMetrics_PoolListUsageMetrics_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - await foreach (BinaryData item in client.GetJobSchedulesAsync(null, null, null, null, null, null, null)) + await foreach (BinaryData item in client.GetPoolUsageMetricsAsync(null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").ToString()); + Console.WriteLine(result.GetProperty("poolId").ToString()); + Console.WriteLine(result.GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("vmSize").ToString()); + Console.WriteLine(result.GetProperty("totalCoreHours").ToString()); } } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetJobSchedules_ShortVersion_Convenience() + public void Example_Batch_GetPoolUsageMetrics_PoolListUsageMetrics_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - foreach (BatchJobSchedule item in client.GetJobSchedules()) + foreach (BatchPoolUsageMetrics item in client.GetPoolUsageMetrics()) { } } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetJobSchedules_ShortVersion_Convenience_Async() + public async Task Example_Batch_GetPoolUsageMetrics_PoolListUsageMetrics_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - await foreach (BatchJobSchedule item in client.GetJobSchedulesAsync()) + await foreach (BatchPoolUsageMetrics item in client.GetPoolUsageMetricsAsync()) { } } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetJobSchedules_AllParameters() + public void Example_Batch_GetPools_PoolList() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - foreach (BinaryData item in client.GetJobSchedules(1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), 1234, "", new string[] { "" }, new string[] { "" }, null)) + await foreach (BinaryData item in client.GetPoolsAsync(null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("url").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("lastModified").ToString()); - Console.WriteLine(result.GetProperty("creationTime").ToString()); - Console.WriteLine(result.GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("stateTransitionTime").ToString()); - Console.WriteLine(result.GetProperty("previousState").ToString()); - Console.WriteLine(result.GetProperty("previousStateTransitionTime").ToString()); - Console.WriteLine(result.GetProperty("schedule").GetProperty("doNotRunUntil").ToString()); - Console.WriteLine(result.GetProperty("schedule").GetProperty("doNotRunAfter").ToString()); - Console.WriteLine(result.GetProperty("schedule").GetProperty("startWindow").ToString()); - Console.WriteLine(result.GetProperty("schedule").GetProperty("recurrenceInterval").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("priority").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("allowTaskPreemption").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("maxParallelTasks").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("usesTaskDependencies").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("onAllTasksComplete").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("onTaskFailure").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("networkConfiguration").GetProperty("subnetId").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("constraints").GetProperty("maxWallClockTime").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("constraints").GetProperty("maxTaskRetryCount").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("commandLine").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("filePattern").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("path").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("containerUrl").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("uploadHeaders")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("uploadHeaders")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("uploadOptions").GetProperty("uploadCondition").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("constraints").GetProperty("maxWallClockTime").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("constraints").GetProperty("retentionTime").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("constraints").GetProperty("maxTaskRetryCount").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("requiredSlots").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("killJobOnCompletion").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("userIdentity").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("runExclusive").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("applicationPackageReferences")[0].GetProperty("applicationId").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("applicationPackageReferences")[0].GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("authenticationTokenSettings").GetProperty("access")[0].ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("allowLowPriorityNode").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("commandLine").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("constraints").GetProperty("maxWallClockTime").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("constraints").GetProperty("retentionTime").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("constraints").GetProperty("maxTaskRetryCount").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("waitForSuccess").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("userIdentity").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("rerunOnNodeRebootAfterSuccess").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("commandLine").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("maxWallClockTime").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("retentionTime").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("userIdentity").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("commonEnvironmentSettings")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("commonEnvironmentSettings")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("poolId").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("autoPoolIdPrefix").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("poolLifetimeOption").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("keepAlive").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("vmSize").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("publisher").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("offer").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("sku").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("virtualMachineImageId").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("exactVersion").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("nodeAgentSKUId").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("windowsConfiguration").GetProperty("enableAutomaticUpdates").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("lun").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("caching").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("diskSizeGB").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("storageAccountType").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("licenseType").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerImageNames")[0].ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("password").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("registryServer").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("diskEncryptionConfiguration").GetProperty("targets")[0].ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("nodePlacementConfiguration").GetProperty("policy").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("publisher").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("typeHandlerVersion").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("autoUpgradeMinorVersion").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("enableAutomaticUpgrade").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("settings").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("protectedSettings").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("provisionAfterExtensions")[0].ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("ephemeralOSDiskSettings").GetProperty("placement").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("caching").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("managedDisk").GetProperty("storageAccountType").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("writeAcceleratorEnabled").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("encryptionAtHost").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("securityType").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("uefiSettings").GetProperty("secureBootEnabled").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("uefiSettings").GetProperty("vTpmEnabled").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("serviceArtifactReference").GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("taskSlotsPerNode").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("taskSchedulingPolicy").GetProperty("nodeFillType").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("resizeTimeout").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("resourceTags").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("targetDedicatedNodes").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("targetLowPriorityNodes").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("enableAutoScale").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("autoScaleFormula").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("autoScaleEvaluationInterval").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("enableInterNodeCommunication").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("subnetId").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("dynamicVNetAssignmentScope").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("protocol").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("backendPort").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("frontendPortRangeStart").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("frontendPortRangeEnd").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("priority").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("access").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("sourceAddressPrefix").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("sourcePortRanges")[0].ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("publicIPAddressConfiguration").GetProperty("provision").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("publicIPAddressConfiguration").GetProperty("ipAddressIds")[0].ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("enableAcceleratedNetworking").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("commandLine").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("userIdentity").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("maxTaskRetryCount").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("waitForSuccess").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("applicationPackageReferences")[0].GetProperty("applicationId").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("applicationPackageReferences")[0].GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("password").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("elevationLevel").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("uid").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("gid").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("sshPrivateKey").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("windowsUserConfiguration").GetProperty("loginMode").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("metadata")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("metadata")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("accountName").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("containerName").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("accountKey").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("sasKey").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("blobfuseOptions").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("relativeMountPath").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("relativeMountPath").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("mountOptions").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("relativeMountPath").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("mountOptions").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("password").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("accountName").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("azureFileUrl").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("accountKey").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("relativeMountPath").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("mountOptions").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("targetNodeCommunicationMode").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("mode").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("disableAutomaticRollback").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("enableAutomaticOSUpgrade").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("useRollingUpgradePolicy").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("osRollingUpgradeDeferral").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("enableCrossZoneUpgrade").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxBatchInstancePercent").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxUnhealthyInstancePercent").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxUnhealthyUpgradedInstancePercent").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("pauseTimeBetweenBatches").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("prioritizeUnhealthyInstances").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("rollbackFailedInstancesOnPolicyBreach").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("metadata")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("metadata")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("nextRunTime").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("recentJob").GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("recentJob").GetProperty("url").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("metadata")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("metadata")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("url").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("lastUpdateTime").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("userCPUTime").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("kernelCPUTime").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("wallClockTime").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("readIOps").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("writeIOps").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("readIOGiB").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("writeIOGiB").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("numSucceededTasks").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("numFailedTasks").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("numTaskRetries").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("waitTime").ToString()); + Console.WriteLine(result.ToString()); } } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetJobSchedules_AllParameters_Convenience() + public void Example_Batch_GetPools_PoolList_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - foreach (BatchJobSchedule item in client.GetJobSchedules(timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), maxresults: 1234, filter: "", select: new string[] { "" }, expand: new string[] { "" })) + await foreach (BatchPool item in client.GetPoolsAsync()) { } } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetTasks_ShortVersion() + public void Example_Batch_GetSupportedImages_AccountListNodeAgentSkus() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - foreach (BinaryData item in client.GetTasks("", null, null, null, null, null, null, null)) + foreach (BinaryData item in client.GetSupportedImages(null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result.GetProperty("nodeAgentSKUId").ToString()); + Console.WriteLine(result.GetProperty("imageReference").ToString()); + Console.WriteLine(result.GetProperty("osType").ToString()); + Console.WriteLine(result.GetProperty("verificationType").ToString()); } } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetTasks_ShortVersion_Async() + public async Task Example_Batch_GetSupportedImages_AccountListNodeAgentSkus_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - await foreach (BinaryData item in client.GetTasksAsync("", null, null, null, null, null, null, null)) + await foreach (BinaryData item in client.GetSupportedImagesAsync(null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result.GetProperty("nodeAgentSKUId").ToString()); + Console.WriteLine(result.GetProperty("imageReference").ToString()); + Console.WriteLine(result.GetProperty("osType").ToString()); + Console.WriteLine(result.GetProperty("verificationType").ToString()); } } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetTasks_ShortVersion_Convenience() + public void Example_Batch_GetSupportedImages_AccountListNodeAgentSkus_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - foreach (BatchTask item in client.GetTasks("")) + foreach (BatchSupportedImage item in client.GetSupportedImages()) { } } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetTasks_ShortVersion_Convenience_Async() + public async Task Example_Batch_GetSupportedImages_AccountListNodeAgentSkus_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - await foreach (BatchTask item in client.GetTasksAsync("")) + await foreach (BatchSupportedImage item in client.GetSupportedImagesAsync()) { } } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetTasks_AllParameters() + public void Example_Batch_GetPoolNodeCounts_NodeCountsPayload() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - foreach (BinaryData item in client.GetTasks("", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), 1234, "", new string[] { "" }, new string[] { "" }, null)) + await foreach (BinaryData item in client.GetPoolNodeCountsAsync(null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("url").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("lastModified").ToString()); - Console.WriteLine(result.GetProperty("creationTime").ToString()); - Console.WriteLine(result.GetProperty("exitConditions").GetProperty("exitCodes")[0].GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("exitConditions").GetProperty("exitCodes")[0].GetProperty("exitOptions").GetProperty("jobAction").ToString()); - Console.WriteLine(result.GetProperty("exitConditions").GetProperty("exitCodes")[0].GetProperty("exitOptions").GetProperty("dependencyAction").ToString()); - Console.WriteLine(result.GetProperty("exitConditions").GetProperty("exitCodeRanges")[0].GetProperty("start").ToString()); - Console.WriteLine(result.GetProperty("exitConditions").GetProperty("exitCodeRanges")[0].GetProperty("end").ToString()); - Console.WriteLine(result.GetProperty("exitConditions").GetProperty("exitCodeRanges")[0].GetProperty("exitOptions").GetProperty("jobAction").ToString()); - Console.WriteLine(result.GetProperty("exitConditions").GetProperty("exitCodeRanges")[0].GetProperty("exitOptions").GetProperty("dependencyAction").ToString()); - Console.WriteLine(result.GetProperty("exitConditions").GetProperty("preProcessingError").GetProperty("jobAction").ToString()); - Console.WriteLine(result.GetProperty("exitConditions").GetProperty("preProcessingError").GetProperty("dependencyAction").ToString()); - Console.WriteLine(result.GetProperty("exitConditions").GetProperty("fileUploadError").GetProperty("jobAction").ToString()); - Console.WriteLine(result.GetProperty("exitConditions").GetProperty("fileUploadError").GetProperty("dependencyAction").ToString()); - Console.WriteLine(result.GetProperty("exitConditions").GetProperty("default").GetProperty("jobAction").ToString()); - Console.WriteLine(result.GetProperty("exitConditions").GetProperty("default").GetProperty("dependencyAction").ToString()); - Console.WriteLine(result.GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("stateTransitionTime").ToString()); - Console.WriteLine(result.GetProperty("previousState").ToString()); - Console.WriteLine(result.GetProperty("previousStateTransitionTime").ToString()); - Console.WriteLine(result.GetProperty("commandLine").ToString()); - Console.WriteLine(result.GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); - Console.WriteLine(result.GetProperty("containerSettings").GetProperty("imageName").ToString()); - Console.WriteLine(result.GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); - Console.WriteLine(result.GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); - Console.WriteLine(result.GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); - Console.WriteLine(result.GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); - Console.WriteLine(result.GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); - Console.WriteLine(result.GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); - Console.WriteLine(result.GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); - Console.WriteLine(result.GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); - Console.WriteLine(result.GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); - Console.WriteLine(result.GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("outputFiles")[0].GetProperty("filePattern").ToString()); - Console.WriteLine(result.GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("path").ToString()); - Console.WriteLine(result.GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("containerUrl").ToString()); - Console.WriteLine(result.GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("uploadHeaders")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("uploadHeaders")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("outputFiles")[0].GetProperty("uploadOptions").GetProperty("uploadCondition").ToString()); - Console.WriteLine(result.GetProperty("environmentSettings")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("environmentSettings")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("affinityInfo").GetProperty("affinityId").ToString()); - Console.WriteLine(result.GetProperty("constraints").GetProperty("maxWallClockTime").ToString()); - Console.WriteLine(result.GetProperty("constraints").GetProperty("retentionTime").ToString()); - Console.WriteLine(result.GetProperty("constraints").GetProperty("maxTaskRetryCount").ToString()); - Console.WriteLine(result.GetProperty("requiredSlots").ToString()); - Console.WriteLine(result.GetProperty("userIdentity").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); - Console.WriteLine(result.GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("exitCode").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("containerInfo").GetProperty("containerId").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("containerInfo").GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("containerInfo").GetProperty("error").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("failureInfo").GetProperty("category").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("failureInfo").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("failureInfo").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("failureInfo").GetProperty("details")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("failureInfo").GetProperty("details")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("retryCount").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("lastRetryTime").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("requeueCount").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("lastRequeueTime").ToString()); - Console.WriteLine(result.GetProperty("executionInfo").GetProperty("result").ToString()); - Console.WriteLine(result.GetProperty("nodeInfo").GetProperty("affinityId").ToString()); - Console.WriteLine(result.GetProperty("nodeInfo").GetProperty("nodeUrl").ToString()); - Console.WriteLine(result.GetProperty("nodeInfo").GetProperty("poolId").ToString()); - Console.WriteLine(result.GetProperty("nodeInfo").GetProperty("nodeId").ToString()); - Console.WriteLine(result.GetProperty("nodeInfo").GetProperty("taskRootDirectory").ToString()); - Console.WriteLine(result.GetProperty("nodeInfo").GetProperty("taskRootDirectoryUrl").ToString()); - Console.WriteLine(result.GetProperty("multiInstanceSettings").GetProperty("numberOfInstances").ToString()); - Console.WriteLine(result.GetProperty("multiInstanceSettings").GetProperty("coordinationCommandLine").ToString()); - Console.WriteLine(result.GetProperty("multiInstanceSettings").GetProperty("commonResourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); - Console.WriteLine(result.GetProperty("multiInstanceSettings").GetProperty("commonResourceFiles")[0].GetProperty("storageContainerUrl").ToString()); - Console.WriteLine(result.GetProperty("multiInstanceSettings").GetProperty("commonResourceFiles")[0].GetProperty("httpUrl").ToString()); - Console.WriteLine(result.GetProperty("multiInstanceSettings").GetProperty("commonResourceFiles")[0].GetProperty("blobPrefix").ToString()); - Console.WriteLine(result.GetProperty("multiInstanceSettings").GetProperty("commonResourceFiles")[0].GetProperty("filePath").ToString()); - Console.WriteLine(result.GetProperty("multiInstanceSettings").GetProperty("commonResourceFiles")[0].GetProperty("fileMode").ToString()); - Console.WriteLine(result.GetProperty("multiInstanceSettings").GetProperty("commonResourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("url").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("lastUpdateTime").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("userCPUTime").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("kernelCPUTime").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("wallClockTime").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("readIOps").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("writeIOps").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("readIOGiB").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("writeIOGiB").ToString()); - Console.WriteLine(result.GetProperty("stats").GetProperty("waitTime").ToString()); - Console.WriteLine(result.GetProperty("dependsOn").GetProperty("taskIds")[0].ToString()); - Console.WriteLine(result.GetProperty("dependsOn").GetProperty("taskIdRanges")[0].GetProperty("start").ToString()); - Console.WriteLine(result.GetProperty("dependsOn").GetProperty("taskIdRanges")[0].GetProperty("end").ToString()); - Console.WriteLine(result.GetProperty("applicationPackageReferences")[0].GetProperty("applicationId").ToString()); - Console.WriteLine(result.GetProperty("applicationPackageReferences")[0].GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("authenticationTokenSettings").GetProperty("access")[0].ToString()); + Console.WriteLine(result.GetProperty("poolId").ToString()); } } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetTasks_AllParameters_Convenience() + public void Example_Batch_GetPoolNodeCounts_NodeCountsPayload_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - foreach (BatchTask item in client.GetTasks("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), maxresults: 1234, filter: "", select: new string[] { "" }, expand: new string[] { "" })) + await foreach (BatchPoolNodeCounts item in client.GetPoolNodeCountsAsync()) { } } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetSubTasks_ShortVersion() + public void Example_Batch_GetJobs_JobList() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - foreach (BinaryData item in client.GetSubTasks("", "", null, null, null, null)) + foreach (BinaryData item in client.GetJobs(null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result.GetProperty("poolInfo").ToString()); } } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetSubTasks_ShortVersion_Async() + public async Task Example_Batch_GetJobs_JobList_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - await foreach (BinaryData item in client.GetSubTasksAsync("", "", null, null, null, null)) + await foreach (BinaryData item in client.GetJobsAsync(null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result.GetProperty("poolInfo").ToString()); } } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetSubTasks_ShortVersion_Convenience() + public void Example_Batch_GetJobs_JobList_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - foreach (BatchSubtask item in client.GetSubTasks("", "")) + foreach (BatchJob item in client.GetJobs()) { } } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetSubTasks_ShortVersion_Convenience_Async() + public async Task Example_Batch_GetJobs_JobList_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - await foreach (BatchSubtask item in client.GetSubTasksAsync("", "")) + await foreach (BatchJob item in client.GetJobsAsync()) { } } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetSubTasks_AllParameters() + public void Example_Batch_GetJobsFromSchedules_ListJobUnderJobSchedule() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - foreach (BinaryData item in client.GetSubTasks("", "", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), new string[] { "" }, null)) + await foreach (BinaryData item in client.GetJobsFromSchedulesAsync("jobScheduleId", null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("nodeInfo").GetProperty("affinityId").ToString()); - Console.WriteLine(result.GetProperty("nodeInfo").GetProperty("nodeUrl").ToString()); - Console.WriteLine(result.GetProperty("nodeInfo").GetProperty("poolId").ToString()); - Console.WriteLine(result.GetProperty("nodeInfo").GetProperty("nodeId").ToString()); - Console.WriteLine(result.GetProperty("nodeInfo").GetProperty("taskRootDirectory").ToString()); - Console.WriteLine(result.GetProperty("nodeInfo").GetProperty("taskRootDirectoryUrl").ToString()); - Console.WriteLine(result.GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("exitCode").ToString()); - Console.WriteLine(result.GetProperty("containerInfo").GetProperty("containerId").ToString()); - Console.WriteLine(result.GetProperty("containerInfo").GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("containerInfo").GetProperty("error").ToString()); - Console.WriteLine(result.GetProperty("failureInfo").GetProperty("category").ToString()); - Console.WriteLine(result.GetProperty("failureInfo").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("failureInfo").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("failureInfo").GetProperty("details")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("failureInfo").GetProperty("details")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("stateTransitionTime").ToString()); - Console.WriteLine(result.GetProperty("previousState").ToString()); - Console.WriteLine(result.GetProperty("previousStateTransitionTime").ToString()); - Console.WriteLine(result.GetProperty("result").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").ToString()); } } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetSubTasks_AllParameters_Convenience() + public void Example_Batch_GetJobsFromSchedules_ListJobUnderJobSchedule_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - foreach (BatchSubtask item in client.GetSubTasks("", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), select: new string[] { "" })) + await foreach (BatchJob item in client.GetJobsFromSchedulesAsync("jobScheduleId")) { } } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetTaskFiles_ShortVersion() + public void Example_Batch_GetJobPreparationAndReleaseTaskStatuses_JobListPreparationAndReleaseTaskStatus() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - foreach (BinaryData item in client.GetTaskFiles("", "", null, null, null, null, null, null)) + foreach (BinaryData item in client.GetJobPreparationAndReleaseTaskStatuses("jobId", null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.ToString()); @@ -19679,13 +6275,13 @@ public void Example_Batch_GetTaskFiles_ShortVersion() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetTaskFiles_ShortVersion_Async() + public async Task Example_Batch_GetJobPreparationAndReleaseTaskStatuses_JobListPreparationAndReleaseTaskStatus_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - await foreach (BinaryData item in client.GetTaskFilesAsync("", "", null, null, null, null, null, null)) + await foreach (BinaryData item in client.GetJobPreparationAndReleaseTaskStatusesAsync("jobId", null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.ToString()); @@ -19694,109 +6290,95 @@ public async Task Example_Batch_GetTaskFiles_ShortVersion_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetTaskFiles_ShortVersion_Convenience() + public void Example_Batch_GetJobPreparationAndReleaseTaskStatuses_JobListPreparationAndReleaseTaskStatus_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - foreach (BatchNodeFile item in client.GetTaskFiles("", "")) + foreach (BatchJobPreparationAndReleaseTaskStatus item in client.GetJobPreparationAndReleaseTaskStatuses("jobId")) { } } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetTaskFiles_ShortVersion_Convenience_Async() + public async Task Example_Batch_GetJobPreparationAndReleaseTaskStatuses_JobListPreparationAndReleaseTaskStatus_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - await foreach (BatchNodeFile item in client.GetTaskFilesAsync("", "")) + await foreach (BatchJobPreparationAndReleaseTaskStatus item in client.GetJobPreparationAndReleaseTaskStatusesAsync("jobId")) { } } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetTaskFiles_AllParameters() + public void Example_Batch_GetJobSchedules_JobScheduleList() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - foreach (BinaryData item in client.GetTaskFiles("", "", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), 1234, "", true, null)) + foreach (BinaryData item in client.GetJobSchedules(null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("url").ToString()); - Console.WriteLine(result.GetProperty("isDirectory").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("creationTime").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("lastModified").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("contentLength").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("contentType").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("fileMode").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").ToString()); } } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetTaskFiles_AllParameters_Async() + public async Task Example_Batch_GetJobSchedules_JobScheduleList_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - await foreach (BinaryData item in client.GetTaskFilesAsync("", "", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), 1234, "", true, null)) + await foreach (BinaryData item in client.GetJobSchedulesAsync(null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("url").ToString()); - Console.WriteLine(result.GetProperty("isDirectory").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("creationTime").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("lastModified").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("contentLength").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("contentType").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("fileMode").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").ToString()); } } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetTaskFiles_AllParameters_Convenience() + public void Example_Batch_GetJobSchedules_JobScheduleList_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - foreach (BatchNodeFile item in client.GetTaskFiles("", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), maxresults: 1234, filter: "", recursive: true)) + foreach (BatchJobSchedule item in client.GetJobSchedules()) { } } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetTaskFiles_AllParameters_Convenience_Async() + public async Task Example_Batch_GetJobSchedules_JobScheduleList_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - await foreach (BatchNodeFile item in client.GetTaskFilesAsync("", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), maxresults: 1234, filter: "", recursive: true)) + await foreach (BatchJobSchedule item in client.GetJobSchedulesAsync()) { } } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetNodes_ShortVersion() + public void Example_Batch_GetTasks_TaskList() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - foreach (BinaryData item in client.GetNodes("", null, null, null, null, null, null)) + foreach (BinaryData item in client.GetTasks("jobId", null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.ToString()); @@ -19805,13 +6387,13 @@ public void Example_Batch_GetNodes_ShortVersion() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetNodes_ShortVersion_Async() + public async Task Example_Batch_GetTasks_TaskList_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - await foreach (BinaryData item in client.GetNodesAsync("", null, null, null, null, null, null)) + await foreach (BinaryData item in client.GetTasksAsync("jobId", null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.ToString()); @@ -19820,277 +6402,95 @@ public async Task Example_Batch_GetNodes_ShortVersion_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetNodes_ShortVersion_Convenience() + public void Example_Batch_GetTasks_TaskList_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - foreach (BatchNode item in client.GetNodes("")) + foreach (BatchTask item in client.GetTasks("jobId")) { } } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetNodes_ShortVersion_Convenience_Async() + public async Task Example_Batch_GetTasks_TaskList_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - await foreach (BatchNode item in client.GetNodesAsync("")) + await foreach (BatchTask item in client.GetTasksAsync("jobId")) { } } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetNodes_AllParameters() + public void Example_Batch_GetSubTasks_TaskListSubtasks() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - foreach (BinaryData item in client.GetNodes("", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), 1234, "", new string[] { "" }, null)) + await foreach (BinaryData item in client.GetSubTasksAsync("jobId", "taskId", null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("url").ToString()); - Console.WriteLine(result.GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("schedulingState").ToString()); - Console.WriteLine(result.GetProperty("stateTransitionTime").ToString()); - Console.WriteLine(result.GetProperty("lastBootTime").ToString()); - Console.WriteLine(result.GetProperty("allocationTime").ToString()); - Console.WriteLine(result.GetProperty("ipAddress").ToString()); - Console.WriteLine(result.GetProperty("affinityId").ToString()); - Console.WriteLine(result.GetProperty("vmSize").ToString()); - Console.WriteLine(result.GetProperty("totalTasksRun").ToString()); - Console.WriteLine(result.GetProperty("runningTasksCount").ToString()); - Console.WriteLine(result.GetProperty("runningTaskSlotsCount").ToString()); - Console.WriteLine(result.GetProperty("totalTasksSucceeded").ToString()); - Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("taskUrl").ToString()); - Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("jobId").ToString()); - Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("taskId").ToString()); - Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("subtaskId").ToString()); - Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("taskState").ToString()); - Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("exitCode").ToString()); - Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("containerInfo").GetProperty("containerId").ToString()); - Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("containerInfo").GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("containerInfo").GetProperty("error").ToString()); - Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("failureInfo").GetProperty("category").ToString()); - Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("failureInfo").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("failureInfo").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("failureInfo").GetProperty("details")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("failureInfo").GetProperty("details")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("retryCount").ToString()); - Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("lastRetryTime").ToString()); - Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("requeueCount").ToString()); - Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("lastRequeueTime").ToString()); - Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("result").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("commandLine").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("userIdentity").GetProperty("username").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("maxTaskRetryCount").ToString()); - Console.WriteLine(result.GetProperty("startTask").GetProperty("waitForSuccess").ToString()); - Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("exitCode").ToString()); - Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("containerInfo").GetProperty("containerId").ToString()); - Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("containerInfo").GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("containerInfo").GetProperty("error").ToString()); - Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("failureInfo").GetProperty("category").ToString()); - Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("failureInfo").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("failureInfo").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("failureInfo").GetProperty("details")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("failureInfo").GetProperty("details")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("retryCount").ToString()); - Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("lastRetryTime").ToString()); - Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("result").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("errorDetails")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("errorDetails")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("isDedicated").ToString()); - Console.WriteLine(result.GetProperty("endpointConfiguration").GetProperty("inboundEndpoints")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("endpointConfiguration").GetProperty("inboundEndpoints")[0].GetProperty("protocol").ToString()); - Console.WriteLine(result.GetProperty("endpointConfiguration").GetProperty("inboundEndpoints")[0].GetProperty("publicIPAddress").ToString()); - Console.WriteLine(result.GetProperty("endpointConfiguration").GetProperty("inboundEndpoints")[0].GetProperty("publicFQDN").ToString()); - Console.WriteLine(result.GetProperty("endpointConfiguration").GetProperty("inboundEndpoints")[0].GetProperty("frontendPort").ToString()); - Console.WriteLine(result.GetProperty("endpointConfiguration").GetProperty("inboundEndpoints")[0].GetProperty("backendPort").ToString()); - Console.WriteLine(result.GetProperty("nodeAgentInfo").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("nodeAgentInfo").GetProperty("lastUpdateTime").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineInfo").GetProperty("imageReference").GetProperty("publisher").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineInfo").GetProperty("imageReference").GetProperty("offer").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineInfo").GetProperty("imageReference").GetProperty("sku").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineInfo").GetProperty("imageReference").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineInfo").GetProperty("imageReference").GetProperty("virtualMachineImageId").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineInfo").GetProperty("imageReference").GetProperty("exactVersion").ToString()); - Console.WriteLine(result.GetProperty("virtualMachineInfo").GetProperty("scaleSetVmResourceId").ToString()); + Console.WriteLine(result.ToString()); } } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetNodes_AllParameters_Convenience() + public void Example_Batch_GetSubTasks_TaskListSubtasks_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - foreach (BatchNode item in client.GetNodes("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), maxresults: 1234, filter: "", select: new string[] { "" })) + await foreach (BatchSubtask item in client.GetSubTasksAsync("jobId", "taskId")) { } } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetNodeExtensions_ShortVersion() + public void Example_Batch_GetTaskFiles_FileListFromTask() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - foreach (BinaryData item in client.GetNodeExtensions("", "", null, null, null, null, null)) + foreach (BinaryData item in client.GetTaskFiles("jobId", "taskId", null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null, null, false, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.ToString()); @@ -20099,13 +6499,13 @@ public void Example_Batch_GetNodeExtensions_ShortVersion() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetNodeExtensions_ShortVersion_Async() + public async Task Example_Batch_GetTaskFiles_FileListFromTask_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - await foreach (BinaryData item in client.GetNodeExtensionsAsync("", "", null, null, null, null, null)) + await foreach (BinaryData item in client.GetTaskFilesAsync("jobId", "taskId", null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null, null, false, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.ToString()); @@ -20114,135 +6514,95 @@ public async Task Example_Batch_GetNodeExtensions_ShortVersion_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetNodeExtensions_ShortVersion_Convenience() + public void Example_Batch_GetTaskFiles_FileListFromTask_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - foreach (BatchNodeVMExtension item in client.GetNodeExtensions("", "")) + foreach (BatchNodeFile item in client.GetTaskFiles("jobId", "taskId")) { } } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetNodeExtensions_ShortVersion_Convenience_Async() + public async Task Example_Batch_GetTaskFiles_FileListFromTask_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - await foreach (BatchNodeVMExtension item in client.GetNodeExtensionsAsync("", "")) + await foreach (BatchNodeFile item in client.GetTaskFilesAsync("jobId", "taskId")) { } } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetNodeExtensions_AllParameters() + public void Example_Batch_GetNodes_NodeList() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - foreach (BinaryData item in client.GetNodeExtensions("", "", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), 1234, new string[] { "" }, null)) + await foreach (BinaryData item in client.GetNodesAsync("poolId", null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("provisioningState").ToString()); - Console.WriteLine(result.GetProperty("vmExtension").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("vmExtension").GetProperty("publisher").ToString()); - Console.WriteLine(result.GetProperty("vmExtension").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("vmExtension").GetProperty("typeHandlerVersion").ToString()); - Console.WriteLine(result.GetProperty("vmExtension").GetProperty("autoUpgradeMinorVersion").ToString()); - Console.WriteLine(result.GetProperty("vmExtension").GetProperty("enableAutomaticUpgrade").ToString()); - Console.WriteLine(result.GetProperty("vmExtension").GetProperty("settings").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("vmExtension").GetProperty("protectedSettings").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("vmExtension").GetProperty("provisionAfterExtensions")[0].ToString()); - Console.WriteLine(result.GetProperty("instanceView").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("instanceView").GetProperty("statuses")[0].GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("instanceView").GetProperty("statuses")[0].GetProperty("displayStatus").ToString()); - Console.WriteLine(result.GetProperty("instanceView").GetProperty("statuses")[0].GetProperty("level").ToString()); - Console.WriteLine(result.GetProperty("instanceView").GetProperty("statuses")[0].GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("instanceView").GetProperty("statuses")[0].GetProperty("time").ToString()); - Console.WriteLine(result.GetProperty("instanceView").GetProperty("subStatuses")[0].GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("instanceView").GetProperty("subStatuses")[0].GetProperty("displayStatus").ToString()); - Console.WriteLine(result.GetProperty("instanceView").GetProperty("subStatuses")[0].GetProperty("level").ToString()); - Console.WriteLine(result.GetProperty("instanceView").GetProperty("subStatuses")[0].GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("instanceView").GetProperty("subStatuses")[0].GetProperty("time").ToString()); + Console.WriteLine(result.ToString()); } } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetNodeExtensions_AllParameters_Convenience() + public void Example_Batch_GetNodes_NodeList_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - foreach (BatchNodeVMExtension item in client.GetNodeExtensions("", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), maxresults: 1234, select: new string[] { "" })) + await foreach (BatchNode item in client.GetNodesAsync("poolId")) { } } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetNodeFiles_ShortVersion() + public void Example_Batch_GetNodeExtensions_ListComputeNodeExtensions() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - foreach (BinaryData item in client.GetNodeFiles("", "", null, null, null, null, null, null)) + foreach (BinaryData item in client.GetNodeExtensions("poolId", "tvm-1695681911_2-20161122t193202z", null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.ToString()); @@ -20251,13 +6611,13 @@ public void Example_Batch_GetNodeFiles_ShortVersion() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetNodeFiles_ShortVersion_Async() + public async Task Example_Batch_GetNodeExtensions_ListComputeNodeExtensions_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - await foreach (BinaryData item in client.GetNodeFilesAsync("", "", null, null, null, null, null, null)) + await foreach (BinaryData item in client.GetNodeExtensionsAsync("poolId", "tvm-1695681911_2-20161122t193202z", null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.ToString()); @@ -20266,96 +6626,82 @@ public async Task Example_Batch_GetNodeFiles_ShortVersion_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetNodeFiles_ShortVersion_Convenience() + public void Example_Batch_GetNodeExtensions_ListComputeNodeExtensions_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - foreach (BatchNodeFile item in client.GetNodeFiles("", "")) + foreach (BatchNodeVMExtension item in client.GetNodeExtensions("poolId", "tvm-1695681911_2-20161122t193202z")) { } } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetNodeFiles_ShortVersion_Convenience_Async() + public async Task Example_Batch_GetNodeExtensions_ListComputeNodeExtensions_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - await foreach (BatchNodeFile item in client.GetNodeFilesAsync("", "")) + await foreach (BatchNodeVMExtension item in client.GetNodeExtensionsAsync("poolId", "tvm-1695681911_2-20161122t193202z")) { } } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetNodeFiles_AllParameters() + public void Example_Batch_GetNodeFiles_FileListFromNode() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - foreach (BinaryData item in client.GetNodeFiles("", "", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), 1234, "", true, null)) + foreach (BinaryData item in client.GetNodeFiles("poolId", "tvm-1695681911_1-20161122t193202z", null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null, null, false, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("url").ToString()); - Console.WriteLine(result.GetProperty("isDirectory").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("creationTime").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("lastModified").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("contentLength").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("contentType").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("fileMode").ToString()); + Console.WriteLine(result.ToString()); } } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetNodeFiles_AllParameters_Async() + public async Task Example_Batch_GetNodeFiles_FileListFromNode_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - await foreach (BinaryData item in client.GetNodeFilesAsync("", "", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), 1234, "", true, null)) + await foreach (BinaryData item in client.GetNodeFilesAsync("poolId", "tvm-1695681911_1-20161122t193202z", null, DateTimeOffset.Parse("Fri, 17 Feb 2017 00:00:00 GMT"), null, null, false, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("url").ToString()); - Console.WriteLine(result.GetProperty("isDirectory").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("creationTime").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("lastModified").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("contentLength").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("contentType").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("fileMode").ToString()); + Console.WriteLine(result.ToString()); } } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetNodeFiles_AllParameters_Convenience() + public void Example_Batch_GetNodeFiles_FileListFromNode_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - foreach (BatchNodeFile item in client.GetNodeFiles("", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), maxresults: 1234, filter: "", recursive: true)) + foreach (BatchNodeFile item in client.GetNodeFiles("poolId", "tvm-1695681911_1-20161122t193202z")) { } } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetNodeFiles_AllParameters_Convenience_Async() + public async Task Example_Batch_GetNodeFiles_FileListFromNode_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); - await foreach (BatchNodeFile item in client.GetNodeFilesAsync("", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), maxresults: 1234, filter: "", recursive: true)) + await foreach (BatchNodeFile item in client.GetNodeFilesAsync("poolId", "tvm-1695681911_1-20161122t193202z")) { } } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/Docs/TextAnalysisClient.xml b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/Docs/TextAnalysisClient.xml index fa038d87cb9a..349d5134b2e0 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/Docs/TextAnalysisClient.xml +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/Docs/TextAnalysisClient.xml @@ -5,179 +5,1777 @@ This sample shows how to call AnalyzeTextAsync. "); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + +AnalyzeTextInput analyzeTextInput = new TextDynamicClassificationInput +{ + TextInput = new MultiLanguageTextInput + { + MultiLanguageInputs = {new MultiLanguageInput("1", "The WHO is issuing a warning about Monkey Pox.") + { + Language = "en", + }, new MultiLanguageInput("2", "Mo Salah plays in Liverpool FC in England.") + { + Language = "en", + }}, + }, + ActionContent = new DynamicClassificationActionContent(new string[] { "Health", "Politics", "Music", "Sports" }) + { + ModelVersion = "latest", + ClassificationType = ClassificationType.Multi, + }, +}; +Response response = await client.AnalyzeTextAsync(analyzeTextInput); +]]> +This sample shows how to call AnalyzeTextAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + +AnalyzeTextInput analyzeTextInput = new TextEntityLinkingInput +{ + TextInput = new MultiLanguageTextInput + { + MultiLanguageInputs = {new MultiLanguageInput("1", "Microsoft was founded by Bill Gates and Paul Allen.") + { + Language = "en", + }, new MultiLanguageInput("2", "Pike place market is my favorite Seattle attraction.") + { + Language = "en", + }}, + }, + ActionContent = new EntityLinkingActionContent + { + ModelVersion = "latest", + }, +}; +Response response = await client.AnalyzeTextAsync(analyzeTextInput); +]]> +This sample shows how to call AnalyzeTextAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + +AnalyzeTextInput analyzeTextInput = new TextEntityRecognitionInput +{ + TextInput = new MultiLanguageTextInput + { + MultiLanguageInputs = {new MultiLanguageInput("2", "When I was 5 years old I had $90.00 dollars to my name.") + { + Language = "en", + }, new MultiLanguageInput("3", "When we flew from LAX it seemed like we were moving at 10 meters per second. I was lucky to see Amsterdam, Effile Tower, and the Nile.") + { + Language = "en", + }}, + }, + ActionContent = new EntitiesActionContent + { + ModelVersion = "latest", + Exclusions = { EntityCategory.Numeric }, + OverlapPolicy = new AllowOverlapEntityPolicyType(), + }, +}; +Response response = await client.AnalyzeTextAsync(analyzeTextInput); +]]> +This sample shows how to call AnalyzeTextAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + +AnalyzeTextInput analyzeTextInput = new TextEntityRecognitionInput +{ + TextInput = new MultiLanguageTextInput + { + MultiLanguageInputs = {new MultiLanguageInput("2", "When I was 5 years old I had $90.00 dollars to my name.") + { + Language = "en", + }, new MultiLanguageInput("3", "When we flew from LAX it seemed like we were moving at 10 meters per second. I was lucky to see Amsterdam, Effile Tower, and the Nile.") + { + Language = "en", + }}, + }, + ActionContent = new EntitiesActionContent + { + ModelVersion = "latest", + Inclusions = { EntityCategory.Location }, + }, +}; +Response response = await client.AnalyzeTextAsync(analyzeTextInput); +]]> +This sample shows how to call AnalyzeTextAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + +AnalyzeTextInput analyzeTextInput = new TextEntityRecognitionInput +{ + TextInput = new MultiLanguageTextInput + { + MultiLanguageInputs = {new MultiLanguageInput("1", "When I was 5 years old I had $90.00 dollars to my name.") + { + Language = "en", + }}, + }, + ActionContent = new EntitiesActionContent + { + ModelVersion = "latest", + InferenceOptions = new EntityInferenceConfig + { + ExcludeNormalizedValues = true, + }, + }, +}; +Response response = await client.AnalyzeTextAsync(analyzeTextInput); +]]> +This sample shows how to call AnalyzeTextAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + +AnalyzeTextInput analyzeTextInput = new TextEntityRecognitionInput +{ + TextInput = new MultiLanguageTextInput + { + MultiLanguageInputs = {new MultiLanguageInput("4", "25th April Meeting was an intresting one. At least we gont to experience the WorldCup") + { + Language = "en", + }}, + }, + ActionContent = new EntitiesActionContent + { + ModelVersion = "latest", + OverlapPolicy = new MatchLongestEntityPolicyType(), + }, +}; +Response response = await client.AnalyzeTextAsync(analyzeTextInput); +]]> +This sample shows how to call AnalyzeTextAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + +AnalyzeTextInput analyzeTextInput = new TextEntityRecognitionInput +{ + TextInput = new MultiLanguageTextInput + { + MultiLanguageInputs = {new MultiLanguageInput("2", "When I was 5 years old I had $90.00 dollars to my name.") + { + Language = "en", + }, new MultiLanguageInput("3", "When we flew from LAX it seemed like we were moving at 10 meters per second. I was lucky to see Amsterdam, Effile Tower, and the Nile.") + { + Language = "en", + }, new MultiLanguageInput("4", "25th April Meeting was an intresting one. At least we gont to experience the WorldCup") + { + Language = "en", + }, new MultiLanguageInput("5", "My IP is 127.12.1.1 and my phone number is 5555555555") + { + Language = "en", + }}, + }, + ActionContent = new EntitiesActionContent + { + ModelVersion = "latest", + OverlapPolicy = new AllowOverlapEntityPolicyType(), + }, +}; +Response response = await client.AnalyzeTextAsync(analyzeTextInput); +]]> +This sample shows how to call AnalyzeTextAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + +AnalyzeTextInput analyzeTextInput = new TextKeyPhraseExtractionInput +{ + TextInput = new MultiLanguageTextInput + { + MultiLanguageInputs = {new MultiLanguageInput("1", "Microsoft was founded by Bill Gates and Paul Allen.") + { + Language = "en", + }, new MultiLanguageInput("2", "Text Analytics is one of the Azure Cognitive Services.") + { + Language = "en", + }, new MultiLanguageInput("3", "My cat might need to see a veterinarian.") + { + Language = "en", + }}, + }, + ActionContent = new KeyPhraseActionContent + { + ModelVersion = "latest", + }, +}; +Response response = await client.AnalyzeTextAsync(analyzeTextInput); +]]> +This sample shows how to call AnalyzeTextAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + +AnalyzeTextInput analyzeTextInput = new TextLanguageDetectionInput +{ + TextInput = new LanguageDetectionTextInput + { + LanguageInputs = { new LanguageInput("1", "Hello world"), new LanguageInput("2", "Bonjour tout le monde"), new LanguageInput("3", "Hola mundo"), new LanguageInput("4", "Tumhara naam kya hai?") }, + }, + ActionContent = new LanguageDetectionActionContent + { + ModelVersion = "latest", + }, +}; +Response response = await client.AnalyzeTextAsync(analyzeTextInput); +]]> +This sample shows how to call AnalyzeTextAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + +AnalyzeTextInput analyzeTextInput = new TextPiiEntitiesRecognitionInput +{ + TextInput = new MultiLanguageTextInput + { + MultiLanguageInputs = {new MultiLanguageInput("1", "My SSN is 859-98-0987") + { + Language = "en", + }, new MultiLanguageInput("2", "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check.") + { + Language = "en", + }, new MultiLanguageInput("3", "Is 998.214.865-68 your Brazilian CPF number?") + { + Language = "en", + }}, + }, + ActionContent = new PiiActionContent + { + ModelVersion = "latest", + ExcludePiiCategories = { PiiCategoriesExclude.UsSocialSecurityNumber }, + }, +}; +Response response = await client.AnalyzeTextAsync(analyzeTextInput); +]]> +This sample shows how to call AnalyzeTextAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + +AnalyzeTextInput analyzeTextInput = new TextPiiEntitiesRecognitionInput +{ + TextInput = new MultiLanguageTextInput + { + MultiLanguageInputs = {new MultiLanguageInput("1", "My SSN is 859-98-0987") + { + Language = "en", + }, new MultiLanguageInput("2", "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check.") + { + Language = "en", + }, new MultiLanguageInput("3", "Is 998.214.865-68 your Brazilian CPF number?") + { + Language = "en", + }}, + }, + ActionContent = new PiiActionContent + { + ModelVersion = "latest", + RedactionCharacter = RedactionCharacter.Minus, + }, +}; +Response response = await client.AnalyzeTextAsync(analyzeTextInput); +]]> +This sample shows how to call AnalyzeTextAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + +AnalyzeTextInput analyzeTextInput = new TextPiiEntitiesRecognitionInput +{ + TextInput = new MultiLanguageTextInput + { + MultiLanguageInputs = {new MultiLanguageInput("1", "My SSN is 859-98-0987") + { + Language = "en", + }, new MultiLanguageInput("2", "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check.") + { + Language = "en", + }, new MultiLanguageInput("3", "Is 998.214.865-68 your Brazilian CPF number?") + { + Language = "en", + }}, + }, + ActionContent = new PiiActionContent + { + ModelVersion = "latest", + }, +}; +Response response = await client.AnalyzeTextAsync(analyzeTextInput); +]]> +This sample shows how to call AnalyzeTextAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + +AnalyzeTextInput analyzeTextInput = new TextSentimentAnalysisInput +{ + TextInput = new MultiLanguageTextInput + { + MultiLanguageInputs = {new MultiLanguageInput("1", "Great atmosphere. Close to plenty of restaurants, hotels, and transit! Staff are friendly and helpful.") + { + Language = "en", + }}, + }, + ActionContent = new SentimentAnalysisActionContent + { + ModelVersion = "latest", + }, +}; +Response response = await client.AnalyzeTextAsync(analyzeTextInput); +]]> + + + +This sample shows how to call AnalyzeText. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + +AnalyzeTextInput analyzeTextInput = new TextDynamicClassificationInput +{ + TextInput = new MultiLanguageTextInput + { + MultiLanguageInputs = {new MultiLanguageInput("1", "The WHO is issuing a warning about Monkey Pox.") + { + Language = "en", + }, new MultiLanguageInput("2", "Mo Salah plays in Liverpool FC in England.") + { + Language = "en", + }}, + }, + ActionContent = new DynamicClassificationActionContent(new string[] { "Health", "Politics", "Music", "Sports" }) + { + ModelVersion = "latest", + ClassificationType = ClassificationType.Multi, + }, +}; +Response response = client.AnalyzeText(analyzeTextInput); +]]> +This sample shows how to call AnalyzeText. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + +AnalyzeTextInput analyzeTextInput = new TextEntityLinkingInput +{ + TextInput = new MultiLanguageTextInput + { + MultiLanguageInputs = {new MultiLanguageInput("1", "Microsoft was founded by Bill Gates and Paul Allen.") + { + Language = "en", + }, new MultiLanguageInput("2", "Pike place market is my favorite Seattle attraction.") + { + Language = "en", + }}, + }, + ActionContent = new EntityLinkingActionContent + { + ModelVersion = "latest", + }, +}; +Response response = client.AnalyzeText(analyzeTextInput); +]]> +This sample shows how to call AnalyzeText. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + +AnalyzeTextInput analyzeTextInput = new TextEntityRecognitionInput +{ + TextInput = new MultiLanguageTextInput + { + MultiLanguageInputs = {new MultiLanguageInput("2", "When I was 5 years old I had $90.00 dollars to my name.") + { + Language = "en", + }, new MultiLanguageInput("3", "When we flew from LAX it seemed like we were moving at 10 meters per second. I was lucky to see Amsterdam, Effile Tower, and the Nile.") + { + Language = "en", + }}, + }, + ActionContent = new EntitiesActionContent + { + ModelVersion = "latest", + Exclusions = { EntityCategory.Numeric }, + OverlapPolicy = new AllowOverlapEntityPolicyType(), + }, +}; +Response response = client.AnalyzeText(analyzeTextInput); +]]> +This sample shows how to call AnalyzeText. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + +AnalyzeTextInput analyzeTextInput = new TextEntityRecognitionInput +{ + TextInput = new MultiLanguageTextInput + { + MultiLanguageInputs = {new MultiLanguageInput("2", "When I was 5 years old I had $90.00 dollars to my name.") + { + Language = "en", + }, new MultiLanguageInput("3", "When we flew from LAX it seemed like we were moving at 10 meters per second. I was lucky to see Amsterdam, Effile Tower, and the Nile.") + { + Language = "en", + }}, + }, + ActionContent = new EntitiesActionContent + { + ModelVersion = "latest", + Inclusions = { EntityCategory.Location }, + }, +}; +Response response = client.AnalyzeText(analyzeTextInput); +]]> +This sample shows how to call AnalyzeText. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + +AnalyzeTextInput analyzeTextInput = new TextEntityRecognitionInput +{ + TextInput = new MultiLanguageTextInput + { + MultiLanguageInputs = {new MultiLanguageInput("1", "When I was 5 years old I had $90.00 dollars to my name.") + { + Language = "en", + }}, + }, + ActionContent = new EntitiesActionContent + { + ModelVersion = "latest", + InferenceOptions = new EntityInferenceConfig + { + ExcludeNormalizedValues = true, + }, + }, +}; +Response response = client.AnalyzeText(analyzeTextInput); +]]> +This sample shows how to call AnalyzeText. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + +AnalyzeTextInput analyzeTextInput = new TextEntityRecognitionInput +{ + TextInput = new MultiLanguageTextInput + { + MultiLanguageInputs = {new MultiLanguageInput("4", "25th April Meeting was an intresting one. At least we gont to experience the WorldCup") + { + Language = "en", + }}, + }, + ActionContent = new EntitiesActionContent + { + ModelVersion = "latest", + OverlapPolicy = new MatchLongestEntityPolicyType(), + }, +}; +Response response = client.AnalyzeText(analyzeTextInput); +]]> +This sample shows how to call AnalyzeText. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + +AnalyzeTextInput analyzeTextInput = new TextEntityRecognitionInput +{ + TextInput = new MultiLanguageTextInput + { + MultiLanguageInputs = {new MultiLanguageInput("2", "When I was 5 years old I had $90.00 dollars to my name.") + { + Language = "en", + }, new MultiLanguageInput("3", "When we flew from LAX it seemed like we were moving at 10 meters per second. I was lucky to see Amsterdam, Effile Tower, and the Nile.") + { + Language = "en", + }, new MultiLanguageInput("4", "25th April Meeting was an intresting one. At least we gont to experience the WorldCup") + { + Language = "en", + }, new MultiLanguageInput("5", "My IP is 127.12.1.1 and my phone number is 5555555555") + { + Language = "en", + }}, + }, + ActionContent = new EntitiesActionContent + { + ModelVersion = "latest", + OverlapPolicy = new AllowOverlapEntityPolicyType(), + }, +}; +Response response = client.AnalyzeText(analyzeTextInput); +]]> +This sample shows how to call AnalyzeText. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + +AnalyzeTextInput analyzeTextInput = new TextKeyPhraseExtractionInput +{ + TextInput = new MultiLanguageTextInput + { + MultiLanguageInputs = {new MultiLanguageInput("1", "Microsoft was founded by Bill Gates and Paul Allen.") + { + Language = "en", + }, new MultiLanguageInput("2", "Text Analytics is one of the Azure Cognitive Services.") + { + Language = "en", + }, new MultiLanguageInput("3", "My cat might need to see a veterinarian.") + { + Language = "en", + }}, + }, + ActionContent = new KeyPhraseActionContent + { + ModelVersion = "latest", + }, +}; +Response response = client.AnalyzeText(analyzeTextInput); +]]> +This sample shows how to call AnalyzeText. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + +AnalyzeTextInput analyzeTextInput = new TextLanguageDetectionInput +{ + TextInput = new LanguageDetectionTextInput + { + LanguageInputs = { new LanguageInput("1", "Hello world"), new LanguageInput("2", "Bonjour tout le monde"), new LanguageInput("3", "Hola mundo"), new LanguageInput("4", "Tumhara naam kya hai?") }, + }, + ActionContent = new LanguageDetectionActionContent + { + ModelVersion = "latest", + }, +}; +Response response = client.AnalyzeText(analyzeTextInput); +]]> +This sample shows how to call AnalyzeText. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + +AnalyzeTextInput analyzeTextInput = new TextPiiEntitiesRecognitionInput +{ + TextInput = new MultiLanguageTextInput + { + MultiLanguageInputs = {new MultiLanguageInput("1", "My SSN is 859-98-0987") + { + Language = "en", + }, new MultiLanguageInput("2", "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check.") + { + Language = "en", + }, new MultiLanguageInput("3", "Is 998.214.865-68 your Brazilian CPF number?") + { + Language = "en", + }}, + }, + ActionContent = new PiiActionContent + { + ModelVersion = "latest", + ExcludePiiCategories = { PiiCategoriesExclude.UsSocialSecurityNumber }, + }, +}; +Response response = client.AnalyzeText(analyzeTextInput); +]]> +This sample shows how to call AnalyzeText. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + +AnalyzeTextInput analyzeTextInput = new TextPiiEntitiesRecognitionInput +{ + TextInput = new MultiLanguageTextInput + { + MultiLanguageInputs = {new MultiLanguageInput("1", "My SSN is 859-98-0987") + { + Language = "en", + }, new MultiLanguageInput("2", "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check.") + { + Language = "en", + }, new MultiLanguageInput("3", "Is 998.214.865-68 your Brazilian CPF number?") + { + Language = "en", + }}, + }, + ActionContent = new PiiActionContent + { + ModelVersion = "latest", + RedactionCharacter = RedactionCharacter.Minus, + }, +}; +Response response = client.AnalyzeText(analyzeTextInput); +]]> +This sample shows how to call AnalyzeText. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + +AnalyzeTextInput analyzeTextInput = new TextPiiEntitiesRecognitionInput +{ + TextInput = new MultiLanguageTextInput + { + MultiLanguageInputs = {new MultiLanguageInput("1", "My SSN is 859-98-0987") + { + Language = "en", + }, new MultiLanguageInput("2", "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check.") + { + Language = "en", + }, new MultiLanguageInput("3", "Is 998.214.865-68 your Brazilian CPF number?") + { + Language = "en", + }}, + }, + ActionContent = new PiiActionContent + { + ModelVersion = "latest", + }, +}; +Response response = client.AnalyzeText(analyzeTextInput); +]]> +This sample shows how to call AnalyzeText. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + +AnalyzeTextInput analyzeTextInput = new TextSentimentAnalysisInput +{ + TextInput = new MultiLanguageTextInput + { + MultiLanguageInputs = {new MultiLanguageInput("1", "Great atmosphere. Close to plenty of restaurants, hotels, and transit! Staff are friendly and helpful.") + { + Language = "en", + }}, + }, + ActionContent = new SentimentAnalysisActionContent + { + ModelVersion = "latest", + }, +}; +Response response = client.AnalyzeText(analyzeTextInput); +]]> + + + +This sample shows how to call AnalyzeTextAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + kind = "DynamicClassification", + parameters = new + { + categories = new object[] + { + "Health", + "Politics", + "Music", + "Sports" + }, + classificationType = "Multi", + modelVersion = "latest", + }, + analysisInput = new + { + documents = new object[] + { + new + { + id = "1", + language = "en", + text = "The WHO is issuing a warning about Monkey Pox.", + }, + new + { + id = "2", + language = "en", + text = "Mo Salah plays in Liverpool FC in England.", + } + }, + }, +}); +Response response = await client.AnalyzeTextAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("kind").ToString()); +]]> +This sample shows how to call AnalyzeTextAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + kind = "EntityLinking", + parameters = new + { + modelVersion = "latest", + }, + analysisInput = new + { + documents = new object[] + { + new + { + id = "1", + language = "en", + text = "Microsoft was founded by Bill Gates and Paul Allen.", + }, + new + { + id = "2", + language = "en", + text = "Pike place market is my favorite Seattle attraction.", + } + }, + }, +}); +Response response = await client.AnalyzeTextAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("kind").ToString()); +]]> +This sample shows how to call AnalyzeTextAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + kind = "EntityRecognition", + parameters = new + { + modelVersion = "latest", + exclusionList = new object[] + { + "Numeric" + }, + overlapPolicy = new + { + policyKind = "allowOverlap", + }, + }, + analysisInput = new + { + documents = new object[] + { + new + { + id = "2", + language = "en", + text = "When I was 5 years old I had $90.00 dollars to my name.", + }, + new + { + id = "3", + language = "en", + text = "When we flew from LAX it seemed like we were moving at 10 meters per second. I was lucky to see Amsterdam, Effile Tower, and the Nile.", + } + }, + }, +}); +Response response = await client.AnalyzeTextAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("kind").ToString()); +]]> +This sample shows how to call AnalyzeTextAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + kind = "EntityRecognition", + parameters = new + { + modelVersion = "latest", + inclusionList = new object[] + { + "Location" + }, + }, + analysisInput = new + { + documents = new object[] + { + new + { + id = "2", + language = "en", + text = "When I was 5 years old I had $90.00 dollars to my name.", + }, + new + { + id = "3", + language = "en", + text = "When we flew from LAX it seemed like we were moving at 10 meters per second. I was lucky to see Amsterdam, Effile Tower, and the Nile.", + } + }, + }, +}); +Response response = await client.AnalyzeTextAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("kind").ToString()); +]]> +This sample shows how to call AnalyzeTextAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + kind = "EntityRecognition", + parameters = new + { + modelVersion = "latest", + inferenceOptions = new + { + excludeNormalizedValues = true, + }, + }, + analysisInput = new + { + documents = new object[] + { + new + { + id = "1", + language = "en", + text = "When I was 5 years old I had $90.00 dollars to my name.", + } + }, + }, +}); +Response response = await client.AnalyzeTextAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("kind").ToString()); +]]> +This sample shows how to call AnalyzeTextAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + kind = "EntityRecognition", + parameters = new + { + modelVersion = "latest", + overlapPolicy = new + { + policyKind = "matchLongest", + }, + }, + analysisInput = new + { + documents = new object[] + { + new + { + id = "4", + language = "en", + text = "25th April Meeting was an intresting one. At least we gont to experience the WorldCup", + } + }, + }, +}); +Response response = await client.AnalyzeTextAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("kind").ToString()); +]]> +This sample shows how to call AnalyzeTextAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + kind = "EntityRecognition", + parameters = new + { + modelVersion = "latest", + overlapPolicy = new + { + policyKind = "allowOverlap", + }, + }, + analysisInput = new + { + documents = new object[] + { + new + { + id = "2", + language = "en", + text = "When I was 5 years old I had $90.00 dollars to my name.", + }, + new + { + id = "3", + language = "en", + text = "When we flew from LAX it seemed like we were moving at 10 meters per second. I was lucky to see Amsterdam, Effile Tower, and the Nile.", + }, + new + { + id = "4", + language = "en", + text = "25th April Meeting was an intresting one. At least we gont to experience the WorldCup", + }, + new + { + id = "5", + language = "en", + text = "My IP is 127.12.1.1 and my phone number is 5555555555", + } + }, + }, +}); +Response response = await client.AnalyzeTextAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("kind").ToString()); +]]> +This sample shows how to call AnalyzeTextAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + kind = "KeyPhraseExtraction", + parameters = new + { + modelVersion = "latest", + }, + analysisInput = new + { + documents = new object[] + { + new + { + id = "1", + language = "en", + text = "Microsoft was founded by Bill Gates and Paul Allen.", + }, + new + { + id = "2", + language = "en", + text = "Text Analytics is one of the Azure Cognitive Services.", + }, + new + { + id = "3", + language = "en", + text = "My cat might need to see a veterinarian.", + } + }, + }, +}); +Response response = await client.AnalyzeTextAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("kind").ToString()); +]]> +This sample shows how to call AnalyzeTextAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + kind = "LanguageDetection", + parameters = new + { + modelVersion = "latest", + }, + analysisInput = new + { + documents = new object[] + { + new + { + id = "1", + text = "Hello world", + }, + new + { + id = "2", + text = "Bonjour tout le monde", + }, + new + { + id = "3", + text = "Hola mundo", + }, + new + { + id = "4", + text = "Tumhara naam kya hai?", + } + }, + }, +}); +Response response = await client.AnalyzeTextAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("kind").ToString()); +]]> +This sample shows how to call AnalyzeTextAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + kind = "PiiEntityRecognition", + parameters = new + { + modelVersion = "latest", + excludePiiCategories = new object[] + { + "USSocialSecurityNumber" + }, + }, + analysisInput = new + { + documents = new object[] + { + new + { + id = "1", + language = "en", + text = "My SSN is 859-98-0987", + }, + new + { + id = "2", + language = "en", + text = "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check.", + }, + new + { + id = "3", + language = "en", + text = "Is 998.214.865-68 your Brazilian CPF number?", + } + }, + }, +}); +Response response = await client.AnalyzeTextAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("kind").ToString()); +]]> +This sample shows how to call AnalyzeTextAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + kind = "PiiEntityRecognition", + parameters = new + { + modelVersion = "latest", + redactionCharacter = "-", + }, + analysisInput = new + { + documents = new object[] + { + new + { + id = "1", + language = "en", + text = "My SSN is 859-98-0987", + }, + new + { + id = "2", + language = "en", + text = "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check.", + }, + new + { + id = "3", + language = "en", + text = "Is 998.214.865-68 your Brazilian CPF number?", + } + }, + }, +}); +Response response = await client.AnalyzeTextAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("kind").ToString()); +]]> +This sample shows how to call AnalyzeTextAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + kind = "PiiEntityRecognition", + parameters = new + { + modelVersion = "latest", + }, + analysisInput = new + { + documents = new object[] + { + new + { + id = "1", + language = "en", + text = "My SSN is 859-98-0987", + }, + new + { + id = "2", + language = "en", + text = "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check.", + }, + new + { + id = "3", + language = "en", + text = "Is 998.214.865-68 your Brazilian CPF number?", + } + }, + }, +}); +Response response = await client.AnalyzeTextAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("kind").ToString()); +]]> +This sample shows how to call AnalyzeTextAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + kind = "SentimentAnalysis", + parameters = new + { + modelVersion = "latest", + }, + analysisInput = new + { + documents = new object[] + { + new + { + id = "1", + language = "en", + text = "Great atmosphere. Close to plenty of restaurants, hotels, and transit! Staff are friendly and helpful.", + } + }, + }, +}); +Response response = await client.AnalyzeTextAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("kind").ToString()); +]]> + + + +This sample shows how to call AnalyzeText and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + kind = "DynamicClassification", + parameters = new + { + categories = new object[] + { + "Health", + "Politics", + "Music", + "Sports" + }, + classificationType = "Multi", + modelVersion = "latest", + }, + analysisInput = new + { + documents = new object[] + { + new + { + id = "1", + language = "en", + text = "The WHO is issuing a warning about Monkey Pox.", + }, + new + { + id = "2", + language = "en", + text = "Mo Salah plays in Liverpool FC in England.", + } + }, + }, +}); +Response response = client.AnalyzeText(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("kind").ToString()); +]]> +This sample shows how to call AnalyzeText and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + kind = "EntityLinking", + parameters = new + { + modelVersion = "latest", + }, + analysisInput = new + { + documents = new object[] + { + new + { + id = "1", + language = "en", + text = "Microsoft was founded by Bill Gates and Paul Allen.", + }, + new + { + id = "2", + language = "en", + text = "Pike place market is my favorite Seattle attraction.", + } + }, + }, +}); +Response response = client.AnalyzeText(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("kind").ToString()); +]]> +This sample shows how to call AnalyzeText and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + kind = "EntityRecognition", + parameters = new + { + modelVersion = "latest", + exclusionList = new object[] + { + "Numeric" + }, + overlapPolicy = new + { + policyKind = "allowOverlap", + }, + }, + analysisInput = new + { + documents = new object[] + { + new + { + id = "2", + language = "en", + text = "When I was 5 years old I had $90.00 dollars to my name.", + }, + new + { + id = "3", + language = "en", + text = "When we flew from LAX it seemed like we were moving at 10 meters per second. I was lucky to see Amsterdam, Effile Tower, and the Nile.", + } + }, + }, +}); +Response response = client.AnalyzeText(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("kind").ToString()); +]]> +This sample shows how to call AnalyzeText and parse the result. +"); AzureKeyCredential credential = new AzureKeyCredential(""); TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); -AnalyzeTextInput analyzeTextInput = new TextDynamicClassificationInput(); -Response response = await client.AnalyzeTextAsync(analyzeTextInput); +using RequestContent content = RequestContent.Create(new +{ + kind = "EntityRecognition", + parameters = new + { + modelVersion = "latest", + inclusionList = new object[] + { + "Location" + }, + }, + analysisInput = new + { + documents = new object[] + { + new + { + id = "2", + language = "en", + text = "When I was 5 years old I had $90.00 dollars to my name.", + }, + new + { + id = "3", + language = "en", + text = "When we flew from LAX it seemed like we were moving at 10 meters per second. I was lucky to see Amsterdam, Effile Tower, and the Nile.", + } + }, + }, +}); +Response response = client.AnalyzeText(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("kind").ToString()); ]]> -This sample shows how to call AnalyzeTextAsync with all parameters. +This sample shows how to call AnalyzeText and parse the result. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); -AnalyzeTextInput analyzeTextInput = new TextDynamicClassificationInput +using RequestContent content = RequestContent.Create(new { - TextInput = new MultiLanguageTextInput + kind = "EntityRecognition", + parameters = new { - MultiLanguageInputs = {new MultiLanguageInput("", "") + modelVersion = "latest", + inferenceOptions = new { - Language = "", - }}, + excludeNormalizedValues = true, + }, }, - ActionContent = new DynamicClassificationActionContent(new string[] { "" }) + analysisInput = new { - LoggingOptOut = true, - ModelVersion = "", - ClassificationType = ClassificationType.Multi, + documents = new object[] + { + new + { + id = "1", + language = "en", + text = "When I was 5 years old I had $90.00 dollars to my name.", + } + }, }, -}; -Response response = await client.AnalyzeTextAsync(analyzeTextInput, showStatistics: true); -]]> - - - -This sample shows how to call AnalyzeText. +}); +Response response = client.AnalyzeText(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("kind").ToString()); +]]> +This sample shows how to call AnalyzeText and parse the result. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); -AnalyzeTextInput analyzeTextInput = new TextDynamicClassificationInput(); -Response response = client.AnalyzeText(analyzeTextInput); +using RequestContent content = RequestContent.Create(new +{ + kind = "EntityRecognition", + parameters = new + { + modelVersion = "latest", + overlapPolicy = new + { + policyKind = "matchLongest", + }, + }, + analysisInput = new + { + documents = new object[] + { + new + { + id = "4", + language = "en", + text = "25th April Meeting was an intresting one. At least we gont to experience the WorldCup", + } + }, + }, +}); +Response response = client.AnalyzeText(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("kind").ToString()); ]]> -This sample shows how to call AnalyzeText with all parameters. +This sample shows how to call AnalyzeText and parse the result. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); -AnalyzeTextInput analyzeTextInput = new TextDynamicClassificationInput +using RequestContent content = RequestContent.Create(new { - TextInput = new MultiLanguageTextInput + kind = "EntityRecognition", + parameters = new { - MultiLanguageInputs = {new MultiLanguageInput("", "") + modelVersion = "latest", + overlapPolicy = new { - Language = "", - }}, + policyKind = "allowOverlap", + }, }, - ActionContent = new DynamicClassificationActionContent(new string[] { "" }) + analysisInput = new { - LoggingOptOut = true, - ModelVersion = "", - ClassificationType = ClassificationType.Multi, + documents = new object[] + { + new + { + id = "2", + language = "en", + text = "When I was 5 years old I had $90.00 dollars to my name.", + }, + new + { + id = "3", + language = "en", + text = "When we flew from LAX it seemed like we were moving at 10 meters per second. I was lucky to see Amsterdam, Effile Tower, and the Nile.", + }, + new + { + id = "4", + language = "en", + text = "25th April Meeting was an intresting one. At least we gont to experience the WorldCup", + }, + new + { + id = "5", + language = "en", + text = "My IP is 127.12.1.1 and my phone number is 5555555555", + } + }, }, -}; -Response response = client.AnalyzeText(analyzeTextInput, showStatistics: true); -]]> - - - -This sample shows how to call AnalyzeTextAsync and parse the result. +}); +Response response = client.AnalyzeText(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("kind").ToString()); +]]> +This sample shows how to call AnalyzeText and parse the result. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - kind = "DynamicClassification", + kind = "KeyPhraseExtraction", + parameters = new + { + modelVersion = "latest", + }, + analysisInput = new + { + documents = new object[] + { + new + { + id = "1", + language = "en", + text = "Microsoft was founded by Bill Gates and Paul Allen.", + }, + new + { + id = "2", + language = "en", + text = "Text Analytics is one of the Azure Cognitive Services.", + }, + new + { + id = "3", + language = "en", + text = "My cat might need to see a veterinarian.", + } + }, + }, }); -Response response = await client.AnalyzeTextAsync(content); +Response response = client.AnalyzeText(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("kind").ToString()); ]]> -This sample shows how to call AnalyzeTextAsync with all parameters and request content and parse the result. +This sample shows how to call AnalyzeText and parse the result. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - kind = "DynamicClassification", + kind = "LanguageDetection", + parameters = new + { + modelVersion = "latest", + }, analysisInput = new { documents = new object[] { new { - id = "", - text = "", - language = "", + id = "1", + text = "Hello world", + }, + new + { + id = "2", + text = "Bonjour tout le monde", + }, + new + { + id = "3", + text = "Hola mundo", + }, + new + { + id = "4", + text = "Tumhara naam kya hai?", } }, }, +}); +Response response = client.AnalyzeText(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("kind").ToString()); +]]> +This sample shows how to call AnalyzeText and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + kind = "PiiEntityRecognition", parameters = new { - loggingOptOut = true, - modelVersion = "", - classificationType = "Multi", - categories = new object[] + modelVersion = "latest", + excludePiiCategories = new object[] + { + "USSocialSecurityNumber" + }, + }, + analysisInput = new + { + documents = new object[] { - "" + new + { + id = "1", + language = "en", + text = "My SSN is 859-98-0987", + }, + new + { + id = "2", + language = "en", + text = "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check.", + }, + new + { + id = "3", + language = "en", + text = "Is 998.214.865-68 your Brazilian CPF number?", + } }, }, }); -Response response = await client.AnalyzeTextAsync(content, showStatistics: true); +Response response = client.AnalyzeText(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("kind").ToString()); -]]> - - - +]]> This sample shows how to call AnalyzeText and parse the result. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - kind = "DynamicClassification", + kind = "PiiEntityRecognition", + parameters = new + { + modelVersion = "latest", + redactionCharacter = "-", + }, + analysisInput = new + { + documents = new object[] + { + new + { + id = "1", + language = "en", + text = "My SSN is 859-98-0987", + }, + new + { + id = "2", + language = "en", + text = "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check.", + }, + new + { + id = "3", + language = "en", + text = "Is 998.214.865-68 your Brazilian CPF number?", + } + }, + }, }); Response response = client.AnalyzeText(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("kind").ToString()); ]]> -This sample shows how to call AnalyzeText with all parameters and request content and parse the result. +This sample shows how to call AnalyzeText and parse the result. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - kind = "DynamicClassification", + kind = "PiiEntityRecognition", + parameters = new + { + modelVersion = "latest", + }, analysisInput = new { documents = new object[] { new { - id = "", - text = "", - language = "", + id = "1", + language = "en", + text = "My SSN is 859-98-0987", + }, + new + { + id = "2", + language = "en", + text = "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check.", + }, + new + { + id = "3", + language = "en", + text = "Is 998.214.865-68 your Brazilian CPF number?", } }, }, +}); +Response response = client.AnalyzeText(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("kind").ToString()); +]]> +This sample shows how to call AnalyzeText and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + kind = "SentimentAnalysis", parameters = new { - loggingOptOut = true, - modelVersion = "", - classificationType = "Multi", - categories = new object[] + modelVersion = "latest", + }, + analysisInput = new + { + documents = new object[] { - "" + new + { + id = "1", + language = "en", + text = "Great atmosphere. Close to plenty of restaurants, hotels, and transit! Staff are friendly and helpful.", + } }, }, }); -Response response = client.AnalyzeText(content, showStatistics: true); +Response response = client.AnalyzeText(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("kind").ToString()); diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/tests/Generated/Samples/Samples_TextAnalysisClient.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/tests/Generated/Samples/Samples_TextAnalysisClient.cs index 69ae9196b250..93838dc84445 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/tests/Generated/Samples/Samples_TextAnalysisClient.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/tests/Generated/Samples/Samples_TextAnalysisClient.cs @@ -18,15 +18,45 @@ public partial class Samples_TextAnalysisClient { [Test] [Ignore("Only validating compilation of examples")] - public void Example_Text_AnalyzeText_ShortVersion() + public void Example_Text_AnalyzeText_SuccessfulDynamicClassificationRequest() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { kind = "DynamicClassification", + parameters = new + { + categories = new object[] + { +"Health", +"Politics", +"Music", +"Sports" + }, + classificationType = "Multi", + modelVersion = "latest", + }, + analysisInput = new + { + documents = new object[] + { +new +{ +id = "1", +language = "en", +text = "The WHO is issuing a warning about Monkey Pox.", +}, +new +{ +id = "2", +language = "en", +text = "Mo Salah plays in Liverpool FC in England.", +} + }, + }, }); Response response = client.AnalyzeText(content); @@ -36,15 +66,45 @@ public void Example_Text_AnalyzeText_ShortVersion() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Text_AnalyzeText_ShortVersion_Async() + public async Task Example_Text_AnalyzeText_SuccessfulDynamicClassificationRequest_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { kind = "DynamicClassification", + parameters = new + { + categories = new object[] + { +"Health", +"Politics", +"Music", +"Sports" + }, + classificationType = "Multi", + modelVersion = "latest", + }, + analysisInput = new + { + documents = new object[] + { +new +{ +id = "1", +language = "en", +text = "The WHO is issuing a warning about Monkey Pox.", +}, +new +{ +id = "2", +language = "en", +text = "Mo Salah plays in Liverpool FC in England.", +} + }, + }, }); Response response = await client.AnalyzeTextAsync(content); @@ -54,63 +114,137 @@ public async Task Example_Text_AnalyzeText_ShortVersion_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Text_AnalyzeText_ShortVersion_Convenience() + public void Example_Text_AnalyzeText_SuccessfulDynamicClassificationRequest_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); - AnalyzeTextInput analyzeTextInput = new TextDynamicClassificationInput(); + AnalyzeTextInput analyzeTextInput = new TextDynamicClassificationInput + { + TextInput = new MultiLanguageTextInput + { + MultiLanguageInputs = {new MultiLanguageInput("1", "The WHO is issuing a warning about Monkey Pox.") +{ +Language = "en", +}, new MultiLanguageInput("2", "Mo Salah plays in Liverpool FC in England.") +{ +Language = "en", +}}, + }, + ActionContent = new DynamicClassificationActionContent(new string[] { "Health", "Politics", "Music", "Sports" }) + { + ModelVersion = "latest", + ClassificationType = ClassificationType.Multi, + }, + }; Response response = client.AnalyzeText(analyzeTextInput); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Text_AnalyzeText_ShortVersion_Convenience_Async() + public async Task Example_Text_AnalyzeText_SuccessfulDynamicClassificationRequest_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); - AnalyzeTextInput analyzeTextInput = new TextDynamicClassificationInput(); + AnalyzeTextInput analyzeTextInput = new TextDynamicClassificationInput + { + TextInput = new MultiLanguageTextInput + { + MultiLanguageInputs = {new MultiLanguageInput("1", "The WHO is issuing a warning about Monkey Pox.") +{ +Language = "en", +}, new MultiLanguageInput("2", "Mo Salah plays in Liverpool FC in England.") +{ +Language = "en", +}}, + }, + ActionContent = new DynamicClassificationActionContent(new string[] { "Health", "Politics", "Music", "Sports" }) + { + ModelVersion = "latest", + ClassificationType = ClassificationType.Multi, + }, + }; Response response = await client.AnalyzeTextAsync(analyzeTextInput); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Text_AnalyzeText_AllParameters() + public void Example_Text_AnalyzeText_SuccessfulEntityLinkingRequest() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - kind = "DynamicClassification", + kind = "EntityLinking", + parameters = new + { + modelVersion = "latest", + }, analysisInput = new { documents = new object[] { new { -id = "", -text = "", -language = "", +id = "1", +language = "en", +text = "Microsoft was founded by Bill Gates and Paul Allen.", +}, +new +{ +id = "2", +language = "en", +text = "Pike place market is my favorite Seattle attraction.", } }, }, + }); + Response response = client.AnalyzeText(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("kind").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Text_AnalyzeText_SuccessfulEntityLinkingRequest_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + kind = "EntityLinking", parameters = new { - loggingOptOut = true, - modelVersion = "", - classificationType = "Multi", - categories = new object[] + modelVersion = "latest", + }, + analysisInput = new + { + documents = new object[] { -"" +new +{ +id = "1", +language = "en", +text = "Microsoft was founded by Bill Gates and Paul Allen.", +}, +new +{ +id = "2", +language = "en", +text = "Pike place market is my favorite Seattle attraction.", +} }, }, }); - Response response = client.AnalyzeText(content, showStatistics: true); + Response response = await client.AnalyzeTextAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("kind").ToString()); @@ -118,39 +252,151 @@ public void Example_Text_AnalyzeText_AllParameters() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Text_AnalyzeText_AllParameters_Async() + public void Example_Text_AnalyzeText_SuccessfulEntityLinkingRequest_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + + AnalyzeTextInput analyzeTextInput = new TextEntityLinkingInput + { + TextInput = new MultiLanguageTextInput + { + MultiLanguageInputs = {new MultiLanguageInput("1", "Microsoft was founded by Bill Gates and Paul Allen.") +{ +Language = "en", +}, new MultiLanguageInput("2", "Pike place market is my favorite Seattle attraction.") +{ +Language = "en", +}}, + }, + ActionContent = new EntityLinkingActionContent + { + ModelVersion = "latest", + }, + }; + Response response = client.AnalyzeText(analyzeTextInput); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Text_AnalyzeText_SuccessfulEntityLinkingRequest_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + + AnalyzeTextInput analyzeTextInput = new TextEntityLinkingInput + { + TextInput = new MultiLanguageTextInput + { + MultiLanguageInputs = {new MultiLanguageInput("1", "Microsoft was founded by Bill Gates and Paul Allen.") +{ +Language = "en", +}, new MultiLanguageInput("2", "Pike place market is my favorite Seattle attraction.") +{ +Language = "en", +}}, + }, + ActionContent = new EntityLinkingActionContent + { + ModelVersion = "latest", + }, + }; + Response response = await client.AnalyzeTextAsync(analyzeTextInput); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Text_AnalyzeText_SuccessfulEntityRecognitionExclusionRequest() + { + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - kind = "DynamicClassification", + kind = "EntityRecognition", + parameters = new + { + modelVersion = "latest", + exclusionList = new object[] + { +"Numeric" + }, + overlapPolicy = new + { + policyKind = "allowOverlap", + }, + }, analysisInput = new { documents = new object[] { new { -id = "", -text = "", -language = "", +id = "2", +language = "en", +text = "When I was 5 years old I had $90.00 dollars to my name.", +}, +new +{ +id = "3", +language = "en", +text = "When we flew from LAX it seemed like we were moving at 10 meters per second. I was lucky to see Amsterdam, Effile Tower, and the Nile.", } }, }, + }); + Response response = client.AnalyzeText(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("kind").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Text_AnalyzeText_SuccessfulEntityRecognitionExclusionRequest_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + kind = "EntityRecognition", parameters = new { - loggingOptOut = true, - modelVersion = "", - classificationType = "Multi", - categories = new object[] + modelVersion = "latest", + exclusionList = new object[] + { +"Numeric" + }, + overlapPolicy = new + { + policyKind = "allowOverlap", + }, + }, + analysisInput = new + { + documents = new object[] { -"" +new +{ +id = "2", +language = "en", +text = "When I was 5 years old I had $90.00 dollars to my name.", +}, +new +{ +id = "3", +language = "en", +text = "When we flew from LAX it seemed like we were moving at 10 meters per second. I was lucky to see Amsterdam, Effile Tower, and the Nile.", +} }, }, }); - Response response = await client.AnalyzeTextAsync(content, showStatistics: true); + Response response = await client.AnalyzeTextAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("kind").ToString()); @@ -158,56 +404,1540 @@ public async Task Example_Text_AnalyzeText_AllParameters_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Text_AnalyzeText_AllParameters_Convenience() + public void Example_Text_AnalyzeText_SuccessfulEntityRecognitionExclusionRequest_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); - AnalyzeTextInput analyzeTextInput = new TextDynamicClassificationInput + AnalyzeTextInput analyzeTextInput = new TextEntityRecognitionInput { TextInput = new MultiLanguageTextInput { - MultiLanguageInputs = {new MultiLanguageInput("", "") + MultiLanguageInputs = {new MultiLanguageInput("2", "When I was 5 years old I had $90.00 dollars to my name.") { -Language = "", +Language = "en", +}, new MultiLanguageInput("3", "When we flew from LAX it seemed like we were moving at 10 meters per second. I was lucky to see Amsterdam, Effile Tower, and the Nile.") +{ +Language = "en", }}, }, - ActionContent = new DynamicClassificationActionContent(new string[] { "" }) + ActionContent = new EntitiesActionContent { - LoggingOptOut = true, - ModelVersion = "", - ClassificationType = ClassificationType.Multi, + ModelVersion = "latest", + Exclusions = { EntityCategory.Numeric }, + OverlapPolicy = new AllowOverlapEntityPolicyType(), }, }; - Response response = client.AnalyzeText(analyzeTextInput, showStatistics: true); + Response response = client.AnalyzeText(analyzeTextInput); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Text_AnalyzeText_AllParameters_Convenience_Async() + public async Task Example_Text_AnalyzeText_SuccessfulEntityRecognitionExclusionRequest_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); - AnalyzeTextInput analyzeTextInput = new TextDynamicClassificationInput + AnalyzeTextInput analyzeTextInput = new TextEntityRecognitionInput { TextInput = new MultiLanguageTextInput { - MultiLanguageInputs = {new MultiLanguageInput("", "") + MultiLanguageInputs = {new MultiLanguageInput("2", "When I was 5 years old I had $90.00 dollars to my name.") { -Language = "", +Language = "en", +}, new MultiLanguageInput("3", "When we flew from LAX it seemed like we were moving at 10 meters per second. I was lucky to see Amsterdam, Effile Tower, and the Nile.") +{ +Language = "en", }}, }, - ActionContent = new DynamicClassificationActionContent(new string[] { "" }) + ActionContent = new EntitiesActionContent { - LoggingOptOut = true, - ModelVersion = "", - ClassificationType = ClassificationType.Multi, + ModelVersion = "latest", + Exclusions = { EntityCategory.Numeric }, + OverlapPolicy = new AllowOverlapEntityPolicyType(), }, }; - Response response = await client.AnalyzeTextAsync(analyzeTextInput, showStatistics: true); + Response response = await client.AnalyzeTextAsync(analyzeTextInput); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Text_AnalyzeText_SuccessfulEntityRecognitionInclusionRequest() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + kind = "EntityRecognition", + parameters = new + { + modelVersion = "latest", + inclusionList = new object[] + { +"Location" + }, + }, + analysisInput = new + { + documents = new object[] + { +new +{ +id = "2", +language = "en", +text = "When I was 5 years old I had $90.00 dollars to my name.", +}, +new +{ +id = "3", +language = "en", +text = "When we flew from LAX it seemed like we were moving at 10 meters per second. I was lucky to see Amsterdam, Effile Tower, and the Nile.", +} + }, + }, + }); + Response response = client.AnalyzeText(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("kind").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Text_AnalyzeText_SuccessfulEntityRecognitionInclusionRequest_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + kind = "EntityRecognition", + parameters = new + { + modelVersion = "latest", + inclusionList = new object[] + { +"Location" + }, + }, + analysisInput = new + { + documents = new object[] + { +new +{ +id = "2", +language = "en", +text = "When I was 5 years old I had $90.00 dollars to my name.", +}, +new +{ +id = "3", +language = "en", +text = "When we flew from LAX it seemed like we were moving at 10 meters per second. I was lucky to see Amsterdam, Effile Tower, and the Nile.", +} + }, + }, + }); + Response response = await client.AnalyzeTextAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("kind").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Text_AnalyzeText_SuccessfulEntityRecognitionInclusionRequest_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + + AnalyzeTextInput analyzeTextInput = new TextEntityRecognitionInput + { + TextInput = new MultiLanguageTextInput + { + MultiLanguageInputs = {new MultiLanguageInput("2", "When I was 5 years old I had $90.00 dollars to my name.") +{ +Language = "en", +}, new MultiLanguageInput("3", "When we flew from LAX it seemed like we were moving at 10 meters per second. I was lucky to see Amsterdam, Effile Tower, and the Nile.") +{ +Language = "en", +}}, + }, + ActionContent = new EntitiesActionContent + { + ModelVersion = "latest", + Inclusions = { EntityCategory.Location }, + }, + }; + Response response = client.AnalyzeText(analyzeTextInput); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Text_AnalyzeText_SuccessfulEntityRecognitionInclusionRequest_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + + AnalyzeTextInput analyzeTextInput = new TextEntityRecognitionInput + { + TextInput = new MultiLanguageTextInput + { + MultiLanguageInputs = {new MultiLanguageInput("2", "When I was 5 years old I had $90.00 dollars to my name.") +{ +Language = "en", +}, new MultiLanguageInput("3", "When we flew from LAX it seemed like we were moving at 10 meters per second. I was lucky to see Amsterdam, Effile Tower, and the Nile.") +{ +Language = "en", +}}, + }, + ActionContent = new EntitiesActionContent + { + ModelVersion = "latest", + Inclusions = { EntityCategory.Location }, + }, + }; + Response response = await client.AnalyzeTextAsync(analyzeTextInput); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Text_AnalyzeText_SuccessfulEntityRecognitionInferenceOptionsRequest() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + kind = "EntityRecognition", + parameters = new + { + modelVersion = "latest", + inferenceOptions = new + { + excludeNormalizedValues = true, + }, + }, + analysisInput = new + { + documents = new object[] + { +new +{ +id = "1", +language = "en", +text = "When I was 5 years old I had $90.00 dollars to my name.", +} + }, + }, + }); + Response response = client.AnalyzeText(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("kind").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Text_AnalyzeText_SuccessfulEntityRecognitionInferenceOptionsRequest_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + kind = "EntityRecognition", + parameters = new + { + modelVersion = "latest", + inferenceOptions = new + { + excludeNormalizedValues = true, + }, + }, + analysisInput = new + { + documents = new object[] + { +new +{ +id = "1", +language = "en", +text = "When I was 5 years old I had $90.00 dollars to my name.", +} + }, + }, + }); + Response response = await client.AnalyzeTextAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("kind").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Text_AnalyzeText_SuccessfulEntityRecognitionInferenceOptionsRequest_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + + AnalyzeTextInput analyzeTextInput = new TextEntityRecognitionInput + { + TextInput = new MultiLanguageTextInput + { + MultiLanguageInputs = {new MultiLanguageInput("1", "When I was 5 years old I had $90.00 dollars to my name.") +{ +Language = "en", +}}, + }, + ActionContent = new EntitiesActionContent + { + ModelVersion = "latest", + InferenceOptions = new EntityInferenceConfig + { + ExcludeNormalizedValues = true, + }, + }, + }; + Response response = client.AnalyzeText(analyzeTextInput); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Text_AnalyzeText_SuccessfulEntityRecognitionInferenceOptionsRequest_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + + AnalyzeTextInput analyzeTextInput = new TextEntityRecognitionInput + { + TextInput = new MultiLanguageTextInput + { + MultiLanguageInputs = {new MultiLanguageInput("1", "When I was 5 years old I had $90.00 dollars to my name.") +{ +Language = "en", +}}, + }, + ActionContent = new EntitiesActionContent + { + ModelVersion = "latest", + InferenceOptions = new EntityInferenceConfig + { + ExcludeNormalizedValues = true, + }, + }, + }; + Response response = await client.AnalyzeTextAsync(analyzeTextInput); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Text_AnalyzeText_SuccessfulEntityRecognitionOverlapPolicy() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + kind = "EntityRecognition", + parameters = new + { + modelVersion = "latest", + overlapPolicy = new + { + policyKind = "matchLongest", + }, + }, + analysisInput = new + { + documents = new object[] + { +new +{ +id = "4", +language = "en", +text = "25th April Meeting was an intresting one. At least we gont to experience the WorldCup", +} + }, + }, + }); + Response response = client.AnalyzeText(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("kind").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Text_AnalyzeText_SuccessfulEntityRecognitionOverlapPolicy_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + kind = "EntityRecognition", + parameters = new + { + modelVersion = "latest", + overlapPolicy = new + { + policyKind = "matchLongest", + }, + }, + analysisInput = new + { + documents = new object[] + { +new +{ +id = "4", +language = "en", +text = "25th April Meeting was an intresting one. At least we gont to experience the WorldCup", +} + }, + }, + }); + Response response = await client.AnalyzeTextAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("kind").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Text_AnalyzeText_SuccessfulEntityRecognitionOverlapPolicy_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + + AnalyzeTextInput analyzeTextInput = new TextEntityRecognitionInput + { + TextInput = new MultiLanguageTextInput + { + MultiLanguageInputs = {new MultiLanguageInput("4", "25th April Meeting was an intresting one. At least we gont to experience the WorldCup") +{ +Language = "en", +}}, + }, + ActionContent = new EntitiesActionContent + { + ModelVersion = "latest", + OverlapPolicy = new MatchLongestEntityPolicyType(), + }, + }; + Response response = client.AnalyzeText(analyzeTextInput); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Text_AnalyzeText_SuccessfulEntityRecognitionOverlapPolicy_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + + AnalyzeTextInput analyzeTextInput = new TextEntityRecognitionInput + { + TextInput = new MultiLanguageTextInput + { + MultiLanguageInputs = {new MultiLanguageInput("4", "25th April Meeting was an intresting one. At least we gont to experience the WorldCup") +{ +Language = "en", +}}, + }, + ActionContent = new EntitiesActionContent + { + ModelVersion = "latest", + OverlapPolicy = new MatchLongestEntityPolicyType(), + }, + }; + Response response = await client.AnalyzeTextAsync(analyzeTextInput); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Text_AnalyzeText_SuccessfulEntityRecognitionRequest() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + kind = "EntityRecognition", + parameters = new + { + modelVersion = "latest", + overlapPolicy = new + { + policyKind = "allowOverlap", + }, + }, + analysisInput = new + { + documents = new object[] + { +new +{ +id = "2", +language = "en", +text = "When I was 5 years old I had $90.00 dollars to my name.", +}, +new +{ +id = "3", +language = "en", +text = "When we flew from LAX it seemed like we were moving at 10 meters per second. I was lucky to see Amsterdam, Effile Tower, and the Nile.", +}, +new +{ +id = "4", +language = "en", +text = "25th April Meeting was an intresting one. At least we gont to experience the WorldCup", +}, +new +{ +id = "5", +language = "en", +text = "My IP is 127.12.1.1 and my phone number is 5555555555", +} + }, + }, + }); + Response response = client.AnalyzeText(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("kind").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Text_AnalyzeText_SuccessfulEntityRecognitionRequest_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + kind = "EntityRecognition", + parameters = new + { + modelVersion = "latest", + overlapPolicy = new + { + policyKind = "allowOverlap", + }, + }, + analysisInput = new + { + documents = new object[] + { +new +{ +id = "2", +language = "en", +text = "When I was 5 years old I had $90.00 dollars to my name.", +}, +new +{ +id = "3", +language = "en", +text = "When we flew from LAX it seemed like we were moving at 10 meters per second. I was lucky to see Amsterdam, Effile Tower, and the Nile.", +}, +new +{ +id = "4", +language = "en", +text = "25th April Meeting was an intresting one. At least we gont to experience the WorldCup", +}, +new +{ +id = "5", +language = "en", +text = "My IP is 127.12.1.1 and my phone number is 5555555555", +} + }, + }, + }); + Response response = await client.AnalyzeTextAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("kind").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Text_AnalyzeText_SuccessfulEntityRecognitionRequest_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + + AnalyzeTextInput analyzeTextInput = new TextEntityRecognitionInput + { + TextInput = new MultiLanguageTextInput + { + MultiLanguageInputs = {new MultiLanguageInput("2", "When I was 5 years old I had $90.00 dollars to my name.") +{ +Language = "en", +}, new MultiLanguageInput("3", "When we flew from LAX it seemed like we were moving at 10 meters per second. I was lucky to see Amsterdam, Effile Tower, and the Nile.") +{ +Language = "en", +}, new MultiLanguageInput("4", "25th April Meeting was an intresting one. At least we gont to experience the WorldCup") +{ +Language = "en", +}, new MultiLanguageInput("5", "My IP is 127.12.1.1 and my phone number is 5555555555") +{ +Language = "en", +}}, + }, + ActionContent = new EntitiesActionContent + { + ModelVersion = "latest", + OverlapPolicy = new AllowOverlapEntityPolicyType(), + }, + }; + Response response = client.AnalyzeText(analyzeTextInput); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Text_AnalyzeText_SuccessfulEntityRecognitionRequest_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + + AnalyzeTextInput analyzeTextInput = new TextEntityRecognitionInput + { + TextInput = new MultiLanguageTextInput + { + MultiLanguageInputs = {new MultiLanguageInput("2", "When I was 5 years old I had $90.00 dollars to my name.") +{ +Language = "en", +}, new MultiLanguageInput("3", "When we flew from LAX it seemed like we were moving at 10 meters per second. I was lucky to see Amsterdam, Effile Tower, and the Nile.") +{ +Language = "en", +}, new MultiLanguageInput("4", "25th April Meeting was an intresting one. At least we gont to experience the WorldCup") +{ +Language = "en", +}, new MultiLanguageInput("5", "My IP is 127.12.1.1 and my phone number is 5555555555") +{ +Language = "en", +}}, + }, + ActionContent = new EntitiesActionContent + { + ModelVersion = "latest", + OverlapPolicy = new AllowOverlapEntityPolicyType(), + }, + }; + Response response = await client.AnalyzeTextAsync(analyzeTextInput); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Text_AnalyzeText_SuccessfulKeyPhraseExtractionRequest() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + kind = "KeyPhraseExtraction", + parameters = new + { + modelVersion = "latest", + }, + analysisInput = new + { + documents = new object[] + { +new +{ +id = "1", +language = "en", +text = "Microsoft was founded by Bill Gates and Paul Allen.", +}, +new +{ +id = "2", +language = "en", +text = "Text Analytics is one of the Azure Cognitive Services.", +}, +new +{ +id = "3", +language = "en", +text = "My cat might need to see a veterinarian.", +} + }, + }, + }); + Response response = client.AnalyzeText(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("kind").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Text_AnalyzeText_SuccessfulKeyPhraseExtractionRequest_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + kind = "KeyPhraseExtraction", + parameters = new + { + modelVersion = "latest", + }, + analysisInput = new + { + documents = new object[] + { +new +{ +id = "1", +language = "en", +text = "Microsoft was founded by Bill Gates and Paul Allen.", +}, +new +{ +id = "2", +language = "en", +text = "Text Analytics is one of the Azure Cognitive Services.", +}, +new +{ +id = "3", +language = "en", +text = "My cat might need to see a veterinarian.", +} + }, + }, + }); + Response response = await client.AnalyzeTextAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("kind").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Text_AnalyzeText_SuccessfulKeyPhraseExtractionRequest_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + + AnalyzeTextInput analyzeTextInput = new TextKeyPhraseExtractionInput + { + TextInput = new MultiLanguageTextInput + { + MultiLanguageInputs = {new MultiLanguageInput("1", "Microsoft was founded by Bill Gates and Paul Allen.") +{ +Language = "en", +}, new MultiLanguageInput("2", "Text Analytics is one of the Azure Cognitive Services.") +{ +Language = "en", +}, new MultiLanguageInput("3", "My cat might need to see a veterinarian.") +{ +Language = "en", +}}, + }, + ActionContent = new KeyPhraseActionContent + { + ModelVersion = "latest", + }, + }; + Response response = client.AnalyzeText(analyzeTextInput); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Text_AnalyzeText_SuccessfulKeyPhraseExtractionRequest_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + + AnalyzeTextInput analyzeTextInput = new TextKeyPhraseExtractionInput + { + TextInput = new MultiLanguageTextInput + { + MultiLanguageInputs = {new MultiLanguageInput("1", "Microsoft was founded by Bill Gates and Paul Allen.") +{ +Language = "en", +}, new MultiLanguageInput("2", "Text Analytics is one of the Azure Cognitive Services.") +{ +Language = "en", +}, new MultiLanguageInput("3", "My cat might need to see a veterinarian.") +{ +Language = "en", +}}, + }, + ActionContent = new KeyPhraseActionContent + { + ModelVersion = "latest", + }, + }; + Response response = await client.AnalyzeTextAsync(analyzeTextInput); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Text_AnalyzeText_SuccessfulLanguageDetectionRequest() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + kind = "LanguageDetection", + parameters = new + { + modelVersion = "latest", + }, + analysisInput = new + { + documents = new object[] + { +new +{ +id = "1", +text = "Hello world", +}, +new +{ +id = "2", +text = "Bonjour tout le monde", +}, +new +{ +id = "3", +text = "Hola mundo", +}, +new +{ +id = "4", +text = "Tumhara naam kya hai?", +} + }, + }, + }); + Response response = client.AnalyzeText(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("kind").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Text_AnalyzeText_SuccessfulLanguageDetectionRequest_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + kind = "LanguageDetection", + parameters = new + { + modelVersion = "latest", + }, + analysisInput = new + { + documents = new object[] + { +new +{ +id = "1", +text = "Hello world", +}, +new +{ +id = "2", +text = "Bonjour tout le monde", +}, +new +{ +id = "3", +text = "Hola mundo", +}, +new +{ +id = "4", +text = "Tumhara naam kya hai?", +} + }, + }, + }); + Response response = await client.AnalyzeTextAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("kind").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Text_AnalyzeText_SuccessfulLanguageDetectionRequest_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + + AnalyzeTextInput analyzeTextInput = new TextLanguageDetectionInput + { + TextInput = new LanguageDetectionTextInput + { + LanguageInputs = { new LanguageInput("1", "Hello world"), new LanguageInput("2", "Bonjour tout le monde"), new LanguageInput("3", "Hola mundo"), new LanguageInput("4", "Tumhara naam kya hai?") }, + }, + ActionContent = new LanguageDetectionActionContent + { + ModelVersion = "latest", + }, + }; + Response response = client.AnalyzeText(analyzeTextInput); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Text_AnalyzeText_SuccessfulLanguageDetectionRequest_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + + AnalyzeTextInput analyzeTextInput = new TextLanguageDetectionInput + { + TextInput = new LanguageDetectionTextInput + { + LanguageInputs = { new LanguageInput("1", "Hello world"), new LanguageInput("2", "Bonjour tout le monde"), new LanguageInput("3", "Hola mundo"), new LanguageInput("4", "Tumhara naam kya hai?") }, + }, + ActionContent = new LanguageDetectionActionContent + { + ModelVersion = "latest", + }, + }; + Response response = await client.AnalyzeTextAsync(analyzeTextInput); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Text_AnalyzeText_SuccessfulPiiEntityRecognitionExclusionRequest() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + kind = "PiiEntityRecognition", + parameters = new + { + modelVersion = "latest", + excludePiiCategories = new object[] + { +"USSocialSecurityNumber" + }, + }, + analysisInput = new + { + documents = new object[] + { +new +{ +id = "1", +language = "en", +text = "My SSN is 859-98-0987", +}, +new +{ +id = "2", +language = "en", +text = "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check.", +}, +new +{ +id = "3", +language = "en", +text = "Is 998.214.865-68 your Brazilian CPF number?", +} + }, + }, + }); + Response response = client.AnalyzeText(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("kind").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Text_AnalyzeText_SuccessfulPiiEntityRecognitionExclusionRequest_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + kind = "PiiEntityRecognition", + parameters = new + { + modelVersion = "latest", + excludePiiCategories = new object[] + { +"USSocialSecurityNumber" + }, + }, + analysisInput = new + { + documents = new object[] + { +new +{ +id = "1", +language = "en", +text = "My SSN is 859-98-0987", +}, +new +{ +id = "2", +language = "en", +text = "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check.", +}, +new +{ +id = "3", +language = "en", +text = "Is 998.214.865-68 your Brazilian CPF number?", +} + }, + }, + }); + Response response = await client.AnalyzeTextAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("kind").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Text_AnalyzeText_SuccessfulPiiEntityRecognitionExclusionRequest_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + + AnalyzeTextInput analyzeTextInput = new TextPiiEntitiesRecognitionInput + { + TextInput = new MultiLanguageTextInput + { + MultiLanguageInputs = {new MultiLanguageInput("1", "My SSN is 859-98-0987") +{ +Language = "en", +}, new MultiLanguageInput("2", "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check.") +{ +Language = "en", +}, new MultiLanguageInput("3", "Is 998.214.865-68 your Brazilian CPF number?") +{ +Language = "en", +}}, + }, + ActionContent = new PiiActionContent + { + ModelVersion = "latest", + ExcludePiiCategories = { PiiCategoriesExclude.UsSocialSecurityNumber }, + }, + }; + Response response = client.AnalyzeText(analyzeTextInput); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Text_AnalyzeText_SuccessfulPiiEntityRecognitionExclusionRequest_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + + AnalyzeTextInput analyzeTextInput = new TextPiiEntitiesRecognitionInput + { + TextInput = new MultiLanguageTextInput + { + MultiLanguageInputs = {new MultiLanguageInput("1", "My SSN is 859-98-0987") +{ +Language = "en", +}, new MultiLanguageInput("2", "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check.") +{ +Language = "en", +}, new MultiLanguageInput("3", "Is 998.214.865-68 your Brazilian CPF number?") +{ +Language = "en", +}}, + }, + ActionContent = new PiiActionContent + { + ModelVersion = "latest", + ExcludePiiCategories = { PiiCategoriesExclude.UsSocialSecurityNumber }, + }, + }; + Response response = await client.AnalyzeTextAsync(analyzeTextInput); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Text_AnalyzeText_SuccessfulPiiEntityRecognitionRedactionRequest() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + kind = "PiiEntityRecognition", + parameters = new + { + modelVersion = "latest", + redactionCharacter = "-", + }, + analysisInput = new + { + documents = new object[] + { +new +{ +id = "1", +language = "en", +text = "My SSN is 859-98-0987", +}, +new +{ +id = "2", +language = "en", +text = "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check.", +}, +new +{ +id = "3", +language = "en", +text = "Is 998.214.865-68 your Brazilian CPF number?", +} + }, + }, + }); + Response response = client.AnalyzeText(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("kind").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Text_AnalyzeText_SuccessfulPiiEntityRecognitionRedactionRequest_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + kind = "PiiEntityRecognition", + parameters = new + { + modelVersion = "latest", + redactionCharacter = "-", + }, + analysisInput = new + { + documents = new object[] + { +new +{ +id = "1", +language = "en", +text = "My SSN is 859-98-0987", +}, +new +{ +id = "2", +language = "en", +text = "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check.", +}, +new +{ +id = "3", +language = "en", +text = "Is 998.214.865-68 your Brazilian CPF number?", +} + }, + }, + }); + Response response = await client.AnalyzeTextAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("kind").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Text_AnalyzeText_SuccessfulPiiEntityRecognitionRedactionRequest_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + + AnalyzeTextInput analyzeTextInput = new TextPiiEntitiesRecognitionInput + { + TextInput = new MultiLanguageTextInput + { + MultiLanguageInputs = {new MultiLanguageInput("1", "My SSN is 859-98-0987") +{ +Language = "en", +}, new MultiLanguageInput("2", "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check.") +{ +Language = "en", +}, new MultiLanguageInput("3", "Is 998.214.865-68 your Brazilian CPF number?") +{ +Language = "en", +}}, + }, + ActionContent = new PiiActionContent + { + ModelVersion = "latest", + RedactionCharacter = RedactionCharacter.Minus, + }, + }; + Response response = client.AnalyzeText(analyzeTextInput); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Text_AnalyzeText_SuccessfulPiiEntityRecognitionRedactionRequest_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + + AnalyzeTextInput analyzeTextInput = new TextPiiEntitiesRecognitionInput + { + TextInput = new MultiLanguageTextInput + { + MultiLanguageInputs = {new MultiLanguageInput("1", "My SSN is 859-98-0987") +{ +Language = "en", +}, new MultiLanguageInput("2", "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check.") +{ +Language = "en", +}, new MultiLanguageInput("3", "Is 998.214.865-68 your Brazilian CPF number?") +{ +Language = "en", +}}, + }, + ActionContent = new PiiActionContent + { + ModelVersion = "latest", + RedactionCharacter = RedactionCharacter.Minus, + }, + }; + Response response = await client.AnalyzeTextAsync(analyzeTextInput); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Text_AnalyzeText_SuccessfulPiiEntityRecognitionRequest() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + kind = "PiiEntityRecognition", + parameters = new + { + modelVersion = "latest", + }, + analysisInput = new + { + documents = new object[] + { +new +{ +id = "1", +language = "en", +text = "My SSN is 859-98-0987", +}, +new +{ +id = "2", +language = "en", +text = "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check.", +}, +new +{ +id = "3", +language = "en", +text = "Is 998.214.865-68 your Brazilian CPF number?", +} + }, + }, + }); + Response response = client.AnalyzeText(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("kind").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Text_AnalyzeText_SuccessfulPiiEntityRecognitionRequest_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + kind = "PiiEntityRecognition", + parameters = new + { + modelVersion = "latest", + }, + analysisInput = new + { + documents = new object[] + { +new +{ +id = "1", +language = "en", +text = "My SSN is 859-98-0987", +}, +new +{ +id = "2", +language = "en", +text = "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check.", +}, +new +{ +id = "3", +language = "en", +text = "Is 998.214.865-68 your Brazilian CPF number?", +} + }, + }, + }); + Response response = await client.AnalyzeTextAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("kind").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Text_AnalyzeText_SuccessfulPiiEntityRecognitionRequest_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + + AnalyzeTextInput analyzeTextInput = new TextPiiEntitiesRecognitionInput + { + TextInput = new MultiLanguageTextInput + { + MultiLanguageInputs = {new MultiLanguageInput("1", "My SSN is 859-98-0987") +{ +Language = "en", +}, new MultiLanguageInput("2", "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check.") +{ +Language = "en", +}, new MultiLanguageInput("3", "Is 998.214.865-68 your Brazilian CPF number?") +{ +Language = "en", +}}, + }, + ActionContent = new PiiActionContent + { + ModelVersion = "latest", + }, + }; + Response response = client.AnalyzeText(analyzeTextInput); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Text_AnalyzeText_SuccessfulPiiEntityRecognitionRequest_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + + AnalyzeTextInput analyzeTextInput = new TextPiiEntitiesRecognitionInput + { + TextInput = new MultiLanguageTextInput + { + MultiLanguageInputs = {new MultiLanguageInput("1", "My SSN is 859-98-0987") +{ +Language = "en", +}, new MultiLanguageInput("2", "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check.") +{ +Language = "en", +}, new MultiLanguageInput("3", "Is 998.214.865-68 your Brazilian CPF number?") +{ +Language = "en", +}}, + }, + ActionContent = new PiiActionContent + { + ModelVersion = "latest", + }, + }; + Response response = await client.AnalyzeTextAsync(analyzeTextInput); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Text_AnalyzeText_SuccessfulSentimentAnalysisRequest() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + kind = "SentimentAnalysis", + parameters = new + { + modelVersion = "latest", + }, + analysisInput = new + { + documents = new object[] + { +new +{ +id = "1", +language = "en", +text = "Great atmosphere. Close to plenty of restaurants, hotels, and transit! Staff are friendly and helpful.", +} + }, + }, + }); + Response response = client.AnalyzeText(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("kind").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Text_AnalyzeText_SuccessfulSentimentAnalysisRequest_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + kind = "SentimentAnalysis", + parameters = new + { + modelVersion = "latest", + }, + analysisInput = new + { + documents = new object[] + { +new +{ +id = "1", +language = "en", +text = "Great atmosphere. Close to plenty of restaurants, hotels, and transit! Staff are friendly and helpful.", +} + }, + }, + }); + Response response = await client.AnalyzeTextAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("kind").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Text_AnalyzeText_SuccessfulSentimentAnalysisRequest_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + + AnalyzeTextInput analyzeTextInput = new TextSentimentAnalysisInput + { + TextInput = new MultiLanguageTextInput + { + MultiLanguageInputs = {new MultiLanguageInput("1", "Great atmosphere. Close to plenty of restaurants, hotels, and transit! Staff are friendly and helpful.") +{ +Language = "en", +}}, + }, + ActionContent = new SentimentAnalysisActionContent + { + ModelVersion = "latest", + }, + }; + Response response = client.AnalyzeText(analyzeTextInput); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Text_AnalyzeText_SuccessfulSentimentAnalysisRequest_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + + AnalyzeTextInput analyzeTextInput = new TextSentimentAnalysisInput + { + TextInput = new MultiLanguageTextInput + { + MultiLanguageInputs = {new MultiLanguageInput("1", "Great atmosphere. Close to plenty of restaurants, hotels, and transit! Staff are friendly and helpful.") +{ +Language = "en", +}}, + }, + ActionContent = new SentimentAnalysisActionContent + { + ModelVersion = "latest", + }, + }; + Response response = await client.AnalyzeTextAsync(analyzeTextInput); } [Test] diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/JobRouterModelFactory.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/JobRouterModelFactory.cs index 30646d074245..3b8a924d3c6b 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/JobRouterModelFactory.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/JobRouterModelFactory.cs @@ -364,6 +364,29 @@ public static UnassignJobResult UnassignJobResult(string jobId = null, int unass return new UnassignJobResult(jobId, unassignmentCount, serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// Id of job assignment that assigns a worker that has accepted an offer to a job. + /// Id of the job assigned. + /// Id of the worker that has been assigned this job. + /// A new instance for mocking. + public static AcceptJobOfferResult AcceptJobOfferResult(string assignmentId = null, string jobId = null, string workerId = null) + { + return new AcceptJobOfferResult(assignmentId, jobId, workerId, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Id of the queue these details are about. + /// Length of the queue: total number of enqueued jobs. + /// The estimated wait time of this queue rounded up to the nearest minute, grouped by job priority. + /// The wait time of the job that has been enqueued in this queue for the longest. + /// A new instance for mocking. + public static RouterQueueStatistics RouterQueueStatistics(string queueId = null, int length = default, IDictionary estimatedWaitTimes = null, double? longestJobWaitTimeMinutes = null) + { + estimatedWaitTimes ??= new Dictionary(); + + return new RouterQueueStatistics(queueId, length, estimatedWaitTimes, longestJobWaitTimeMinutes, serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// Id of a channel. /// The amount of capacity that an instance of a job of this channel will consume of the total worker capacity. @@ -402,28 +425,5 @@ public static RouterWorkerAssignment RouterWorkerAssignment(string assignmentId { return new RouterWorkerAssignment(assignmentId, jobId, capacityCost, assignedAt, serializedAdditionalRawData: null); } - - /// Initializes a new instance of . - /// Id of job assignment that assigns a worker that has accepted an offer to a job. - /// Id of the job assigned. - /// Id of the worker that has been assigned this job. - /// A new instance for mocking. - public static AcceptJobOfferResult AcceptJobOfferResult(string assignmentId = null, string jobId = null, string workerId = null) - { - return new AcceptJobOfferResult(assignmentId, jobId, workerId, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Id of the queue these details are about. - /// Length of the queue: total number of enqueued jobs. - /// The estimated wait time of this queue rounded up to the nearest minute, grouped by job priority. - /// The wait time of the job that has been enqueued in this queue for the longest. - /// A new instance for mocking. - public static RouterQueueStatistics RouterQueueStatistics(string queueId = null, int length = default, IDictionary estimatedWaitTimes = null, double? longestJobWaitTimeMinutes = null) - { - estimatedWaitTimes ??= new Dictionary(); - - return new RouterQueueStatistics(queueId, length, estimatedWaitTimes, longestJobWaitTimeMinutes, serializedAdditionalRawData: null); - } } } diff --git a/sdk/communication/Azure.Communication.Messages/tspCodeModel.json b/sdk/communication/Azure.Communication.Messages/tspCodeModel.json index 36acd3c77c51..1c7b3072902e 100644 --- a/sdk/communication/Azure.Communication.Messages/tspCodeModel.json +++ b/sdk/communication/Azure.Communication.Messages/tspCodeModel.json @@ -304,8 +304,8 @@ { "$id": "34", "kind": "enum", - "name": "MessageTemplateStatus", - "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateStatus", + "name": "Versions", + "crossLanguageDefinitionId": "Azure.Communication.MessagesService.Versions", "valueType": { "$id": "35", "kind": "string", @@ -317,8 +317,8 @@ { "$id": "36", "kind": "enumvalue", - "name": "approved", - "value": "approved", + "name": "c2024_02_01", + "value": "2024-02-01", "valueType": { "$id": "37", "kind": "string", @@ -329,59 +329,97 @@ "enumType": { "$ref": "34" }, + "description": "Azure Communication Messages 2024-02-01 api version", + "decorators": [] + } + ], + "description": "Azure Communication Messages Versions", + "isFixed": true, + "isFlags": false, + "usage": "ApiVersionEnum", + "decorators": [] + }, + { + "$id": "38", + "kind": "enum", + "name": "MessageTemplateStatus", + "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateStatus", + "valueType": { + "$id": "39", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "40", + "kind": "enumvalue", + "name": "approved", + "value": "approved", + "valueType": { + "$id": "41", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "38" + }, "description": "Message template is approved.", "decorators": [] }, { - "$id": "38", + "$id": "42", "kind": "enumvalue", "name": "rejected", "value": "rejected", "valueType": { - "$id": "39", + "$id": "43", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "34" + "$ref": "38" }, "description": "Message template is rejected.", "decorators": [] }, { - "$id": "40", + "$id": "44", "kind": "enumvalue", "name": "pending", "value": "pending", "valueType": { - "$id": "41", + "$id": "45", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "34" + "$ref": "38" }, "description": "Message template is pending.", "decorators": [] }, { - "$id": "42", + "$id": "46", "kind": "enumvalue", "name": "paused", "value": "paused", "valueType": { - "$id": "43", + "$id": "47", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "34" + "$ref": "38" }, "description": "Message template is paused.", "decorators": [] @@ -394,12 +432,12 @@ "decorators": [] }, { - "$id": "44", + "$id": "48", "kind": "enum", "name": "CommunicationMessagesChannel", "crossLanguageDefinitionId": "Azure.Communication.MessagesService.CommunicationMessagesChannel", "valueType": { - "$id": "45", + "$id": "49", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -407,19 +445,19 @@ }, "values": [ { - "$id": "46", + "$id": "50", "kind": "enumvalue", "name": "whatsApp", "value": "whatsApp", "valueType": { - "$id": "47", + "$id": "51", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "44" + "$ref": "48" }, "description": "The WhatsApp communication messages channel type.", "decorators": [] @@ -431,44 +469,6 @@ "usage": "Output,Json", "decorators": [] }, - { - "$id": "48", - "kind": "enum", - "name": "Versions", - "crossLanguageDefinitionId": "Azure.Communication.MessagesService.Versions", - "valueType": { - "$id": "49", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "50", - "kind": "enumvalue", - "name": "c2024_02_01", - "value": "2024-02-01", - "valueType": { - "$id": "51", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "48" - }, - "description": "Azure Communication Messages 2024-02-01 api version", - "decorators": [] - } - ], - "description": "Azure Communication Messages Versions", - "isFixed": true, - "isFlags": false, - "usage": "ApiVersionEnum", - "decorators": [] - }, { "$id": "52", "kind": "enum", @@ -522,7 +522,7 @@ "description": "Repeatability Result header options", "isFixed": true, "isFlags": false, - "usage": "None", + "usage": "Output", "decorators": [] } ], @@ -1846,7 +1846,7 @@ "serializedName": "kind", "description": "The type discriminator describing a template type.", "type": { - "$ref": "44" + "$ref": "48" }, "optional": false, "readOnly": false, @@ -1900,7 +1900,7 @@ "serializedName": "status", "description": "The aggregated template status.", "type": { - "$ref": "34" + "$ref": "38" }, "optional": false, "readOnly": false, @@ -1983,7 +1983,7 @@ "kind": "model", "name": "PagedMessageTemplateItem", "crossLanguageDefinitionId": "Azure.Core.Foundations.CustomPage", - "usage": "None", + "usage": "Output,Json", "description": "Paged collection of MessageTemplateItem items", "decorators": [], "properties": [ @@ -2509,11 +2509,66 @@ "GenerateProtocolMethod": true, "GenerateConvenienceMethod": true, "CrossLanguageDefinitionId": "ClientForAcsMessages.NotificationMessagesClient.downloadMedia", - "Decorators": [] + "Decorators": [], + "Examples": [ + { + "$id": "254", + "kind": "http", + "name": "Download media", + "description": "Download media", + "filePath": "2024-02-01/Stream_GetMedia.json", + "parameters": [ + { + "$id": "255", + "parameter": { + "$ref": "234" + }, + "value": { + "$id": "256", + "kind": "string", + "type": { + "$ref": "235" + }, + "value": "2024-02-01" + } + }, + { + "$id": "257", + "parameter": { + "$ref": "238" + }, + "value": { + "$id": "258", + "kind": "string", + "type": { + "$ref": "239" + }, + "value": "d19e68ec-bdd6-4a50-8dfb-cbb1642df6ab" + } + } + ], + "responses": [ + { + "$id": "259", + "response": { + "$ref": "246" + }, + "bodyValue": { + "$id": "260", + "kind": "string", + "type": { + "$ref": "247" + }, + "value": "" + } + } + ] + } + ] } ], "Protocol": { - "$id": "254" + "$id": "261" }, "Parameters": [ { @@ -2523,23 +2578,23 @@ "Decorators": [] }, { - "$id": "255", + "$id": "262", "Name": "MessageTemplateClient", "Operations": [ { - "$id": "256", + "$id": "263", "Name": "getTemplates", "ResourceName": "MessageTemplateItem", "Description": "List all templates for given Azure Communication Services channel", "Accessibility": "public", "Parameters": [ { - "$id": "257", + "$id": "264", "Name": "endpoint", "NameInRequest": "endpoint", "Description": "The communication resource, for example https://my-resource.communication.azure.com", "Type": { - "$id": "258", + "$id": "265", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -2555,12 +2610,12 @@ "Kind": "Client" }, { - "$id": "259", + "$id": "266", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "260", + "$id": "267", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2574,9 +2629,9 @@ "IsRequired": true, "Kind": "Client", "DefaultValue": { - "$id": "261", + "$id": "268", "Type": { - "$id": "262", + "$id": "269", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -2587,17 +2642,17 @@ "SkipUrlEncoding": false }, { - "$id": "263", + "$id": "270", "Name": "channelId", "NameInRequest": "channelId", "Description": "The registration ID of the channel.", "Type": { - "$id": "264", + "$id": "271", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "265", + "$id": "272", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2616,12 +2671,12 @@ "SkipUrlEncoding": false }, { - "$id": "266", + "$id": "273", "Name": "maxpagesize", "NameInRequest": "maxpagesize", "Description": "Number of objects to return per page.", "Type": { - "$id": "267", + "$id": "274", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -2638,17 +2693,17 @@ "SkipUrlEncoding": false }, { - "$id": "268", + "$id": "275", "Name": "clientRequestId", "NameInRequest": "x-ms-client-request-id", "Description": "An opaque, globally-unique, client-generated string identifier for the request.", "Type": { - "$id": "269", + "$id": "276", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "270", + "$id": "277", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2667,14 +2722,14 @@ "SkipUrlEncoding": false }, { - "$id": "271", + "$id": "278", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "272", + "$id": "279", "kind": "constant", "valueType": { - "$id": "273", + "$id": "280", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2696,7 +2751,7 @@ ], "Responses": [ { - "$id": "274", + "$id": "281", "StatusCodes": [ 200 ], @@ -2706,17 +2761,17 @@ "BodyMediaType": "Json", "Headers": [ { - "$id": "275", + "$id": "282", "Name": "clientRequestId", "NameInResponse": "x-ms-client-request-id", "Description": "An opaque, globally-unique, client-generated string identifier for the request.", "Type": { - "$id": "276", + "$id": "283", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "277", + "$id": "284", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2738,7 +2793,7 @@ "Path": "/messages/channels/{channelId}/templates", "BufferResponse": true, "Paging": { - "$id": "278", + "$id": "285", "ItemName": "value", "NextLinkName": "nextLink" }, @@ -2749,26 +2804,26 @@ } ], "Protocol": { - "$id": "279" + "$id": "286" }, "Parameters": [ { - "$ref": "257" + "$ref": "264" } ], "Decorators": [] } ], "Auth": { - "$id": "280", + "$id": "287", "OAuth2": { - "$id": "281", + "$id": "288", "Scopes": [ "https://communication.azure.com/.default" ] }, "ApiKey": { - "$id": "282", + "$id": "289", "Name": "Authorization" } } diff --git a/sdk/communication/Azure.Communication.ProgrammableConnectivity/src/Generated/Docs/DeviceLocation.xml b/sdk/communication/Azure.Communication.ProgrammableConnectivity/src/Generated/Docs/DeviceLocation.xml index 78861d2d14d8..7f0e9857ff68 100644 --- a/sdk/communication/Azure.Communication.ProgrammableConnectivity/src/Generated/Docs/DeviceLocation.xml +++ b/sdk/communication/Azure.Communication.ProgrammableConnectivity/src/Generated/Docs/DeviceLocation.xml @@ -5,84 +5,43 @@ This sample shows how to call VerifyAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeviceLocation client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceLocationClient(apiVersion: "2024-02-09-preview"); -DeviceLocationVerificationContent body = new DeviceLocationVerificationContent(new NetworkIdentifier("", ""), 123.45, 123.45, 1234, new LocationDevice()); -Response response = await client.VerifyAsync("", body); -]]> -This sample shows how to call VerifyAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -DeviceLocation client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceLocationClient(apiVersion: "2024-02-09-preview"); - -DeviceLocationVerificationContent body = new DeviceLocationVerificationContent(new NetworkIdentifier("", ""), 123.45, 123.45, 1234, new LocationDevice +DeviceLocationVerificationContent body = new DeviceLocationVerificationContent(new NetworkIdentifier("ipv4", "12.12.12.12"), 70, -161, 91, new LocationDevice { - NetworkAccessIdentifier = "", - PhoneNumber = "", - Ipv4Address = new Ipv4Address("", 1234), - Ipv6Address = new Ipv6Address("", 1234), + NetworkAccessIdentifier = "122345@domain.com", + PhoneNumber = "+447000000000", + Ipv4Address = new Ipv4Address("12.12.12.12", 2442), + Ipv6Address = new Ipv6Address("3001:0da8:75a3:0000:0000:8a2e:0370:7334", 1643), }); -Response response = await client.VerifyAsync("", body); +Response response = await client.VerifyAsync("zdgrzzaxlodrvewbksn", body); ]]> This sample shows how to call Verify. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeviceLocation client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceLocationClient(apiVersion: "2024-02-09-preview"); -DeviceLocationVerificationContent body = new DeviceLocationVerificationContent(new NetworkIdentifier("", ""), 123.45, 123.45, 1234, new LocationDevice()); -Response response = client.Verify("", body); -]]> -This sample shows how to call Verify with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -DeviceLocation client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceLocationClient(apiVersion: "2024-02-09-preview"); - -DeviceLocationVerificationContent body = new DeviceLocationVerificationContent(new NetworkIdentifier("", ""), 123.45, 123.45, 1234, new LocationDevice +DeviceLocationVerificationContent body = new DeviceLocationVerificationContent(new NetworkIdentifier("ipv4", "12.12.12.12"), 70, -161, 91, new LocationDevice { - NetworkAccessIdentifier = "", - PhoneNumber = "", - Ipv4Address = new Ipv4Address("", 1234), - Ipv6Address = new Ipv6Address("", 1234), + NetworkAccessIdentifier = "122345@domain.com", + PhoneNumber = "+447000000000", + Ipv4Address = new Ipv4Address("12.12.12.12", 2442), + Ipv6Address = new Ipv6Address("3001:0da8:75a3:0000:0000:8a2e:0370:7334", 1643), }); -Response response = client.Verify("", body); +Response response = client.Verify("zdgrzzaxlodrvewbksn", body); ]]> This sample shows how to call VerifyAsync and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -DeviceLocation client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceLocationClient(apiVersion: "2024-02-09-preview"); - -using RequestContent content = RequestContent.Create(new -{ - networkIdentifier = new - { - identifierType = "", - identifier = "", - }, - latitude = 123.45, - longitude = 123.45, - accuracy = 1234, - device = new object(), -}); -Response response = await client.VerifyAsync("", content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("verificationResult").ToString()); -]]> -This sample shows how to call VerifyAsync with all parameters and request content and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeviceLocation client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceLocationClient(apiVersion: "2024-02-09-preview"); @@ -90,29 +49,29 @@ using RequestContent content = RequestContent.Create(new { networkIdentifier = new { - identifierType = "", - identifier = "", + identifierType = "ipv4", + identifier = "12.12.12.12", }, - latitude = 123.45, - longitude = 123.45, - accuracy = 1234, + latitude = 70, + longitude = -161, + accuracy = 91, device = new { - networkAccessIdentifier = "", - phoneNumber = "", + networkAccessIdentifier = "122345@domain.com", + phoneNumber = "+447000000000", ipv4Address = new { - ipv4 = "", - port = 1234, + ipv4 = "12.12.12.12", + port = 2442, }, ipv6Address = new { - ipv6 = "", - port = 1234, + ipv6 = "3001:0da8:75a3:0000:0000:8a2e:0370:7334", + port = 1643, }, }, }); -Response response = await client.VerifyAsync("", content); +Response response = await client.VerifyAsync("zdgrzzaxlodrvewbksn", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("verificationResult").ToString()); @@ -122,30 +81,7 @@ Console.WriteLine(result.GetProperty("verificationResult").ToString()); This sample shows how to call Verify and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -DeviceLocation client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceLocationClient(apiVersion: "2024-02-09-preview"); - -using RequestContent content = RequestContent.Create(new -{ - networkIdentifier = new - { - identifierType = "", - identifier = "", - }, - latitude = 123.45, - longitude = 123.45, - accuracy = 1234, - device = new object(), -}); -Response response = client.Verify("", content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("verificationResult").ToString()); -]]> -This sample shows how to call Verify with all parameters and request content and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeviceLocation client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceLocationClient(apiVersion: "2024-02-09-preview"); @@ -153,29 +89,29 @@ using RequestContent content = RequestContent.Create(new { networkIdentifier = new { - identifierType = "", - identifier = "", + identifierType = "ipv4", + identifier = "12.12.12.12", }, - latitude = 123.45, - longitude = 123.45, - accuracy = 1234, + latitude = 70, + longitude = -161, + accuracy = 91, device = new { - networkAccessIdentifier = "", - phoneNumber = "", + networkAccessIdentifier = "122345@domain.com", + phoneNumber = "+447000000000", ipv4Address = new { - ipv4 = "", - port = 1234, + ipv4 = "12.12.12.12", + port = 2442, }, ipv6Address = new { - ipv6 = "", - port = 1234, + ipv6 = "3001:0da8:75a3:0000:0000:8a2e:0370:7334", + port = 1643, }, }, }); -Response response = client.Verify("", content); +Response response = client.Verify("zdgrzzaxlodrvewbksn", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("verificationResult").ToString()); diff --git a/sdk/communication/Azure.Communication.ProgrammableConnectivity/src/Generated/Docs/DeviceNetwork.xml b/sdk/communication/Azure.Communication.ProgrammableConnectivity/src/Generated/Docs/DeviceNetwork.xml index 1f977fef38cb..8d5a6738ca72 100644 --- a/sdk/communication/Azure.Communication.ProgrammableConnectivity/src/Generated/Docs/DeviceNetwork.xml +++ b/sdk/communication/Azure.Communication.ProgrammableConnectivity/src/Generated/Docs/DeviceNetwork.xml @@ -5,74 +5,40 @@ This sample shows how to call RetrieveAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeviceNetwork client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceNetworkClient(apiVersion: "2024-02-09-preview"); -NetworkIdentifier body = new NetworkIdentifier("", ""); -Response response = await client.RetrieveAsync("", body); -]]> -This sample shows how to call RetrieveAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -DeviceNetwork client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceNetworkClient(apiVersion: "2024-02-09-preview"); - -NetworkIdentifier body = new NetworkIdentifier("", ""); -Response response = await client.RetrieveAsync("", body); +NetworkIdentifier body = new NetworkIdentifier("ipv6", "3001:0da8:75a3:0000:0000:8a2e:0370:7334"); +Response response = await client.RetrieveAsync("zdgrzzaxlodrvewbksn", body); ]]> This sample shows how to call Retrieve. "); -TokenCredential credential = new DefaultAzureCredential(); -DeviceNetwork client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceNetworkClient(apiVersion: "2024-02-09-preview"); - -NetworkIdentifier body = new NetworkIdentifier("", ""); -Response response = client.Retrieve("", body); -]]> -This sample shows how to call Retrieve with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeviceNetwork client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceNetworkClient(apiVersion: "2024-02-09-preview"); -NetworkIdentifier body = new NetworkIdentifier("", ""); -Response response = client.Retrieve("", body); +NetworkIdentifier body = new NetworkIdentifier("ipv6", "3001:0da8:75a3:0000:0000:8a2e:0370:7334"); +Response response = client.Retrieve("zdgrzzaxlodrvewbksn", body); ]]> This sample shows how to call RetrieveAsync and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -DeviceNetwork client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceNetworkClient(apiVersion: "2024-02-09-preview"); - -using RequestContent content = RequestContent.Create(new -{ - identifierType = "", - identifier = "", -}); -Response response = await client.RetrieveAsync("", content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("networkCode").ToString()); -]]> -This sample shows how to call RetrieveAsync with all parameters and request content and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeviceNetwork client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceNetworkClient(apiVersion: "2024-02-09-preview"); using RequestContent content = RequestContent.Create(new { - identifierType = "", - identifier = "", + identifierType = "ipv6", + identifier = "3001:0da8:75a3:0000:0000:8a2e:0370:7334", }); -Response response = await client.RetrieveAsync("", content); +Response response = await client.RetrieveAsync("zdgrzzaxlodrvewbksn", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("networkCode").ToString()); @@ -82,32 +48,16 @@ Console.WriteLine(result.GetProperty("networkCode").ToString()); This sample shows how to call Retrieve and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -DeviceNetwork client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceNetworkClient(apiVersion: "2024-02-09-preview"); - -using RequestContent content = RequestContent.Create(new -{ - identifierType = "", - identifier = "", -}); -Response response = client.Retrieve("", content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("networkCode").ToString()); -]]> -This sample shows how to call Retrieve with all parameters and request content and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeviceNetwork client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceNetworkClient(apiVersion: "2024-02-09-preview"); using RequestContent content = RequestContent.Create(new { - identifierType = "", - identifier = "", + identifierType = "ipv6", + identifier = "3001:0da8:75a3:0000:0000:8a2e:0370:7334", }); -Response response = client.Retrieve("", content); +Response response = client.Retrieve("zdgrzzaxlodrvewbksn", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("networkCode").ToString()); diff --git a/sdk/communication/Azure.Communication.ProgrammableConnectivity/src/Generated/Docs/NumberVerification.xml b/sdk/communication/Azure.Communication.ProgrammableConnectivity/src/Generated/Docs/NumberVerification.xml index d4e2d4703591..b3d44f324795 100644 --- a/sdk/communication/Azure.Communication.ProgrammableConnectivity/src/Generated/Docs/NumberVerification.xml +++ b/sdk/communication/Azure.Communication.ProgrammableConnectivity/src/Generated/Docs/NumberVerification.xml @@ -5,76 +5,39 @@ This sample shows how to call VerifyWithoutCodeAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview"); -NumberVerificationWithoutCodeContent body = new NumberVerificationWithoutCodeContent(new NetworkIdentifier("", ""), new Uri("http://localhost:3000")); -Response response = await client.VerifyWithoutCodeAsync("", body); -]]> -This sample shows how to call VerifyWithoutCodeAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview"); - -NumberVerificationWithoutCodeContent body = new NumberVerificationWithoutCodeContent(new NetworkIdentifier("", ""), new Uri("http://localhost:3000")) +NumberVerificationWithoutCodeContent body = new NumberVerificationWithoutCodeContent(new NetworkIdentifier("ipv4", "12.12.12.12"), new Uri("https://www.contoso.com")) { - PhoneNumber = "", - HashedPhoneNumber = "", + PhoneNumber = "+14424318793", + HashedPhoneNumber = "bwsl", }; -Response response = await client.VerifyWithoutCodeAsync("", body); +Response response = await client.VerifyWithoutCodeAsync("zdgrzzaxlodrvewbksn", body); ]]> This sample shows how to call VerifyWithoutCode. "); -TokenCredential credential = new DefaultAzureCredential(); -NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview"); - -NumberVerificationWithoutCodeContent body = new NumberVerificationWithoutCodeContent(new NetworkIdentifier("", ""), new Uri("http://localhost:3000")); -Response response = client.VerifyWithoutCode("", body); -]]> -This sample shows how to call VerifyWithoutCode with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview"); -NumberVerificationWithoutCodeContent body = new NumberVerificationWithoutCodeContent(new NetworkIdentifier("", ""), new Uri("http://localhost:3000")) +NumberVerificationWithoutCodeContent body = new NumberVerificationWithoutCodeContent(new NetworkIdentifier("ipv4", "12.12.12.12"), new Uri("https://www.contoso.com")) { - PhoneNumber = "", - HashedPhoneNumber = "", + PhoneNumber = "+14424318793", + HashedPhoneNumber = "bwsl", }; -Response response = client.VerifyWithoutCode("", body); +Response response = client.VerifyWithoutCode("zdgrzzaxlodrvewbksn", body); ]]> This sample shows how to call VerifyWithoutCodeAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview"); - -using RequestContent content = RequestContent.Create(new -{ - networkIdentifier = new - { - identifierType = "", - identifier = "", - }, - redirectUri = "http://localhost:3000", -}); -Response response = await client.VerifyWithoutCodeAsync("", content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call VerifyWithoutCodeAsync with all parameters and request content. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview"); @@ -82,14 +45,14 @@ using RequestContent content = RequestContent.Create(new { networkIdentifier = new { - identifierType = "", - identifier = "", + identifierType = "ipv4", + identifier = "12.12.12.12", }, - phoneNumber = "", - hashedPhoneNumber = "", - redirectUri = "http://localhost:3000", + phoneNumber = "+14424318793", + hashedPhoneNumber = "bwsl", + redirectUri = "https://www.contoso.com", }); -Response response = await client.VerifyWithoutCodeAsync("", content); +Response response = await client.VerifyWithoutCodeAsync("zdgrzzaxlodrvewbksn", content); Console.WriteLine(response.Status); ]]> @@ -98,26 +61,7 @@ Console.WriteLine(response.Status); This sample shows how to call VerifyWithoutCode. "); -TokenCredential credential = new DefaultAzureCredential(); -NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview"); - -using RequestContent content = RequestContent.Create(new -{ - networkIdentifier = new - { - identifierType = "", - identifier = "", - }, - redirectUri = "http://localhost:3000", -}); -Response response = client.VerifyWithoutCode("", content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call VerifyWithoutCode with all parameters and request content. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview"); @@ -125,14 +69,14 @@ using RequestContent content = RequestContent.Create(new { networkIdentifier = new { - identifierType = "", - identifier = "", + identifierType = "ipv4", + identifier = "12.12.12.12", }, - phoneNumber = "", - hashedPhoneNumber = "", - redirectUri = "http://localhost:3000", + phoneNumber = "+14424318793", + hashedPhoneNumber = "bwsl", + redirectUri = "https://www.contoso.com", }); -Response response = client.VerifyWithoutCode("", content); +Response response = client.VerifyWithoutCode("zdgrzzaxlodrvewbksn", content); Console.WriteLine(response.Status); ]]> @@ -141,72 +85,39 @@ Console.WriteLine(response.Status); This sample shows how to call VerifyWithCodeAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview"); - -NumberVerificationWithCodeContent body = new NumberVerificationWithCodeContent(""); -Response response = await client.VerifyWithCodeAsync("", body); -]]> -This sample shows how to call VerifyWithCodeAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview"); -NumberVerificationWithCodeContent body = new NumberVerificationWithCodeContent(""); -Response response = await client.VerifyWithCodeAsync("", body); +NumberVerificationWithCodeContent body = new NumberVerificationWithCodeContent("yn"); +Response response = await client.VerifyWithCodeAsync("zdgrzzaxlodrvewbksn", body); ]]> This sample shows how to call VerifyWithCode. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview"); -NumberVerificationWithCodeContent body = new NumberVerificationWithCodeContent(""); -Response response = client.VerifyWithCode("", body); -]]> -This sample shows how to call VerifyWithCode with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview"); - -NumberVerificationWithCodeContent body = new NumberVerificationWithCodeContent(""); -Response response = client.VerifyWithCode("", body); +NumberVerificationWithCodeContent body = new NumberVerificationWithCodeContent("yn"); +Response response = client.VerifyWithCode("zdgrzzaxlodrvewbksn", body); ]]> This sample shows how to call VerifyWithCodeAsync and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview"); - -using RequestContent content = RequestContent.Create(new -{ - apcCode = "", -}); -Response response = await client.VerifyWithCodeAsync("", content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("verificationResult").ToString()); -]]> -This sample shows how to call VerifyWithCodeAsync with all parameters and request content and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview"); using RequestContent content = RequestContent.Create(new { - apcCode = "", + apcCode = "yn", }); -Response response = await client.VerifyWithCodeAsync("", content); +Response response = await client.VerifyWithCodeAsync("zdgrzzaxlodrvewbksn", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("verificationResult").ToString()); @@ -216,30 +127,15 @@ Console.WriteLine(result.GetProperty("verificationResult").ToString()); This sample shows how to call VerifyWithCode and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview"); - -using RequestContent content = RequestContent.Create(new -{ - apcCode = "", -}); -Response response = client.VerifyWithCode("", content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("verificationResult").ToString()); -]]> -This sample shows how to call VerifyWithCode with all parameters and request content and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview"); using RequestContent content = RequestContent.Create(new { - apcCode = "", + apcCode = "yn", }); -Response response = client.VerifyWithCode("", content); +Response response = client.VerifyWithCode("zdgrzzaxlodrvewbksn", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("verificationResult").ToString()); diff --git a/sdk/communication/Azure.Communication.ProgrammableConnectivity/src/Generated/Docs/SimSwap.xml b/sdk/communication/Azure.Communication.ProgrammableConnectivity/src/Generated/Docs/SimSwap.xml index 83bbc5ad2cc1..d15632cebe83 100644 --- a/sdk/communication/Azure.Communication.ProgrammableConnectivity/src/Generated/Docs/SimSwap.xml +++ b/sdk/communication/Azure.Communication.ProgrammableConnectivity/src/Generated/Docs/SimSwap.xml @@ -5,222 +5,126 @@ This sample shows how to call RetrieveAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "2024-02-09-preview"); -SimSwapRetrievalContent body = new SimSwapRetrievalContent(new NetworkIdentifier("", "")); -Response response = await client.RetrieveAsync("", body); -]]> -This sample shows how to call RetrieveAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "2024-02-09-preview"); - -SimSwapRetrievalContent body = new SimSwapRetrievalContent(new NetworkIdentifier("", "")) +SimSwapRetrievalContent body = new SimSwapRetrievalContent(new NetworkIdentifier("IPv6", "2001:0db8:85a3:0000:0000:8a2e:0370:7334")) { - PhoneNumber = "", + PhoneNumber = "+61215310263792", }; -Response response = await client.RetrieveAsync("", body); +Response response = await client.RetrieveAsync("zdgrzzaxlodrvewbksn", body); ]]> This sample shows how to call Retrieve. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "2024-02-09-preview"); -SimSwapRetrievalContent body = new SimSwapRetrievalContent(new NetworkIdentifier("", "")); -Response response = client.Retrieve("", body); -]]> -This sample shows how to call Retrieve with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "2024-02-09-preview"); - -SimSwapRetrievalContent body = new SimSwapRetrievalContent(new NetworkIdentifier("", "")) +SimSwapRetrievalContent body = new SimSwapRetrievalContent(new NetworkIdentifier("IPv6", "2001:0db8:85a3:0000:0000:8a2e:0370:7334")) { - PhoneNumber = "", + PhoneNumber = "+61215310263792", }; -Response response = client.Retrieve("", body); +Response response = client.Retrieve("zdgrzzaxlodrvewbksn", body); ]]> This sample shows how to call RetrieveAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "2024-02-09-preview"); using RequestContent content = RequestContent.Create(new { + phoneNumber = "+61215310263792", networkIdentifier = new { - identifierType = "", - identifier = "", + identifierType = "IPv6", + identifier = "2001:0db8:85a3:0000:0000:8a2e:0370:7334", }, }); -Response response = await client.RetrieveAsync("", content); +Response response = await client.RetrieveAsync("zdgrzzaxlodrvewbksn", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call RetrieveAsync with all parameters and request content and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "2024-02-09-preview"); - -using RequestContent content = RequestContent.Create(new -{ - phoneNumber = "", - networkIdentifier = new - { - identifierType = "", - identifier = "", - }, -}); -Response response = await client.RetrieveAsync("", content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("date").ToString()); ]]> This sample shows how to call Retrieve and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "2024-02-09-preview"); using RequestContent content = RequestContent.Create(new { + phoneNumber = "+61215310263792", networkIdentifier = new { - identifierType = "", - identifier = "", + identifierType = "IPv6", + identifier = "2001:0db8:85a3:0000:0000:8a2e:0370:7334", }, }); -Response response = client.Retrieve("", content); +Response response = client.Retrieve("zdgrzzaxlodrvewbksn", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call Retrieve with all parameters and request content and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "2024-02-09-preview"); - -using RequestContent content = RequestContent.Create(new -{ - phoneNumber = "", - networkIdentifier = new - { - identifierType = "", - identifier = "", - }, -}); -Response response = client.Retrieve("", content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("date").ToString()); ]]> This sample shows how to call VerifyAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "2024-02-09-preview"); - -SimSwapVerificationContent body = new SimSwapVerificationContent(new NetworkIdentifier("", "")); -Response response = await client.VerifyAsync("", body); -]]> -This sample shows how to call VerifyAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "2024-02-09-preview"); -SimSwapVerificationContent body = new SimSwapVerificationContent(new NetworkIdentifier("", "")) +SimSwapVerificationContent body = new SimSwapVerificationContent(new NetworkIdentifier("ipv4", "12.12.12.12")) { - PhoneNumber = "", - MaxAgeHours = 1234, + MaxAgeHours = 941, }; -Response response = await client.VerifyAsync("", body); +Response response = await client.VerifyAsync("zdgrzzaxlodrvewbksn", body); ]]> This sample shows how to call Verify. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "2024-02-09-preview"); -SimSwapVerificationContent body = new SimSwapVerificationContent(new NetworkIdentifier("", "")); -Response response = client.Verify("", body); -]]> -This sample shows how to call Verify with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "2024-02-09-preview"); - -SimSwapVerificationContent body = new SimSwapVerificationContent(new NetworkIdentifier("", "")) +SimSwapVerificationContent body = new SimSwapVerificationContent(new NetworkIdentifier("ipv4", "12.12.12.12")) { - PhoneNumber = "", - MaxAgeHours = 1234, + MaxAgeHours = 941, }; -Response response = client.Verify("", body); +Response response = client.Verify("zdgrzzaxlodrvewbksn", body); ]]> This sample shows how to call VerifyAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "2024-02-09-preview"); using RequestContent content = RequestContent.Create(new { + maxAgeHours = 941, networkIdentifier = new { - identifierType = "", - identifier = "", + identifierType = "ipv4", + identifier = "12.12.12.12", }, }); -Response response = await client.VerifyAsync("", content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("verificationResult").ToString()); -]]> -This sample shows how to call VerifyAsync with all parameters and request content and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "2024-02-09-preview"); - -using RequestContent content = RequestContent.Create(new -{ - phoneNumber = "", - maxAgeHours = 1234, - networkIdentifier = new - { - identifierType = "", - identifier = "", - }, -}); -Response response = await client.VerifyAsync("", content); +Response response = await client.VerifyAsync("zdgrzzaxlodrvewbksn", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("verificationResult").ToString()); @@ -230,40 +134,20 @@ Console.WriteLine(result.GetProperty("verificationResult").ToString()); This sample shows how to call Verify and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "2024-02-09-preview"); - -using RequestContent content = RequestContent.Create(new -{ - networkIdentifier = new - { - identifierType = "", - identifier = "", - }, -}); -Response response = client.Verify("", content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("verificationResult").ToString()); -]]> -This sample shows how to call Verify with all parameters and request content and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "2024-02-09-preview"); using RequestContent content = RequestContent.Create(new { - phoneNumber = "", - maxAgeHours = 1234, + maxAgeHours = 941, networkIdentifier = new { - identifierType = "", - identifier = "", + identifierType = "ipv4", + identifier = "12.12.12.12", }, }); -Response response = client.Verify("", content); +Response response = client.Verify("zdgrzzaxlodrvewbksn", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("verificationResult").ToString()); diff --git a/sdk/communication/Azure.Communication.ProgrammableConnectivity/tests/Generated/Samples/Samples_DeviceLocation.cs b/sdk/communication/Azure.Communication.ProgrammableConnectivity/tests/Generated/Samples/Samples_DeviceLocation.cs index 36d8d907213a..10b718cdbb22 100644 --- a/sdk/communication/Azure.Communication.ProgrammableConnectivity/tests/Generated/Samples/Samples_DeviceLocation.cs +++ b/sdk/communication/Azure.Communication.ProgrammableConnectivity/tests/Generated/Samples/Samples_DeviceLocation.cs @@ -18,9 +18,9 @@ public partial class Samples_DeviceLocation { [Test] [Ignore("Only validating compilation of examples")] - public void Example_DeviceLocation_Verify_ShortVersion() + public void Example_DeviceLocation_Verify_DeviceLocationVerify() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeviceLocation client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceLocationClient(apiVersion: "2024-02-09-preview"); @@ -28,105 +28,29 @@ public void Example_DeviceLocation_Verify_ShortVersion() { networkIdentifier = new { - identifierType = "", - identifier = "", + identifierType = "ipv4", + identifier = "12.12.12.12", }, - latitude = 123.45, - longitude = 123.45, - accuracy = 1234, - device = new object(), - }); - Response response = client.Verify("", content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("verificationResult").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DeviceLocation_Verify_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DeviceLocation client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceLocationClient(apiVersion: "2024-02-09-preview"); - - using RequestContent content = RequestContent.Create(new - { - networkIdentifier = new - { - identifierType = "", - identifier = "", - }, - latitude = 123.45, - longitude = 123.45, - accuracy = 1234, - device = new object(), - }); - Response response = await client.VerifyAsync("", content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("verificationResult").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DeviceLocation_Verify_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DeviceLocation client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceLocationClient(apiVersion: "2024-02-09-preview"); - - DeviceLocationVerificationContent body = new DeviceLocationVerificationContent(new NetworkIdentifier("", ""), 123.45, 123.45, 1234, new LocationDevice()); - Response response = client.Verify("", body); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DeviceLocation_Verify_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DeviceLocation client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceLocationClient(apiVersion: "2024-02-09-preview"); - - DeviceLocationVerificationContent body = new DeviceLocationVerificationContent(new NetworkIdentifier("", ""), 123.45, 123.45, 1234, new LocationDevice()); - Response response = await client.VerifyAsync("", body); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DeviceLocation_Verify_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DeviceLocation client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceLocationClient(apiVersion: "2024-02-09-preview"); - - using RequestContent content = RequestContent.Create(new - { - networkIdentifier = new - { - identifierType = "", - identifier = "", - }, - latitude = 123.45, - longitude = 123.45, - accuracy = 1234, + latitude = 70, + longitude = -161, + accuracy = 91, device = new { - networkAccessIdentifier = "", - phoneNumber = "", + networkAccessIdentifier = "122345@domain.com", + phoneNumber = "+447000000000", ipv4Address = new { - ipv4 = "", - port = 1234, + ipv4 = "12.12.12.12", + port = 2442, }, ipv6Address = new { - ipv6 = "", - port = 1234, + ipv6 = "3001:0da8:75a3:0000:0000:8a2e:0370:7334", + port = 1643, }, }, }); - Response response = client.Verify("", content); + Response response = client.Verify("zdgrzzaxlodrvewbksn", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("verificationResult").ToString()); @@ -134,9 +58,9 @@ public void Example_DeviceLocation_Verify_AllParameters() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DeviceLocation_Verify_AllParameters_Async() + public async Task Example_DeviceLocation_Verify_DeviceLocationVerify_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeviceLocation client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceLocationClient(apiVersion: "2024-02-09-preview"); @@ -144,29 +68,29 @@ public async Task Example_DeviceLocation_Verify_AllParameters_Async() { networkIdentifier = new { - identifierType = "", - identifier = "", + identifierType = "ipv4", + identifier = "12.12.12.12", }, - latitude = 123.45, - longitude = 123.45, - accuracy = 1234, + latitude = 70, + longitude = -161, + accuracy = 91, device = new { - networkAccessIdentifier = "", - phoneNumber = "", + networkAccessIdentifier = "122345@domain.com", + phoneNumber = "+447000000000", ipv4Address = new { - ipv4 = "", - port = 1234, + ipv4 = "12.12.12.12", + port = 2442, }, ipv6Address = new { - ipv6 = "", - port = 1234, + ipv6 = "3001:0da8:75a3:0000:0000:8a2e:0370:7334", + port = 1643, }, }, }); - Response response = await client.VerifyAsync("", content); + Response response = await client.VerifyAsync("zdgrzzaxlodrvewbksn", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("verificationResult").ToString()); @@ -174,38 +98,38 @@ public async Task Example_DeviceLocation_Verify_AllParameters_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_DeviceLocation_Verify_AllParameters_Convenience() + public void Example_DeviceLocation_Verify_DeviceLocationVerify_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeviceLocation client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceLocationClient(apiVersion: "2024-02-09-preview"); - DeviceLocationVerificationContent body = new DeviceLocationVerificationContent(new NetworkIdentifier("", ""), 123.45, 123.45, 1234, new LocationDevice + DeviceLocationVerificationContent body = new DeviceLocationVerificationContent(new NetworkIdentifier("ipv4", "12.12.12.12"), 70, -161, 91, new LocationDevice { - NetworkAccessIdentifier = "", - PhoneNumber = "", - Ipv4Address = new Ipv4Address("", 1234), - Ipv6Address = new Ipv6Address("", 1234), + NetworkAccessIdentifier = "122345@domain.com", + PhoneNumber = "+447000000000", + Ipv4Address = new Ipv4Address("12.12.12.12", 2442), + Ipv6Address = new Ipv6Address("3001:0da8:75a3:0000:0000:8a2e:0370:7334", 1643), }); - Response response = client.Verify("", body); + Response response = client.Verify("zdgrzzaxlodrvewbksn", body); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DeviceLocation_Verify_AllParameters_Convenience_Async() + public async Task Example_DeviceLocation_Verify_DeviceLocationVerify_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeviceLocation client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceLocationClient(apiVersion: "2024-02-09-preview"); - DeviceLocationVerificationContent body = new DeviceLocationVerificationContent(new NetworkIdentifier("", ""), 123.45, 123.45, 1234, new LocationDevice + DeviceLocationVerificationContent body = new DeviceLocationVerificationContent(new NetworkIdentifier("ipv4", "12.12.12.12"), 70, -161, 91, new LocationDevice { - NetworkAccessIdentifier = "", - PhoneNumber = "", - Ipv4Address = new Ipv4Address("", 1234), - Ipv6Address = new Ipv6Address("", 1234), + NetworkAccessIdentifier = "122345@domain.com", + PhoneNumber = "+447000000000", + Ipv4Address = new Ipv4Address("12.12.12.12", 2442), + Ipv6Address = new Ipv6Address("3001:0da8:75a3:0000:0000:8a2e:0370:7334", 1643), }); - Response response = await client.VerifyAsync("", body); + Response response = await client.VerifyAsync("zdgrzzaxlodrvewbksn", body); } } } diff --git a/sdk/communication/Azure.Communication.ProgrammableConnectivity/tests/Generated/Samples/Samples_DeviceNetwork.cs b/sdk/communication/Azure.Communication.ProgrammableConnectivity/tests/Generated/Samples/Samples_DeviceNetwork.cs index e034a64c0be7..59af5885d825 100644 --- a/sdk/communication/Azure.Communication.ProgrammableConnectivity/tests/Generated/Samples/Samples_DeviceNetwork.cs +++ b/sdk/communication/Azure.Communication.ProgrammableConnectivity/tests/Generated/Samples/Samples_DeviceNetwork.cs @@ -18,18 +18,18 @@ public partial class Samples_DeviceNetwork { [Test] [Ignore("Only validating compilation of examples")] - public void Example_DeviceNetwork_Retrieve_ShortVersion() + public void Example_DeviceNetwork_Retrieve_DeviceNetworkRetrieve() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeviceNetwork client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceNetworkClient(apiVersion: "2024-02-09-preview"); using RequestContent content = RequestContent.Create(new { - identifierType = "", - identifier = "", + identifierType = "ipv6", + identifier = "3001:0da8:75a3:0000:0000:8a2e:0370:7334", }); - Response response = client.Retrieve("", content); + Response response = client.Retrieve("zdgrzzaxlodrvewbksn", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("networkCode").ToString()); @@ -37,18 +37,18 @@ public void Example_DeviceNetwork_Retrieve_ShortVersion() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DeviceNetwork_Retrieve_ShortVersion_Async() + public async Task Example_DeviceNetwork_Retrieve_DeviceNetworkRetrieve_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeviceNetwork client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceNetworkClient(apiVersion: "2024-02-09-preview"); using RequestContent content = RequestContent.Create(new { - identifierType = "", - identifier = "", + identifierType = "ipv6", + identifier = "3001:0da8:75a3:0000:0000:8a2e:0370:7334", }); - Response response = await client.RetrieveAsync("", content); + Response response = await client.RetrieveAsync("zdgrzzaxlodrvewbksn", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("networkCode").ToString()); @@ -56,88 +56,26 @@ public async Task Example_DeviceNetwork_Retrieve_ShortVersion_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_DeviceNetwork_Retrieve_ShortVersion_Convenience() + public void Example_DeviceNetwork_Retrieve_DeviceNetworkRetrieve_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeviceNetwork client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceNetworkClient(apiVersion: "2024-02-09-preview"); - NetworkIdentifier body = new NetworkIdentifier("", ""); - Response response = client.Retrieve("", body); + NetworkIdentifier body = new NetworkIdentifier("ipv6", "3001:0da8:75a3:0000:0000:8a2e:0370:7334"); + Response response = client.Retrieve("zdgrzzaxlodrvewbksn", body); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DeviceNetwork_Retrieve_ShortVersion_Convenience_Async() + public async Task Example_DeviceNetwork_Retrieve_DeviceNetworkRetrieve_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeviceNetwork client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceNetworkClient(apiVersion: "2024-02-09-preview"); - NetworkIdentifier body = new NetworkIdentifier("", ""); - Response response = await client.RetrieveAsync("", body); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DeviceNetwork_Retrieve_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DeviceNetwork client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceNetworkClient(apiVersion: "2024-02-09-preview"); - - using RequestContent content = RequestContent.Create(new - { - identifierType = "", - identifier = "", - }); - Response response = client.Retrieve("", content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("networkCode").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DeviceNetwork_Retrieve_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DeviceNetwork client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceNetworkClient(apiVersion: "2024-02-09-preview"); - - using RequestContent content = RequestContent.Create(new - { - identifierType = "", - identifier = "", - }); - Response response = await client.RetrieveAsync("", content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("networkCode").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DeviceNetwork_Retrieve_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DeviceNetwork client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceNetworkClient(apiVersion: "2024-02-09-preview"); - - NetworkIdentifier body = new NetworkIdentifier("", ""); - Response response = client.Retrieve("", body); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DeviceNetwork_Retrieve_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DeviceNetwork client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceNetworkClient(apiVersion: "2024-02-09-preview"); - - NetworkIdentifier body = new NetworkIdentifier("", ""); - Response response = await client.RetrieveAsync("", body); + NetworkIdentifier body = new NetworkIdentifier("ipv6", "3001:0da8:75a3:0000:0000:8a2e:0370:7334"); + Response response = await client.RetrieveAsync("zdgrzzaxlodrvewbksn", body); } } } diff --git a/sdk/communication/Azure.Communication.ProgrammableConnectivity/tests/Generated/Samples/Samples_NumberVerification.cs b/sdk/communication/Azure.Communication.ProgrammableConnectivity/tests/Generated/Samples/Samples_NumberVerification.cs index 8f0abc9e94dc..2abed1066305 100644 --- a/sdk/communication/Azure.Communication.ProgrammableConnectivity/tests/Generated/Samples/Samples_NumberVerification.cs +++ b/sdk/communication/Azure.Communication.ProgrammableConnectivity/tests/Generated/Samples/Samples_NumberVerification.cs @@ -18,9 +18,9 @@ public partial class Samples_NumberVerification { [Test] [Ignore("Only validating compilation of examples")] - public void Example_NumberVerification_VerifyWithoutCode_ShortVersion() + public void Example_NumberVerification_VerifyWithoutCode_NumberVerificationVerifyWithoutCode() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview"); @@ -28,21 +28,23 @@ public void Example_NumberVerification_VerifyWithoutCode_ShortVersion() { networkIdentifier = new { - identifierType = "", - identifier = "", + identifierType = "ipv4", + identifier = "12.12.12.12", }, - redirectUri = "http://localhost:3000", + phoneNumber = "+14424318793", + hashedPhoneNumber = "bwsl", + redirectUri = "https://www.contoso.com", }); - Response response = client.VerifyWithoutCode("", content); + Response response = client.VerifyWithoutCode("zdgrzzaxlodrvewbksn", content); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_NumberVerification_VerifyWithoutCode_ShortVersion_Async() + public async Task Example_NumberVerification_VerifyWithoutCode_NumberVerificationVerifyWithoutCode_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview"); @@ -50,193 +52,63 @@ public async Task Example_NumberVerification_VerifyWithoutCode_ShortVersion_Asyn { networkIdentifier = new { - identifierType = "", - identifier = "", + identifierType = "ipv4", + identifier = "12.12.12.12", }, - redirectUri = "http://localhost:3000", + phoneNumber = "+14424318793", + hashedPhoneNumber = "bwsl", + redirectUri = "https://www.contoso.com", }); - Response response = await client.VerifyWithoutCodeAsync("", content); + Response response = await client.VerifyWithoutCodeAsync("zdgrzzaxlodrvewbksn", content); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_NumberVerification_VerifyWithoutCode_ShortVersion_Convenience() + public void Example_NumberVerification_VerifyWithoutCode_NumberVerificationVerifyWithoutCode_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview"); - NumberVerificationWithoutCodeContent body = new NumberVerificationWithoutCodeContent(new NetworkIdentifier("", ""), new Uri("http://localhost:3000")); - Response response = client.VerifyWithoutCode("", body); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_NumberVerification_VerifyWithoutCode_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview"); - - NumberVerificationWithoutCodeContent body = new NumberVerificationWithoutCodeContent(new NetworkIdentifier("", ""), new Uri("http://localhost:3000")); - Response response = await client.VerifyWithoutCodeAsync("", body); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_NumberVerification_VerifyWithoutCode_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview"); - - using RequestContent content = RequestContent.Create(new - { - networkIdentifier = new - { - identifierType = "", - identifier = "", - }, - phoneNumber = "", - hashedPhoneNumber = "", - redirectUri = "http://localhost:3000", - }); - Response response = client.VerifyWithoutCode("", content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_NumberVerification_VerifyWithoutCode_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview"); - - using RequestContent content = RequestContent.Create(new - { - networkIdentifier = new - { - identifierType = "", - identifier = "", - }, - phoneNumber = "", - hashedPhoneNumber = "", - redirectUri = "http://localhost:3000", - }); - Response response = await client.VerifyWithoutCodeAsync("", content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_NumberVerification_VerifyWithoutCode_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview"); - - NumberVerificationWithoutCodeContent body = new NumberVerificationWithoutCodeContent(new NetworkIdentifier("", ""), new Uri("http://localhost:3000")) + NumberVerificationWithoutCodeContent body = new NumberVerificationWithoutCodeContent(new NetworkIdentifier("ipv4", "12.12.12.12"), new Uri("https://www.contoso.com")) { - PhoneNumber = "", - HashedPhoneNumber = "", + PhoneNumber = "+14424318793", + HashedPhoneNumber = "bwsl", }; - Response response = client.VerifyWithoutCode("", body); + Response response = client.VerifyWithoutCode("zdgrzzaxlodrvewbksn", body); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_NumberVerification_VerifyWithoutCode_AllParameters_Convenience_Async() + public async Task Example_NumberVerification_VerifyWithoutCode_NumberVerificationVerifyWithoutCode_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview"); - NumberVerificationWithoutCodeContent body = new NumberVerificationWithoutCodeContent(new NetworkIdentifier("", ""), new Uri("http://localhost:3000")) + NumberVerificationWithoutCodeContent body = new NumberVerificationWithoutCodeContent(new NetworkIdentifier("ipv4", "12.12.12.12"), new Uri("https://www.contoso.com")) { - PhoneNumber = "", - HashedPhoneNumber = "", + PhoneNumber = "+14424318793", + HashedPhoneNumber = "bwsl", }; - Response response = await client.VerifyWithoutCodeAsync("", body); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_NumberVerification_VerifyWithCode_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview"); - - using RequestContent content = RequestContent.Create(new - { - apcCode = "", - }); - Response response = client.VerifyWithCode("", content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("verificationResult").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_NumberVerification_VerifyWithCode_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview"); - - using RequestContent content = RequestContent.Create(new - { - apcCode = "", - }); - Response response = await client.VerifyWithCodeAsync("", content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("verificationResult").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_NumberVerification_VerifyWithCode_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview"); - - NumberVerificationWithCodeContent body = new NumberVerificationWithCodeContent(""); - Response response = client.VerifyWithCode("", body); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_NumberVerification_VerifyWithCode_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview"); - - NumberVerificationWithCodeContent body = new NumberVerificationWithCodeContent(""); - Response response = await client.VerifyWithCodeAsync("", body); + Response response = await client.VerifyWithoutCodeAsync("zdgrzzaxlodrvewbksn", body); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_NumberVerification_VerifyWithCode_AllParameters() + public void Example_NumberVerification_VerifyWithCode_NumberVerificationVerifyWithCode() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview"); using RequestContent content = RequestContent.Create(new { - apcCode = "", + apcCode = "yn", }); - Response response = client.VerifyWithCode("", content); + Response response = client.VerifyWithCode("zdgrzzaxlodrvewbksn", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("verificationResult").ToString()); @@ -244,17 +116,17 @@ public void Example_NumberVerification_VerifyWithCode_AllParameters() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_NumberVerification_VerifyWithCode_AllParameters_Async() + public async Task Example_NumberVerification_VerifyWithCode_NumberVerificationVerifyWithCode_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview"); using RequestContent content = RequestContent.Create(new { - apcCode = "", + apcCode = "yn", }); - Response response = await client.VerifyWithCodeAsync("", content); + Response response = await client.VerifyWithCodeAsync("zdgrzzaxlodrvewbksn", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("verificationResult").ToString()); @@ -262,26 +134,26 @@ public async Task Example_NumberVerification_VerifyWithCode_AllParameters_Async( [Test] [Ignore("Only validating compilation of examples")] - public void Example_NumberVerification_VerifyWithCode_AllParameters_Convenience() + public void Example_NumberVerification_VerifyWithCode_NumberVerificationVerifyWithCode_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview"); - NumberVerificationWithCodeContent body = new NumberVerificationWithCodeContent(""); - Response response = client.VerifyWithCode("", body); + NumberVerificationWithCodeContent body = new NumberVerificationWithCodeContent("yn"); + Response response = client.VerifyWithCode("zdgrzzaxlodrvewbksn", body); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_NumberVerification_VerifyWithCode_AllParameters_Convenience_Async() + public async Task Example_NumberVerification_VerifyWithCode_NumberVerificationVerifyWithCode_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview"); - NumberVerificationWithCodeContent body = new NumberVerificationWithCodeContent(""); - Response response = await client.VerifyWithCodeAsync("", body); + NumberVerificationWithCodeContent body = new NumberVerificationWithCodeContent("yn"); + Response response = await client.VerifyWithCodeAsync("zdgrzzaxlodrvewbksn", body); } } } diff --git a/sdk/communication/Azure.Communication.ProgrammableConnectivity/tests/Generated/Samples/Samples_SimSwap.cs b/sdk/communication/Azure.Communication.ProgrammableConnectivity/tests/Generated/Samples/Samples_SimSwap.cs index d43346eac1ac..c0bbc0909db9 100644 --- a/sdk/communication/Azure.Communication.ProgrammableConnectivity/tests/Generated/Samples/Samples_SimSwap.cs +++ b/sdk/communication/Azure.Communication.ProgrammableConnectivity/tests/Generated/Samples/Samples_SimSwap.cs @@ -18,21 +18,22 @@ public partial class Samples_SimSwap { [Test] [Ignore("Only validating compilation of examples")] - public void Example_SimSwap_Retrieve_ShortVersion() + public void Example_SimSwap_Retrieve_SimSwapRetrieve() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "2024-02-09-preview"); using RequestContent content = RequestContent.Create(new { + phoneNumber = "+61215310263792", networkIdentifier = new { - identifierType = "", - identifier = "", + identifierType = "IPv6", + identifier = "2001:0db8:85a3:0000:0000:8a2e:0370:7334", }, }); - Response response = client.Retrieve("", content); + Response response = client.Retrieve("zdgrzzaxlodrvewbksn", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -40,21 +41,22 @@ public void Example_SimSwap_Retrieve_ShortVersion() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_SimSwap_Retrieve_ShortVersion_Async() + public async Task Example_SimSwap_Retrieve_SimSwapRetrieve_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "2024-02-09-preview"); using RequestContent content = RequestContent.Create(new { + phoneNumber = "+61215310263792", networkIdentifier = new { - identifierType = "", - identifier = "", + identifierType = "IPv6", + identifier = "2001:0db8:85a3:0000:0000:8a2e:0370:7334", }, }); - Response response = await client.RetrieveAsync("", content); + Response response = await client.RetrieveAsync("zdgrzzaxlodrvewbksn", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -62,191 +64,52 @@ public async Task Example_SimSwap_Retrieve_ShortVersion_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_SimSwap_Retrieve_ShortVersion_Convenience() + public void Example_SimSwap_Retrieve_SimSwapRetrieve_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "2024-02-09-preview"); - SimSwapRetrievalContent body = new SimSwapRetrievalContent(new NetworkIdentifier("", "")); - Response response = client.Retrieve("", body); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_SimSwap_Retrieve_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "2024-02-09-preview"); - - SimSwapRetrievalContent body = new SimSwapRetrievalContent(new NetworkIdentifier("", "")); - Response response = await client.RetrieveAsync("", body); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_SimSwap_Retrieve_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "2024-02-09-preview"); - - using RequestContent content = RequestContent.Create(new + SimSwapRetrievalContent body = new SimSwapRetrievalContent(new NetworkIdentifier("IPv6", "2001:0db8:85a3:0000:0000:8a2e:0370:7334")) { - phoneNumber = "", - networkIdentifier = new - { - identifierType = "", - identifier = "", - }, - }); - Response response = client.Retrieve("", content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("date").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_SimSwap_Retrieve_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "2024-02-09-preview"); - - using RequestContent content = RequestContent.Create(new - { - phoneNumber = "", - networkIdentifier = new - { - identifierType = "", - identifier = "", - }, - }); - Response response = await client.RetrieveAsync("", content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("date").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_SimSwap_Retrieve_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "2024-02-09-preview"); - - SimSwapRetrievalContent body = new SimSwapRetrievalContent(new NetworkIdentifier("", "")) - { - PhoneNumber = "", + PhoneNumber = "+61215310263792", }; - Response response = client.Retrieve("", body); + Response response = client.Retrieve("zdgrzzaxlodrvewbksn", body); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_SimSwap_Retrieve_AllParameters_Convenience_Async() + public async Task Example_SimSwap_Retrieve_SimSwapRetrieve_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "2024-02-09-preview"); - SimSwapRetrievalContent body = new SimSwapRetrievalContent(new NetworkIdentifier("", "")) + SimSwapRetrievalContent body = new SimSwapRetrievalContent(new NetworkIdentifier("IPv6", "2001:0db8:85a3:0000:0000:8a2e:0370:7334")) { - PhoneNumber = "", + PhoneNumber = "+61215310263792", }; - Response response = await client.RetrieveAsync("", body); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_SimSwap_Verify_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "2024-02-09-preview"); - - using RequestContent content = RequestContent.Create(new - { - networkIdentifier = new - { - identifierType = "", - identifier = "", - }, - }); - Response response = client.Verify("", content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("verificationResult").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_SimSwap_Verify_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "2024-02-09-preview"); - - using RequestContent content = RequestContent.Create(new - { - networkIdentifier = new - { - identifierType = "", - identifier = "", - }, - }); - Response response = await client.VerifyAsync("", content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("verificationResult").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_SimSwap_Verify_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "2024-02-09-preview"); - - SimSwapVerificationContent body = new SimSwapVerificationContent(new NetworkIdentifier("", "")); - Response response = client.Verify("", body); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_SimSwap_Verify_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "2024-02-09-preview"); - - SimSwapVerificationContent body = new SimSwapVerificationContent(new NetworkIdentifier("", "")); - Response response = await client.VerifyAsync("", body); + Response response = await client.RetrieveAsync("zdgrzzaxlodrvewbksn", body); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_SimSwap_Verify_AllParameters() + public void Example_SimSwap_Verify_SimSwapVerify() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "2024-02-09-preview"); using RequestContent content = RequestContent.Create(new { - phoneNumber = "", - maxAgeHours = 1234, + maxAgeHours = 941, networkIdentifier = new { - identifierType = "", - identifier = "", + identifierType = "ipv4", + identifier = "12.12.12.12", }, }); - Response response = client.Verify("", content); + Response response = client.Verify("zdgrzzaxlodrvewbksn", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("verificationResult").ToString()); @@ -254,23 +117,22 @@ public void Example_SimSwap_Verify_AllParameters() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_SimSwap_Verify_AllParameters_Async() + public async Task Example_SimSwap_Verify_SimSwapVerify_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "2024-02-09-preview"); using RequestContent content = RequestContent.Create(new { - phoneNumber = "", - maxAgeHours = 1234, + maxAgeHours = 941, networkIdentifier = new { - identifierType = "", - identifier = "", + identifierType = "ipv4", + identifier = "12.12.12.12", }, }); - Response response = await client.VerifyAsync("", content); + Response response = await client.VerifyAsync("zdgrzzaxlodrvewbksn", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("verificationResult").ToString()); @@ -278,34 +140,32 @@ public async Task Example_SimSwap_Verify_AllParameters_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_SimSwap_Verify_AllParameters_Convenience() + public void Example_SimSwap_Verify_SimSwapVerify_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "2024-02-09-preview"); - SimSwapVerificationContent body = new SimSwapVerificationContent(new NetworkIdentifier("", "")) + SimSwapVerificationContent body = new SimSwapVerificationContent(new NetworkIdentifier("ipv4", "12.12.12.12")) { - PhoneNumber = "", - MaxAgeHours = 1234, + MaxAgeHours = 941, }; - Response response = client.Verify("", body); + Response response = client.Verify("zdgrzzaxlodrvewbksn", body); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_SimSwap_Verify_AllParameters_Convenience_Async() + public async Task Example_SimSwap_Verify_SimSwapVerify_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "2024-02-09-preview"); - SimSwapVerificationContent body = new SimSwapVerificationContent(new NetworkIdentifier("", "")) + SimSwapVerificationContent body = new SimSwapVerificationContent(new NetworkIdentifier("ipv4", "12.12.12.12")) { - PhoneNumber = "", - MaxAgeHours = 1234, + MaxAgeHours = 941, }; - Response response = await client.VerifyAsync("", body); + Response response = await client.VerifyAsync("zdgrzzaxlodrvewbksn", body); } } } diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/samples/Generated/Samples/Sample_ComputeFleetCollection.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/samples/Generated/Samples/Sample_ComputeFleetCollection.cs index 4ca6c0427871..7eaf94193aa7 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/samples/Generated/Samples/Sample_ComputeFleetCollection.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/samples/Generated/Samples/Sample_ComputeFleetCollection.cs @@ -9,19 +9,22 @@ using System.Threading.Tasks; using Azure.Core; using Azure.Identity; +using Azure.ResourceManager.ComputeFleet.Models; +using Azure.ResourceManager.Models; using Azure.ResourceManager.Resources; +using Azure.ResourceManager.Resources.Models; namespace Azure.ResourceManager.ComputeFleet.Samples { public partial class Sample_ComputeFleetCollection { - // Fleets_ListByResourceGroup + // Fleets_Get [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetAll_FleetsListByResourceGroup() + public async Task Get_FleetsGet() { - // Generated from example definition: specification/azurefleet/resource-manager/Microsoft.AzureFleet/preview/2024-05-01-preview/examples/Fleets_ListByResourceGroup.json - // this example is just showing the usage of "Fleets_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-05-01-preview/Fleets_Get.json + // this example is just showing the usage of "Fleets_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -38,26 +41,96 @@ public async Task GetAll_FleetsListByResourceGroup() // get the collection of this ComputeFleetResource ComputeFleetCollection collection = resourceGroupResource.GetComputeFleets(); - // invoke the operation and iterate over the result - await foreach (ComputeFleetResource item in collection.GetAllAsync()) + // invoke the operation + string fleetName = "testFleet"; + ComputeFleetResource result = await collection.GetAsync(fleetName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ComputeFleetData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Fleets_Get + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_FleetsGet() + { + // Generated from example definition: 2024-05-01-preview/Fleets_Get.json + // this example is just showing the usage of "Fleets_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "1DC2F28C-A625-4B0E-9748-9885A3C9E9EB"; + string resourceGroupName = "rgazurefleet"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ComputeFleetResource + ComputeFleetCollection collection = resourceGroupResource.GetComputeFleets(); + + // invoke the operation + string fleetName = "testFleet"; + bool result = await collection.ExistsAsync(fleetName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Fleets_Get + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_FleetsGet() + { + // Generated from example definition: 2024-05-01-preview/Fleets_Get.json + // this example is just showing the usage of "Fleets_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "1DC2F28C-A625-4B0E-9748-9885A3C9E9EB"; + string resourceGroupName = "rgazurefleet"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ComputeFleetResource + ComputeFleetCollection collection = resourceGroupResource.GetComputeFleets(); + + // invoke the operation + string fleetName = "testFleet"; + NullableResponse response = await collection.GetIfExistsAsync(fleetName); + ComputeFleetResource result = response.HasValue ? response.Value : null; + + if (result == null) { - // the variable item is a resource, you could call other operations on this instance as well + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - ComputeFleetData resourceData = item.Data; + ComputeFleetData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } - - Console.WriteLine($"Succeeded"); } - // Fleets_Get + // Fleets_CreateOrUpdate [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_FleetsGet() + public async Task CreateOrUpdate_FleetsCreateOrUpdate() { - // Generated from example definition: specification/azurefleet/resource-manager/Microsoft.AzureFleet/preview/2024-05-01-preview/examples/Fleets_Get.json - // this example is just showing the usage of "Fleets_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-05-01-preview/Fleets_CreateOrUpdate.json + // this example is just showing the usage of "Fleets_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -76,7 +149,402 @@ public async Task Get_FleetsGet() // invoke the operation string fleetName = "testFleet"; - ComputeFleetResource result = await collection.GetAsync(fleetName); + ComputeFleetData data = new ComputeFleetData(new AzureLocation("westus")) + { + Properties = new ComputeFleetProperties(new ComputeFleetVmSizeProfile[] + { +new ComputeFleetVmSizeProfile("Standard_d1_v2") +{ +Rank = 19225, +} + }, new ComputeFleetComputeProfile(new ComputeFleetVmProfile() + { + OSProfile = new ComputeFleetVmssOSProfile() + { + ComputerNamePrefix = "o", + AdminUsername = "nrgzqciiaaxjrqldbmjbqkyhntp", + AdminPassword = "adfbrdxpv", + CustomData = "xjjib", + WindowsConfiguration = new ComputeFleetWindowsConfiguration() + { + IsVmAgentProvisioned = true, + IsAutomaticUpdatesEnabled = true, + TimeZone = "hlyjiqcfksgrpjrct", + AdditionalUnattendContent = + { +new WindowsSetupAdditionalInformation() +{ +PassName = WindowsSetupAdditionalInformationPassName.OobeSystem, +ComponentName = WindowsSetupAdditionalInformationComponentName.MicrosoftWindowsShellSetup, +SettingName = AdditionalInformationSettingName.AutoLogon, +Content = "bubmqbxjkj", +} + }, + PatchSettings = new ComputeFleetVmGuestPatchSettings() + { + PatchMode = ComputeFleetWindowsVmGuestPatchMode.Manual, + IsHotPatchingEnabled = true, + AssessmentMode = ComputeFleetWindowsPatchAssessmentMode.ImageDefault, + AutomaticByPlatformSettings = new ComputeFleetWindowsVmGuestPatchAutomaticByPlatformSettings() + { + RebootSetting = ComputeFleetWindowsVmGuestPatchAutomaticByPlatformRebootSetting.Unknown, + IsBypassPlatformSafetyChecksOnUserScheduleEnabled = true, + }, + }, + WinRMListeners = + { +new ComputeFleetWinRMListener() +{ +Protocol = ComputeFleetProtocolType.Https, +CertificateUri = new Uri("https://myVaultName.vault.azure.net/secrets/myCertName"), +} + }, + IsVmAgentPlatformUpdatesEnabled = true, + }, + LinuxConfiguration = new ComputeFleetLinuxConfiguration() + { + IsPasswordAuthenticationDisabled = true, + SshPublicKeys = + { +new ComputeFleetSshPublicKey() +{ +Path = "kmqz", +KeyData = "kivgsubusvpprwqaqpjcmhsv", +} + }, + IsVmAgentProvisioned = true, + PatchSettings = new ComputeFleetLinuxPatchSettings() + { + PatchMode = ComputeFleetLinuxVmGuestPatchMode.ImageDefault, + AssessmentMode = ComputeFleetLinuxPatchAssessmentMode.ImageDefault, + AutomaticByPlatformSettings = new ComputeFleetLinuxVmGuestPatchAutomaticByPlatformSettings() + { + RebootSetting = ComputeFleetLinuxVmGuestPatchAutomaticByPlatformRebootSetting.Unknown, + IsBypassPlatformSafetyChecksOnUserScheduleEnabled = true, + }, + }, + IsVmAgentPlatformUpdatesEnabled = true, + }, + Secrets = + { +new ComputeFleetVaultSecretGroup() +{ +SourceVaultId = new ResourceIdentifier("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}"), +VaultCertificates = +{ +new ComputeFleetVaultCertificate() +{ +CertificateUri = new Uri("https://myVaultName.vault.azure.net/secrets/myCertName"), +CertificateStore = "nlxrwavpzhueffxsshlun", +} +}, +} + }, + AreExtensionOperationsAllowed = true, + IsGuestProvisionSignalRequired = true, + }, + StorageProfile = new ComputeFleetVmssStorageProfile() + { + ImageReference = new ComputeFleetImageReference() + { + Id = new ResourceIdentifier("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}/versions/{versionName}"), + Publisher = "mqxgwbiyjzmxavhbkd", + Offer = "isxgumkarlkomp", + Sku = "eojmppqcrnpmxirtp", + Version = "wvpcqefgtmqdgltiuz", + SharedGalleryImageId = "kmkgihoxwlawuuhcinfirktdwkmx", + CommunityGalleryImageId = "vlqe", + }, + OSDisk = new ComputeFleetVmssOSDisk(ComputeFleetDiskCreateOptionType.FromImage) + { + Name = "wfttw", + Caching = ComputeFleetCachingType.None, + IsWriteAcceleratorEnabled = true, + DiffDiskSettings = new ComputeFleetDiffDiskSettings() + { + Option = ComputeFleetDiffDiskOption.Local, + Placement = ComputeFleetDiffDiskPlacement.CacheDisk, + }, + DiskSizeGB = 14, + OSType = ComputeFleetOperatingSystemType.Windows, + ImageUri = new Uri("https://myStorageAccountName.blob.core.windows.net/myContainerName/myVhdName.vhd"), + VhdContainers = + { +"tkzcwddtinkfpnfklatw" + }, + ManagedDisk = new ComputeFleetVmssManagedDisk() + { + StorageAccountType = ComputeFleetStorageAccountType.StandardLrs, + DiskEncryptionSetId = new ResourceIdentifier("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}"), + SecurityProfile = new ComputeFleetVmDiskSecurityProfile() + { + SecurityEncryptionType = ComputeFleetSecurityEncryptionType.VmGuestStateOnly, + DiskEncryptionSetId = new ResourceIdentifier("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}"), + }, + }, + DeleteOption = ComputeFleetDiskDeleteOptionType.Delete, + }, + DataDisks = + { +new ComputeFleetVmssDataDisk(14,ComputeFleetDiskCreateOptionType.FromImage) +{ +Name = "eogiykmdmeikswxmigjws", +Caching = ComputeFleetCachingType.None, +IsWriteAcceleratorEnabled = true, +DiskSizeGB = 6, +ManagedDisk = new ComputeFleetVmssManagedDisk() +{ +StorageAccountType = ComputeFleetStorageAccountType.StandardLrs, +DiskEncryptionSetId = new ResourceIdentifier("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}"), +SecurityProfile = new ComputeFleetVmDiskSecurityProfile() +{ +SecurityEncryptionType = ComputeFleetSecurityEncryptionType.VmGuestStateOnly, +DiskEncryptionSetId = new ResourceIdentifier("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}"), +}, +}, +DiskIopsReadWrite = 27, +DiskMbpsReadWrite = 2, +DeleteOption = ComputeFleetDiskDeleteOptionType.Delete, +} + }, + }, + NetworkProfile = new ComputeFleetVmssNetworkProfile() + { + HealthProbeId = new ResourceIdentifier("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}"), + NetworkInterfaceConfigurations = + { +new ComputeFleetVmssNetworkConfiguration("i") +{ +Properties = new ComputeFleetVmssNetworkConfigurationProperties(new ComputeFleetVmssIPConfiguration[] +{ +new ComputeFleetVmssIPConfiguration("oezqhkidfhyywlfzwuotilrpbqnjg") +{ +Properties = new ComputeFleetVmssIPConfigurationProperties() +{ +SubnetId = new ResourceIdentifier("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}"), +IsPrimary = true, +PublicIPAddressConfiguration = new ComputeFleetVmssPublicIPAddressConfiguration("fvpqf") +{ +Properties = new ComputeFleetVmssPublicIPAddressConfigurationProperties() +{ +IdleTimeoutInMinutes = 9, +DnsSettings = new ComputeFleetVmssPublicIPAddressDnsSettings("ukrddzvmorpmfsczjwtbvp") +{ +DomainNameLabelScope = ComputeFleetDomainNameLabelScopeType.TenantReuse, +}, +IPTags = +{ +new ComputeFleetVmssIPTag() +{ +IPTagType = "sddgsoemnzgqizale", +Tag = "wufmhrjsakbiaetyara", +} +}, +PublicIPPrefixId = new ResourceIdentifier("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}"), +PublicIPAddressVersion = ComputeFleetIPVersion.IPv4, +DeleteOption = ComputeFleetVmDeleteOption.Delete, +}, +Sku = new ComputeFleetPublicIPAddressSku() +{ +Name = ComputeFleetPublicIPAddressSkuName.Basic, +Tier = ComputeFleetPublicIPAddressSkuTier.Regional, +}, +}, +PrivateIPAddressVersion = ComputeFleetIPVersion.IPv4, +ApplicationGatewayBackendAddressPools = +{ +new WritableSubResource() +{ +Id = new ResourceIdentifier("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendAddressPools/{backendAddressPoolName}"), +} +}, +ApplicationSecurityGroups = +{ +new WritableSubResource() +{ +Id = new ResourceIdentifier("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}"), +} +}, +LoadBalancerBackendAddressPools = +{ +new WritableSubResource() +{ +Id = new ResourceIdentifier("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}"), +} +}, +LoadBalancerInboundNatPools = +{ +new WritableSubResource() +{ +Id = new ResourceIdentifier("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatPools/{inboundNatPoolName}"), +} +}, +}, +} +}) +{ +IsPrimary = true, +IsAcceleratedNetworkingEnabled = true, +IsTcpStateTrackingDisabled = true, +IsFpgaEnabled = true, +NetworkSecurityGroupId = new ResourceIdentifier("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}"), +DnsServers = +{ +"nxmmfolhclsesu" +}, +IsIPForwardingEnabled = true, +DeleteOption = ComputeFleetVmDeleteOption.Delete, +AuxiliaryMode = ComputeFleetNetworkInterfaceAuxiliaryMode.None, +AuxiliarySku = ComputeFleetNetworkInterfaceAuxiliarySku.None, +}, +} + }, + NetworkApiVersion = ComputeFleetNetworkApiVersion.V20201101, + }, + SecurityProfile = new ComputeFleetSecurityProfile() + { + UefiSettings = new ComputeFleetUefiSettings() + { + IsSecureBootEnabled = true, + IsVTpmEnabled = true, + }, + IsEncryptionAtHostEnabled = true, + SecurityType = ComputeFleetSecurityType.TrustedLaunch, + UserAssignedIdentityResourceId = new ResourceIdentifier("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{userAssignedIdentityName}"), + ProxyAgentSettings = new ComputeFleetProxyAgentSettings() + { + IsEnabled = true, + Mode = ProxyAgentExecuteMode.Audit, + KeyIncarnationId = 20, + }, + }, + BootDiagnostics = new ComputeFleetBootDiagnostics() + { + IsEnabled = true, + StorageUri = new Uri("http://myStorageAccountName.blob.core.windows.net"), + }, + ExtensionProfile = new ComputeFleetVmssExtensionProfile() + { + Extensions = + { +new ComputeFleetVmssExtension() +{ +Name = "bndxuxx", +Properties = new ComputeFleetVmssExtensionProperties() +{ +ForceUpdateTag = "yhgxw", +Publisher = "kpxtirxjfprhs", +ExtensionType = "pgjilctjjwaa", +TypeHandlerVersion = "zevivcoilxmbwlrihhhibq", +ShouldAutoUpgradeMinorVersion = true, +IsAutomaticUpgradeEnabled = true, +Settings = +{ +}, +ProtectedSettings = +{ +}, +ProvisionAfterExtensions = +{ +"nftzosroolbcwmpupujzqwqe" +}, +IsSuppressFailuresEnabled = true, +ProtectedSettingsFromKeyVault = new ComputeFleetKeyVaultSecretReference(new Uri("https://myvaultName.vault.azure.net/secrets/secret/mySecretName"),new WritableSubResource() +{ +Id = new ResourceIdentifier("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}"), +}), +}, +} + }, + ExtensionsTimeBudget = "mbhjahtdygwgyszdwjtvlvtgchdwil", + }, + LicenseType = "v", + ScheduledEventsProfile = new ComputeFleetScheduledEventsProfile() + { + TerminateNotificationProfile = new ComputeFleetTerminateNotificationProfile() + { + NotBeforeTimeout = "iljppmmw", + IsEnabled = true, + }, + OSImageNotificationProfile = new ComputeFleetOSImageNotificationProfile() + { + NotBeforeTimeout = "olbpadmevekyczfokodtfprxti", + IsEnabled = true, + }, + }, + UserData = "s", + CapacityReservationGroupId = new ResourceIdentifier("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}"), + GalleryApplications = + { +new ComputeFleetVmGalleryApplication(new ResourceIdentifier("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{applicationName}/versions/{versionName}")) +{ +Tags = "eyrqjbib", +Order = 5, +ConfigurationReference = "ulztmiavpojpbpbddgnuuiimxcpau", +IsTreatFailureAsDeploymentFailureEnabled = true, +IsAutomaticUpgradeEnabled = true, +} + }, + HardwareVmSizeProperties = new ComputeFleetVmSizeProperties() + { + VCPUsAvailable = 16, + VCPUsPerCore = 23, + }, + ServiceArtifactReferenceId = new ResourceIdentifier("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactsName}/vmArtifactsProfiles/{vmArtifactsProfileName}"), + SecurityPostureReference = new ComputeFleetSecurityPostureReference() + { + Id = "/CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest", + ExcludeExtensions = + { +"{securityPostureVMExtensionName}" + }, + IsOverridable = true, + }, + }) + { + ComputeApiVersion = "2023-07-01", + PlatformFaultDomainCount = 1, + }) + { + SpotPriorityProfile = new SpotPriorityProfile() + { + Capacity = 20, + MinCapacity = 10, + MaxPricePerVm = (float)0.00865, + EvictionPolicy = ComputeFleetEvictionPolicy.Delete, + AllocationStrategy = SpotAllocationStrategy.PriceCapacityOptimized, + IsMaintainEnabled = true, + }, + RegularPriorityProfile = new RegularPriorityProfile() + { + Capacity = 20, + MinCapacity = 10, + AllocationStrategy = RegularPriorityAllocationStrategy.LowestPrice, + }, + }, + Zones = +{ +"zone1","zone2" +}, + Identity = new ManagedServiceIdentity("UserAssigned") + { + UserAssignedIdentities = +{ +[new ResourceIdentifier("key9851")] = new UserAssignedIdentity(), +}, + }, + Plan = new ArmPlan("jwgrcrnrtfoxn", "iozjbiqqckqm", "cgopbyvdyqikahwyxfpzwaqk") + { + PromotionCode = "naglezezplcaruqogtxnuizslqnnbr", + Version = "wa", + }, + Tags = +{ +["key3518"] = "luvrnuvsgdpbuofdskkcoqhfh", +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, fleetName, data); + ComputeFleetResource result = lro.Value; // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance @@ -85,13 +553,13 @@ public async Task Get_FleetsGet() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } - // Fleets_Get + // Fleets_CreateOrUpdate_MinimumSet [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Exists_FleetsGet() + public async Task CreateOrUpdate_FleetsCreateOrUpdateMinimumSet() { - // Generated from example definition: specification/azurefleet/resource-manager/Microsoft.AzureFleet/preview/2024-05-01-preview/examples/Fleets_Get.json - // this example is just showing the usage of "Fleets_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-05-01-preview/Fleets_CreateOrUpdate_MinimumSet.json + // this example is just showing the usage of "Fleets_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -110,18 +578,117 @@ public async Task Exists_FleetsGet() // invoke the operation string fleetName = "testFleet"; - bool result = await collection.ExistsAsync(fleetName); + ComputeFleetData data = new ComputeFleetData(new AzureLocation("eastus2euap")) + { + Properties = new ComputeFleetProperties(new ComputeFleetVmSizeProfile[] + { +new ComputeFleetVmSizeProfile("Standard_D2s_v3"),new ComputeFleetVmSizeProfile("Standard_D4s_v3"),new ComputeFleetVmSizeProfile("Standard_E2s_v3") + }, new ComputeFleetComputeProfile(new ComputeFleetVmProfile() + { + OSProfile = new ComputeFleetVmssOSProfile() + { + ComputerNamePrefix = "prefix", + AdminUsername = "azureuser", + AdminPassword = "TestPassword$0", + LinuxConfiguration = new ComputeFleetLinuxConfiguration() + { + IsPasswordAuthenticationDisabled = false, + }, + }, + StorageProfile = new ComputeFleetVmssStorageProfile() + { + ImageReference = new ComputeFleetImageReference() + { + Publisher = "canonical", + Offer = "0001-com-ubuntu-server-focal", + Sku = "20_04-lts-gen2", + Version = "latest", + }, + OSDisk = new ComputeFleetVmssOSDisk(ComputeFleetDiskCreateOptionType.FromImage) + { + Caching = ComputeFleetCachingType.ReadWrite, + OSType = ComputeFleetOperatingSystemType.Linux, + ManagedDisk = new ComputeFleetVmssManagedDisk() + { + StorageAccountType = ComputeFleetStorageAccountType.StandardLrs, + }, + }, + }, + NetworkProfile = new ComputeFleetVmssNetworkProfile() + { + NetworkInterfaceConfigurations = + { +new ComputeFleetVmssNetworkConfiguration("vmNameTest") +{ +Properties = new ComputeFleetVmssNetworkConfigurationProperties(new ComputeFleetVmssIPConfiguration[] +{ +new ComputeFleetVmssIPConfiguration("vmNameTest") +{ +Properties = new ComputeFleetVmssIPConfigurationProperties() +{ +SubnetId = new ResourceIdentifier("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}"), +IsPrimary = true, +LoadBalancerBackendAddressPools = +{ +new WritableSubResource() +{ +Id = new ResourceIdentifier("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}"), +} +}, +}, +} +}) +{ +IsPrimary = true, +IsAcceleratedNetworkingEnabled = false, +IsIPForwardingEnabled = true, +}, +} + }, + }, + }) + { + ComputeApiVersion = "2023-09-01", + PlatformFaultDomainCount = 1, + }) + { + SpotPriorityProfile = new SpotPriorityProfile() + { + Capacity = 2, + MinCapacity = 1, + EvictionPolicy = ComputeFleetEvictionPolicy.Delete, + AllocationStrategy = SpotAllocationStrategy.PriceCapacityOptimized, + IsMaintainEnabled = true, + }, + RegularPriorityProfile = new RegularPriorityProfile() + { + Capacity = 2, + MinCapacity = 1, + AllocationStrategy = RegularPriorityAllocationStrategy.LowestPrice, + }, + }, + Tags = +{ +["key"] = "fleets-test", +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, fleetName, data); + ComputeFleetResource result = lro.Value; - Console.WriteLine($"Succeeded: {result}"); + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ComputeFleetData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } - // Fleets_Get + // Fleets_ListByResourceGroup [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetIfExists_FleetsGet() + public async Task GetAll_FleetsListByResourceGroup() { - // Generated from example definition: specification/azurefleet/resource-manager/Microsoft.AzureFleet/preview/2024-05-01-preview/examples/Fleets_Get.json - // this example is just showing the usage of "Fleets_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-05-01-preview/Fleets_ListByResourceGroup.json + // this example is just showing the usage of "Fleet_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -138,23 +705,17 @@ public async Task GetIfExists_FleetsGet() // get the collection of this ComputeFleetResource ComputeFleetCollection collection = resourceGroupResource.GetComputeFleets(); - // invoke the operation - string fleetName = "testFleet"; - NullableResponse response = await collection.GetIfExistsAsync(fleetName); - ComputeFleetResource result = response.HasValue ? response.Value : null; - - if (result == null) - { - Console.WriteLine($"Succeeded with null as result"); - } - else + // invoke the operation and iterate over the result + await foreach (ComputeFleetResource item in collection.GetAllAsync()) { - // the variable result is a resource, you could call other operations on this instance as well + // the variable item is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - ComputeFleetData resourceData = result.Data; + ComputeFleetData resourceData = item.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } + + Console.WriteLine($"Succeeded"); } } } diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/samples/Generated/Samples/Sample_ComputeFleetResource.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/samples/Generated/Samples/Sample_ComputeFleetResource.cs index db5269c3aa36..5c6c9f19fdd7 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/samples/Generated/Samples/Sample_ComputeFleetResource.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/samples/Generated/Samples/Sample_ComputeFleetResource.cs @@ -10,51 +10,52 @@ using Azure.Core; using Azure.Identity; using Azure.ResourceManager.ComputeFleet.Models; +using Azure.ResourceManager.Models; using Azure.ResourceManager.Resources; +using Azure.ResourceManager.Resources.Models; namespace Azure.ResourceManager.ComputeFleet.Samples { public partial class Sample_ComputeFleetResource { - // Fleets_ListBySubscription + // Fleets_Get [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetComputeFleets_FleetsListBySubscription() + public async Task Get_FleetsGet() { - // Generated from example definition: specification/azurefleet/resource-manager/Microsoft.AzureFleet/preview/2024-05-01-preview/examples/Fleets_ListBySubscription.json - // this example is just showing the usage of "Fleets_ListBySubscription" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-05-01-preview/Fleets_Get.json + // this example is just showing the usage of "Fleets_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); // authenticate your client ArmClient client = new ArmClient(cred); - // this example assumes you already have this SubscriptionResource created on azure - // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + // this example assumes you already have this ComputeFleetResource created on azure + // for more information of creating ComputeFleetResource, please refer to the document of ComputeFleetResource string subscriptionId = "1DC2F28C-A625-4B0E-9748-9885A3C9E9EB"; - ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); - SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + string resourceGroupName = "rgazurefleet"; + string fleetName = "testFleet"; + ResourceIdentifier computeFleetResourceId = ComputeFleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); + ComputeFleetResource computeFleet = client.GetComputeFleetResource(computeFleetResourceId); - // invoke the operation and iterate over the result - await foreach (ComputeFleetResource item in subscriptionResource.GetComputeFleetsAsync()) - { - // the variable item is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - ComputeFleetData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } + // invoke the operation + ComputeFleetResource result = await computeFleet.GetAsync(); - Console.WriteLine($"Succeeded"); + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ComputeFleetData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } - // Fleets_Get + // Fleets_Update [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_FleetsGet() + public async Task Update_FleetsUpdate() { - // Generated from example definition: specification/azurefleet/resource-manager/Microsoft.AzureFleet/preview/2024-05-01-preview/examples/Fleets_Get.json - // this example is just showing the usage of "Fleets_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-05-01-preview/Fleets_Update.json + // this example is just showing the usage of "Fleets_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -70,7 +71,391 @@ public async Task Get_FleetsGet() ComputeFleetResource computeFleet = client.GetComputeFleetResource(computeFleetResourceId); // invoke the operation - ComputeFleetResource result = await computeFleet.GetAsync(); + ComputeFleetPatch patch = new ComputeFleetPatch() + { + Tags = +{ +}, + Identity = new ManagedServiceIdentity(default), + Plan = new ArmPlan("jwgrcrnrtfoxn", "iozjbiqqckqm", "cgopbyvdyqikahwyxfpzwaqk") + { + PromotionCode = "naglezezplcaruqogtxnuizslqnnbr", + Version = "wa", + }, + Properties = new ComputeFleetProperties(new ComputeFleetVmSizeProfile[] + { +new ComputeFleetVmSizeProfile("Standard_d1_v2") +{ +Rank = 19225, +} + }, new ComputeFleetComputeProfile(new ComputeFleetVmProfile() + { + OSProfile = new ComputeFleetVmssOSProfile() + { + ComputerNamePrefix = "o", + AdminUsername = "nrgzqciiaaxjrqldbmjbqkyhntp", + AdminPassword = "adfbrdxpv", + CustomData = "xjjib", + WindowsConfiguration = new ComputeFleetWindowsConfiguration() + { + IsVmAgentProvisioned = true, + IsAutomaticUpdatesEnabled = true, + TimeZone = "hlyjiqcfksgrpjrct", + AdditionalUnattendContent = + { +new WindowsSetupAdditionalInformation() +{ +PassName = WindowsSetupAdditionalInformationPassName.OobeSystem, +ComponentName = WindowsSetupAdditionalInformationComponentName.MicrosoftWindowsShellSetup, +SettingName = AdditionalInformationSettingName.AutoLogon, +Content = "bubmqbxjkj", +} + }, + PatchSettings = new ComputeFleetVmGuestPatchSettings() + { + PatchMode = ComputeFleetWindowsVmGuestPatchMode.Manual, + IsHotPatchingEnabled = true, + AssessmentMode = ComputeFleetWindowsPatchAssessmentMode.ImageDefault, + AutomaticByPlatformSettings = new ComputeFleetWindowsVmGuestPatchAutomaticByPlatformSettings() + { + RebootSetting = ComputeFleetWindowsVmGuestPatchAutomaticByPlatformRebootSetting.Unknown, + IsBypassPlatformSafetyChecksOnUserScheduleEnabled = true, + }, + }, + WinRMListeners = + { +new ComputeFleetWinRMListener() +{ +Protocol = ComputeFleetProtocolType.Http, +CertificateUri = new Uri("https://myVaultName.vault.azure.net/secrets/myCertName"), +} + }, + IsVmAgentPlatformUpdatesEnabled = true, + }, + LinuxConfiguration = new ComputeFleetLinuxConfiguration() + { + IsPasswordAuthenticationDisabled = true, + SshPublicKeys = + { +new ComputeFleetSshPublicKey() +{ +Path = "kmqz", +KeyData = "kivgsubusvpprwqaqpjcmhsv", +} + }, + IsVmAgentProvisioned = true, + PatchSettings = new ComputeFleetLinuxPatchSettings() + { + PatchMode = ComputeFleetLinuxVmGuestPatchMode.ImageDefault, + AssessmentMode = ComputeFleetLinuxPatchAssessmentMode.ImageDefault, + AutomaticByPlatformSettings = new ComputeFleetLinuxVmGuestPatchAutomaticByPlatformSettings() + { + RebootSetting = ComputeFleetLinuxVmGuestPatchAutomaticByPlatformRebootSetting.Unknown, + IsBypassPlatformSafetyChecksOnUserScheduleEnabled = true, + }, + }, + IsVmAgentPlatformUpdatesEnabled = true, + }, + Secrets = + { +new ComputeFleetVaultSecretGroup() +{ +SourceVaultId = new ResourceIdentifier("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}"), +VaultCertificates = +{ +new ComputeFleetVaultCertificate() +{ +CertificateUri = new Uri("https://myVaultName.vault.azure.net/secrets/myCertName"), +CertificateStore = "nlxrwavpzhueffxsshlun", +} +}, +} + }, + AreExtensionOperationsAllowed = true, + IsGuestProvisionSignalRequired = true, + }, + StorageProfile = new ComputeFleetVmssStorageProfile() + { + ImageReference = new ComputeFleetImageReference() + { + Id = new ResourceIdentifier("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}/versions/{versionName}"), + Publisher = "mqxgwbiyjzmxavhbkd", + Offer = "isxgumkarlkomp", + Sku = "eojmppqcrnpmxirtp", + Version = "wvpcqefgtmqdgltiuz", + SharedGalleryImageId = "kmkgihoxwlawuuhcinfirktdwkmx", + CommunityGalleryImageId = "vlqe", + }, + OSDisk = new ComputeFleetVmssOSDisk(ComputeFleetDiskCreateOptionType.FromImage) + { + Name = "wfttw", + Caching = ComputeFleetCachingType.None, + IsWriteAcceleratorEnabled = true, + DiffDiskSettings = new ComputeFleetDiffDiskSettings() + { + Option = ComputeFleetDiffDiskOption.Local, + Placement = ComputeFleetDiffDiskPlacement.CacheDisk, + }, + DiskSizeGB = 14, + OSType = ComputeFleetOperatingSystemType.Windows, + ImageUri = new Uri("https://myStorageAccountName.blob.core.windows.net/myContainerName/myVhdName.vhd"), + VhdContainers = + { +"tkzcwddtinkfpnfklatw" + }, + ManagedDisk = new ComputeFleetVmssManagedDisk() + { + StorageAccountType = ComputeFleetStorageAccountType.StandardLrs, + DiskEncryptionSetId = new ResourceIdentifier("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}"), + SecurityProfile = new ComputeFleetVmDiskSecurityProfile() + { + SecurityEncryptionType = ComputeFleetSecurityEncryptionType.VmGuestStateOnly, + DiskEncryptionSetId = new ResourceIdentifier("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}"), + }, + }, + DeleteOption = ComputeFleetDiskDeleteOptionType.Delete, + }, + DataDisks = + { +new ComputeFleetVmssDataDisk(14,ComputeFleetDiskCreateOptionType.FromImage) +{ +Name = "eogiykmdmeikswxmigjws", +Caching = ComputeFleetCachingType.None, +IsWriteAcceleratorEnabled = true, +DiskSizeGB = 6, +ManagedDisk = new ComputeFleetVmssManagedDisk() +{ +StorageAccountType = ComputeFleetStorageAccountType.StandardLrs, +DiskEncryptionSetId = new ResourceIdentifier("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}"), +SecurityProfile = new ComputeFleetVmDiskSecurityProfile() +{ +SecurityEncryptionType = ComputeFleetSecurityEncryptionType.VmGuestStateOnly, +DiskEncryptionSetId = new ResourceIdentifier("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}"), +}, +}, +DiskIopsReadWrite = 27, +DiskMbpsReadWrite = 2, +DeleteOption = ComputeFleetDiskDeleteOptionType.Delete, +} + }, + }, + NetworkProfile = new ComputeFleetVmssNetworkProfile() + { + HealthProbeId = new ResourceIdentifier("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}"), + NetworkInterfaceConfigurations = + { +new ComputeFleetVmssNetworkConfiguration("i") +{ +Properties = new ComputeFleetVmssNetworkConfigurationProperties(new ComputeFleetVmssIPConfiguration[] +{ +new ComputeFleetVmssIPConfiguration("oezqhkidfhyywlfzwuotilrpbqnjg") +{ +Properties = new ComputeFleetVmssIPConfigurationProperties() +{ +SubnetId = new ResourceIdentifier("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}"), +IsPrimary = true, +PublicIPAddressConfiguration = new ComputeFleetVmssPublicIPAddressConfiguration("fvpqf") +{ +Properties = new ComputeFleetVmssPublicIPAddressConfigurationProperties() +{ +IdleTimeoutInMinutes = 9, +DnsSettings = new ComputeFleetVmssPublicIPAddressDnsSettings("ukrddzvmorpmfsczjwtbvp") +{ +DomainNameLabelScope = ComputeFleetDomainNameLabelScopeType.TenantReuse, +}, +IPTags = +{ +new ComputeFleetVmssIPTag() +{ +IPTagType = "sddgsoemnzgqizale", +Tag = "wufmhrjsakbiaetyara", +} +}, +PublicIPPrefixId = new ResourceIdentifier("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}"), +PublicIPAddressVersion = ComputeFleetIPVersion.IPv4, +DeleteOption = ComputeFleetVmDeleteOption.Delete, +}, +Sku = new ComputeFleetPublicIPAddressSku() +{ +Name = ComputeFleetPublicIPAddressSkuName.Basic, +Tier = ComputeFleetPublicIPAddressSkuTier.Regional, +}, +}, +PrivateIPAddressVersion = ComputeFleetIPVersion.IPv4, +ApplicationGatewayBackendAddressPools = +{ +new WritableSubResource() +{ +Id = new ResourceIdentifier("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendAddressPools/{backendAddressPoolName}"), +} +}, +ApplicationSecurityGroups = +{ +new WritableSubResource() +{ +Id = new ResourceIdentifier("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}"), +} +}, +LoadBalancerBackendAddressPools = +{ +new WritableSubResource() +{ +Id = new ResourceIdentifier("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}"), +} +}, +LoadBalancerInboundNatPools = +{ +new WritableSubResource() +{ +Id = new ResourceIdentifier("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatPools/{inboundNatPoolName}"), +} +}, +}, +} +}) +{ +IsPrimary = true, +IsAcceleratedNetworkingEnabled = true, +IsTcpStateTrackingDisabled = true, +IsFpgaEnabled = true, +NetworkSecurityGroupId = new ResourceIdentifier("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}"), +DnsServers = +{ +"nxmmfolhclsesu" +}, +IsIPForwardingEnabled = true, +DeleteOption = ComputeFleetVmDeleteOption.Delete, +AuxiliaryMode = ComputeFleetNetworkInterfaceAuxiliaryMode.None, +AuxiliarySku = ComputeFleetNetworkInterfaceAuxiliarySku.None, +}, +} + }, + NetworkApiVersion = ComputeFleetNetworkApiVersion.V20201101, + }, + SecurityProfile = new ComputeFleetSecurityProfile() + { + UefiSettings = new ComputeFleetUefiSettings() + { + IsSecureBootEnabled = true, + IsVTpmEnabled = true, + }, + IsEncryptionAtHostEnabled = true, + SecurityType = ComputeFleetSecurityType.TrustedLaunch, + UserAssignedIdentityResourceId = new ResourceIdentifier("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{userAssignedIdentityName}"), + ProxyAgentSettings = new ComputeFleetProxyAgentSettings() + { + IsEnabled = true, + Mode = ProxyAgentExecuteMode.Audit, + KeyIncarnationId = 20, + }, + }, + BootDiagnostics = new ComputeFleetBootDiagnostics() + { + IsEnabled = true, + StorageUri = new Uri("http://myStorageAccountName.blob.core.windows.net"), + }, + ExtensionProfile = new ComputeFleetVmssExtensionProfile() + { + Extensions = + { +new ComputeFleetVmssExtension() +{ +Name = "bndxuxx", +Properties = new ComputeFleetVmssExtensionProperties() +{ +ForceUpdateTag = "yhgxw", +Publisher = "kpxtirxjfprhs", +ExtensionType = "pgjilctjjwaa", +TypeHandlerVersion = "zevivcoilxmbwlrihhhibq", +ShouldAutoUpgradeMinorVersion = true, +IsAutomaticUpgradeEnabled = true, +Settings = +{ +}, +ProtectedSettings = +{ +}, +ProvisionAfterExtensions = +{ +"nftzosroolbcwmpupujzqwqe" +}, +IsSuppressFailuresEnabled = true, +ProtectedSettingsFromKeyVault = new ComputeFleetKeyVaultSecretReference(new Uri("https://myVaultName.vault.azure.net/secrets/secret/mySecretName"),new WritableSubResource() +{ +Id = new ResourceIdentifier("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}"), +}), +}, +} + }, + ExtensionsTimeBudget = "mbhjahtdygwgyszdwjtvlvtgchdwil", + }, + LicenseType = "v", + ScheduledEventsProfile = new ComputeFleetScheduledEventsProfile() + { + TerminateNotificationProfile = new ComputeFleetTerminateNotificationProfile() + { + NotBeforeTimeout = "iljppmmw", + IsEnabled = true, + }, + OSImageNotificationProfile = new ComputeFleetOSImageNotificationProfile() + { + NotBeforeTimeout = "olbpadmevekyczfokodtfprxti", + IsEnabled = true, + }, + }, + UserData = "s", + CapacityReservationGroupId = new ResourceIdentifier("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}"), + GalleryApplications = + { +new ComputeFleetVmGalleryApplication(new ResourceIdentifier("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{applicationName}/versions/{versionName}")) +{ +Tags = "eyrqjbib", +Order = 5, +ConfigurationReference = "ulztmiavpojpbpbddgnuuiimxcpau", +IsTreatFailureAsDeploymentFailureEnabled = true, +IsAutomaticUpgradeEnabled = true, +} + }, + HardwareVmSizeProperties = new ComputeFleetVmSizeProperties() + { + VCPUsAvailable = 16, + VCPUsPerCore = 23, + }, + ServiceArtifactReferenceId = new ResourceIdentifier("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactsName}/vmArtifactsProfiles/{vmArtifactsProfileName}"), + SecurityPostureReference = new ComputeFleetSecurityPostureReference() + { + Id = "/CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest", + ExcludeExtensions = + { +"{securityPostureVMExtensionName}" + }, + IsOverridable = true, + }, + }) + { + ComputeApiVersion = "2023-07-01", + PlatformFaultDomainCount = 1, + }) + { + SpotPriorityProfile = new SpotPriorityProfile() + { + Capacity = 20, + MinCapacity = 10, + MaxPricePerVm = (float)0.00865, + EvictionPolicy = ComputeFleetEvictionPolicy.Delete, + AllocationStrategy = SpotAllocationStrategy.PriceCapacityOptimized, + IsMaintainEnabled = true, + }, + RegularPriorityProfile = new RegularPriorityProfile() + { + Capacity = 20, + MinCapacity = 10, + AllocationStrategy = RegularPriorityAllocationStrategy.LowestPrice, + }, + }, + }; + ArmOperation lro = await computeFleet.UpdateAsync(WaitUntil.Completed, patch); + ComputeFleetResource result = lro.Value; // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance @@ -84,7 +469,7 @@ public async Task Get_FleetsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_FleetsDelete() { - // Generated from example definition: specification/azurefleet/resource-manager/Microsoft.AzureFleet/preview/2024-05-01-preview/examples/Fleets_Delete.json + // Generated from example definition: 2024-05-01-preview/Fleets_Delete.json // this example is just showing the usage of "Fleets_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -106,13 +491,45 @@ public async Task Delete_FleetsDelete() Console.WriteLine($"Succeeded"); } + // Fleets_ListBySubscription + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetComputeFleets_FleetsListBySubscription() + { + // Generated from example definition: 2024-05-01-preview/Fleets_ListBySubscription.json + // this example is just showing the usage of "Fleet_ListBySubscription" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "1DC2F28C-A625-4B0E-9748-9885A3C9E9EB"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + await foreach (ComputeFleetResource item in subscriptionResource.GetComputeFleetsAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ComputeFleetData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + // Fleets_ListVirtualMachineScaleSets [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetVirtualMachineScaleSets_FleetsListVirtualMachineScaleSets() { - // Generated from example definition: specification/azurefleet/resource-manager/Microsoft.AzureFleet/preview/2024-05-01-preview/examples/Fleets_ListVirtualMachineScaleSets.json - // this example is just showing the usage of "Fleets_ListVirtualMachineScaleSets" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-05-01-preview/Fleets_ListVirtualMachineScaleSets.json + // this example is just showing the usage of "VirtualMachineScaleSet_ListVirtualMachineScaleSets" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); diff --git a/sdk/confidentialledger/Azure.Security.CodeTransparency/src/Generated/Docs/CodeTransparencyClient.xml b/sdk/confidentialledger/Azure.Security.CodeTransparency/src/Generated/Docs/CodeTransparencyClient.xml index 4cb4d749e830..193a8fab888f 100644 --- a/sdk/confidentialledger/Azure.Security.CodeTransparency/src/Generated/Docs/CodeTransparencyClient.xml +++ b/sdk/confidentialledger/Azure.Security.CodeTransparency/src/Generated/Docs/CodeTransparencyClient.xml @@ -5,65 +5,35 @@ This sample shows how to call GetEntryStatusAsync. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); -Response response = await client.GetEntryStatusAsync(""); -]]> -This sample shows how to call GetEntryStatusAsync with all parameters. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - -Response response = await client.GetEntryStatusAsync(""); +Response response = await client.GetEntryStatusAsync("2.123"); ]]> This sample shows how to call GetEntryStatus. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - -Response response = client.GetEntryStatus(""); -]]> -This sample shows how to call GetEntryStatus with all parameters. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); -Response response = client.GetEntryStatus(""); +Response response = client.GetEntryStatus("2.123"); ]]> This sample shows how to call GetEntryStatusAsync and parse the result. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - -Response response = await client.GetEntryStatusAsync("", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("operationId").ToString()); -Console.WriteLine(result.GetProperty("status").ToString()); -]]> -This sample shows how to call GetEntryStatusAsync with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); -Response response = await client.GetEntryStatusAsync("", null); +Response response = await client.GetEntryStatusAsync("2.123", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("entryId").ToString()); -Console.WriteLine(result.GetProperty("error").ToString()); Console.WriteLine(result.GetProperty("operationId").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); ]]> @@ -72,44 +42,22 @@ Console.WriteLine(result.GetProperty("status").ToString()); This sample shows how to call GetEntryStatus and parse the result. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); -Response response = client.GetEntryStatus("", null); +Response response = client.GetEntryStatus("2.123", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("operationId").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); -]]> -This sample shows how to call GetEntryStatus with all parameters and parse the result. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - -Response response = client.GetEntryStatus("", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("entryId").ToString()); -Console.WriteLine(result.GetProperty("error").ToString()); -Console.WriteLine(result.GetProperty("operationId").ToString()); -Console.WriteLine(result.GetProperty("status").ToString()); ]]> This sample shows how to call GetEntryStatusesAsync. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - -Response response = await client.GetEntryStatusesAsync(); -]]> -This sample shows how to call GetEntryStatusesAsync with all parameters. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); @@ -120,15 +68,7 @@ Response response = await client.GetEntryStatusesAsync(); This sample shows how to call GetEntryStatuses. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - -Response response = client.GetEntryStatuses(); -]]> -This sample shows how to call GetEntryStatuses with all parameters. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); @@ -139,7 +79,7 @@ Response response = client.GetEntryStatuses(); This sample shows how to call GetEntryStatusesAsync and parse the result. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); @@ -148,47 +88,19 @@ Response response = await client.GetEntryStatusesAsync(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("operations")[0].GetProperty("operationId").ToString()); Console.WriteLine(result.GetProperty("operations")[0].GetProperty("status").ToString()); -]]> -This sample shows how to call GetEntryStatusesAsync with all parameters and parse the result. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - -Response response = await client.GetEntryStatusesAsync(null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("operations")[0].GetProperty("entryId").ToString()); -Console.WriteLine(result.GetProperty("operations")[0].GetProperty("error").ToString()); -Console.WriteLine(result.GetProperty("operations")[0].GetProperty("operationId").ToString()); -Console.WriteLine(result.GetProperty("operations")[0].GetProperty("status").ToString()); ]]> This sample shows how to call GetEntryStatuses and parse the result. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - -Response response = client.GetEntryStatuses(null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("operations")[0].GetProperty("operationId").ToString()); -Console.WriteLine(result.GetProperty("operations")[0].GetProperty("status").ToString()); -]]> -This sample shows how to call GetEntryStatuses with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); Response response = client.GetEntryStatuses(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("operations")[0].GetProperty("entryId").ToString()); -Console.WriteLine(result.GetProperty("operations")[0].GetProperty("error").ToString()); Console.WriteLine(result.GetProperty("operations")[0].GetProperty("operationId").ToString()); Console.WriteLine(result.GetProperty("operations")[0].GetProperty("status").ToString()); ]]> @@ -197,60 +109,33 @@ Console.WriteLine(result.GetProperty("operations")[0].GetProperty("status").ToSt This sample shows how to call GetEntryAsync. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); -Response response = await client.GetEntryAsync(""); -]]> -This sample shows how to call GetEntryAsync with all parameters. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - -Response response = await client.GetEntryAsync("", embedReceipt: true); +Response response = await client.GetEntryAsync("2.131"); ]]> This sample shows how to call GetEntry. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - -Response response = client.GetEntry(""); -]]> -This sample shows how to call GetEntry with all parameters. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); -Response response = client.GetEntry("", embedReceipt: true); +Response response = client.GetEntry("2.131"); ]]> This sample shows how to call GetEntryAsync and parse the result. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); -Response response = await client.GetEntryAsync("", null, null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetEntryAsync with all parameters and parse the result. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - -Response response = await client.GetEntryAsync("", true, null); +Response response = await client.GetEntryAsync("2.131", null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -260,22 +145,11 @@ Console.WriteLine(result.ToString()); This sample shows how to call GetEntry and parse the result. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); -Response response = client.GetEntry("", null, null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetEntry with all parameters and parse the result. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - -Response response = client.GetEntry("", true, null); +Response response = client.GetEntry("2.131", null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -285,60 +159,33 @@ Console.WriteLine(result.ToString()); This sample shows how to call GetEntryReceiptAsync. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - -Response response = await client.GetEntryReceiptAsync(""); -]]> -This sample shows how to call GetEntryReceiptAsync with all parameters. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); -Response response = await client.GetEntryReceiptAsync(""); +Response response = await client.GetEntryReceiptAsync("2.131"); ]]> This sample shows how to call GetEntryReceipt. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - -Response response = client.GetEntryReceipt(""); -]]> -This sample shows how to call GetEntryReceipt with all parameters. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); -Response response = client.GetEntryReceipt(""); +Response response = client.GetEntryReceipt("2.131"); ]]> This sample shows how to call GetEntryReceiptAsync and parse the result. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); -Response response = await client.GetEntryReceiptAsync("", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetEntryReceiptAsync with all parameters and parse the result. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - -Response response = await client.GetEntryReceiptAsync("", null); +Response response = await client.GetEntryReceiptAsync("2.131", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -348,22 +195,11 @@ Console.WriteLine(result.ToString()); This sample shows how to call GetEntryReceipt and parse the result. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - -Response response = client.GetEntryReceipt("", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetEntryReceipt with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); -Response response = client.GetEntryReceipt("", null); +Response response = client.GetEntryReceipt("2.131", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -373,15 +209,7 @@ Console.WriteLine(result.ToString()); This sample shows how to call GetParametersAsync. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - -Response response = await client.GetParametersAsync(); -]]> -This sample shows how to call GetParametersAsync with all parameters. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); @@ -392,15 +220,7 @@ Response response = await client.GetParametersAsync(); This sample shows how to call GetParameters. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - -Response response = client.GetParameters(); -]]> -This sample shows how to call GetParameters with all parameters. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); @@ -411,21 +231,7 @@ Response response = client.GetParameters(); This sample shows how to call GetParametersAsync and parse the result. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - -Response response = await client.GetParametersAsync(null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("serviceCertificate").ToString()); -Console.WriteLine(result.GetProperty("serviceId").ToString()); -Console.WriteLine(result.GetProperty("signatureAlgorithm").ToString()); -Console.WriteLine(result.GetProperty("treeAlgorithm").ToString()); -]]> -This sample shows how to call GetParametersAsync with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); @@ -442,21 +248,7 @@ Console.WriteLine(result.GetProperty("treeAlgorithm").ToString()); This sample shows how to call GetParameters and parse the result. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - -Response response = client.GetParameters(null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("serviceCertificate").ToString()); -Console.WriteLine(result.GetProperty("serviceId").ToString()); -Console.WriteLine(result.GetProperty("signatureAlgorithm").ToString()); -Console.WriteLine(result.GetProperty("treeAlgorithm").ToString()); -]]> -This sample shows how to call GetParameters with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); @@ -473,15 +265,7 @@ Console.WriteLine(result.GetProperty("treeAlgorithm").ToString()); This sample shows how to call GetDidConfigAsync. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - -Response response = await client.GetDidConfigAsync(); -]]> -This sample shows how to call GetDidConfigAsync with all parameters. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); @@ -492,15 +276,7 @@ Response response = await client.GetDidConfigAsync(); This sample shows how to call GetDidConfig. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - -Response response = client.GetDidConfig(); -]]> -This sample shows how to call GetDidConfig with all parameters. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); @@ -511,22 +287,7 @@ Response response = client.GetDidConfig(); This sample shows how to call GetDidConfigAsync and parse the result. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - -Response response = await client.GetDidConfigAsync(null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("controller").ToString()); -Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("publicKeyJwk").GetProperty("kty").ToString()); -]]> -This sample shows how to call GetDidConfigAsync with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); @@ -537,30 +298,14 @@ Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("controller").ToString()); Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("publicKeyJwk").GetProperty("alg").ToString()); -Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("publicKeyJwk").GetProperty("crv").ToString()); -Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("publicKeyJwk").GetProperty("d").ToString()); -Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("publicKeyJwk").GetProperty("dp").ToString()); -Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("publicKeyJwk").GetProperty("dq").ToString()); -Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("publicKeyJwk").GetProperty("e").ToString()); -Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("publicKeyJwk").GetProperty("k").ToString()); -Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("publicKeyJwk").GetProperty("kid").ToString()); Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("publicKeyJwk").GetProperty("kty").ToString()); -Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("publicKeyJwk").GetProperty("n").ToString()); -Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("publicKeyJwk").GetProperty("p").ToString()); -Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("publicKeyJwk").GetProperty("q").ToString()); -Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("publicKeyJwk").GetProperty("qi").ToString()); -Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("publicKeyJwk").GetProperty("use").ToString()); -Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("publicKeyJwk").GetProperty("x").ToString()); -Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("publicKeyJwk").GetProperty("x5c")[0].ToString()); -Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("publicKeyJwk").GetProperty("y").ToString()); ]]> This sample shows how to call GetDidConfig and parse the result. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); @@ -572,52 +317,13 @@ Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("id").ToS Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("controller").ToString()); Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("publicKeyJwk").GetProperty("kty").ToString()); -]]> -This sample shows how to call GetDidConfig with all parameters and parse the result. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - -Response response = client.GetDidConfig(null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("controller").ToString()); -Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("publicKeyJwk").GetProperty("alg").ToString()); -Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("publicKeyJwk").GetProperty("crv").ToString()); -Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("publicKeyJwk").GetProperty("d").ToString()); -Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("publicKeyJwk").GetProperty("dp").ToString()); -Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("publicKeyJwk").GetProperty("dq").ToString()); -Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("publicKeyJwk").GetProperty("e").ToString()); -Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("publicKeyJwk").GetProperty("k").ToString()); -Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("publicKeyJwk").GetProperty("kid").ToString()); -Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("publicKeyJwk").GetProperty("kty").ToString()); -Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("publicKeyJwk").GetProperty("n").ToString()); -Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("publicKeyJwk").GetProperty("p").ToString()); -Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("publicKeyJwk").GetProperty("q").ToString()); -Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("publicKeyJwk").GetProperty("qi").ToString()); -Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("publicKeyJwk").GetProperty("use").ToString()); -Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("publicKeyJwk").GetProperty("x").ToString()); -Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("publicKeyJwk").GetProperty("x5c")[0].ToString()); -Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("publicKeyJwk").GetProperty("y").ToString()); ]]> This sample shows how to call GetCodeTransparencyConfigAsync. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - -Response response = await client.GetCodeTransparencyConfigAsync(); -]]> -This sample shows how to call GetCodeTransparencyConfigAsync with all parameters. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); @@ -628,15 +334,7 @@ Response response = await client.GetCodeTranspare This sample shows how to call GetCodeTransparencyConfig. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - -Response response = client.GetCodeTransparencyConfig(); -]]> -This sample shows how to call GetCodeTransparencyConfig with all parameters. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); @@ -647,7 +345,7 @@ Response response = client.GetCodeTransparencyCon This sample shows how to call GetCodeTransparencyConfigAsync and parse the result. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); @@ -655,28 +353,13 @@ Response response = await client.GetCodeTransparencyConfigAsync(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetCodeTransparencyConfigAsync with all parameters and parse the result. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - -Response response = await client.GetCodeTransparencyConfigAsync(null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("policy").GetProperty("accepted_algorithms")[0].ToString()); -Console.WriteLine(result.GetProperty("policy").GetProperty("accepted_did_issuers")[0].ToString()); -Console.WriteLine(result.GetProperty("authentication").GetProperty("allow_unauthenticated").ToString()); -Console.WriteLine(result.GetProperty("authentication").GetProperty("jwt").GetProperty("required_claims").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("service_identifier").ToString()); ]]> This sample shows how to call GetCodeTransparencyConfig and parse the result. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); @@ -684,36 +367,13 @@ Response response = client.GetCodeTransparencyConfig(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetCodeTransparencyConfig with all parameters and parse the result. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - -Response response = client.GetCodeTransparencyConfig(null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("policy").GetProperty("accepted_algorithms")[0].ToString()); -Console.WriteLine(result.GetProperty("policy").GetProperty("accepted_did_issuers")[0].ToString()); -Console.WriteLine(result.GetProperty("authentication").GetProperty("allow_unauthenticated").ToString()); -Console.WriteLine(result.GetProperty("authentication").GetProperty("jwt").GetProperty("required_claims").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("service_identifier").ToString()); ]]> This sample shows how to call GetCodeTransparencyVersionAsync. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - -Response response = await client.GetCodeTransparencyVersionAsync(); -]]> -This sample shows how to call GetCodeTransparencyVersionAsync with all parameters. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); @@ -724,15 +384,7 @@ Response response = await client.GetCodeTransparencyVersionAsync( This sample shows how to call GetCodeTransparencyVersion. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - -Response response = client.GetCodeTransparencyVersion(); -]]> -This sample shows how to call GetCodeTransparencyVersion with all parameters. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); @@ -743,18 +395,7 @@ Response response = client.GetCodeTransparencyVersion(); This sample shows how to call GetCodeTransparencyVersionAsync and parse the result. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - -Response response = await client.GetCodeTransparencyVersionAsync(null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("scitt_version").ToString()); -]]> -This sample shows how to call GetCodeTransparencyVersionAsync with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); @@ -768,18 +409,7 @@ Console.WriteLine(result.GetProperty("scitt_version").ToString()); This sample shows how to call GetCodeTransparencyVersion and parse the result. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - -Response response = client.GetCodeTransparencyVersion(null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("scitt_version").ToString()); -]]> -This sample shows how to call GetCodeTransparencyVersion with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); @@ -793,53 +423,33 @@ Console.WriteLine(result.GetProperty("scitt_version").ToString()); This sample shows how to call GetEntryIdsAsync. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); await foreach (string item in client.GetEntryIdsAsync()) { } -]]> -This sample shows how to call GetEntryIdsAsync with all parameters. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - -await foreach (string item in client.GetEntryIdsAsync(from: 1234L, to: 1234L)) -{ -} ]]> This sample shows how to call GetEntryIds. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); foreach (string item in client.GetEntryIds()) { } -]]> -This sample shows how to call GetEntryIds with all parameters. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - -foreach (string item in client.GetEntryIds(from: 1234L, to: 1234L)) -{ -} ]]> This sample shows how to call GetEntryIdsAsync and parse the result. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); @@ -848,25 +458,13 @@ await foreach (BinaryData item in client.GetEntryIdsAsync(null, null, null)) JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.ToString()); } -]]> -This sample shows how to call GetEntryIdsAsync with all parameters and parse the result. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - -await foreach (BinaryData item in client.GetEntryIdsAsync(1234L, 1234L, null)) -{ - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); -} ]]> This sample shows how to call GetEntryIds and parse the result. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); @@ -875,18 +473,6 @@ foreach (BinaryData item in client.GetEntryIds(null, null, null)) JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.ToString()); } -]]> -This sample shows how to call GetEntryIds with all parameters and parse the result. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - -foreach (BinaryData item in client.GetEntryIds(1234L, 1234L, null)) -{ - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); -} ]]> diff --git a/sdk/confidentialledger/Azure.Security.CodeTransparency/tests/Generated/Samples/Samples_CodeTransparencyClient.cs b/sdk/confidentialledger/Azure.Security.CodeTransparency/tests/Generated/Samples/Samples_CodeTransparencyClient.cs index baad0804dd4d..34e71d072ab7 100644 --- a/sdk/confidentialledger/Azure.Security.CodeTransparency/tests/Generated/Samples/Samples_CodeTransparencyClient.cs +++ b/sdk/confidentialledger/Azure.Security.CodeTransparency/tests/Generated/Samples/Samples_CodeTransparencyClient.cs @@ -17,13 +17,13 @@ public partial class Samples_CodeTransparencyClient { [Test] [Ignore("Only validating compilation of examples")] - public void Example_CodeTransparency_GetEntryStatus_ShortVersion() + public void Example_CodeTransparency_GetEntryStatus_GetEntryStatus() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - Response response = client.GetEntryStatus("", null); + Response response = client.GetEntryStatus("2.123", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("operationId").ToString()); @@ -32,13 +32,13 @@ public void Example_CodeTransparency_GetEntryStatus_ShortVersion() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_CodeTransparency_GetEntryStatus_ShortVersion_Async() + public async Task Example_CodeTransparency_GetEntryStatus_GetEntryStatus_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - Response response = await client.GetEntryStatusAsync("", null); + Response response = await client.GetEntryStatusAsync("2.123", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("operationId").ToString()); @@ -47,173 +47,61 @@ public async Task Example_CodeTransparency_GetEntryStatus_ShortVersion_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_CodeTransparency_GetEntryStatus_ShortVersion_Convenience() + public void Example_CodeTransparency_GetEntryStatus_GetEntryStatus_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - Response response = client.GetEntryStatus(""); + Response response = client.GetEntryStatus("2.123"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_CodeTransparency_GetEntryStatus_ShortVersion_Convenience_Async() + public async Task Example_CodeTransparency_GetEntryStatus_GetEntryStatus_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - Response response = await client.GetEntryStatusAsync(""); + Response response = await client.GetEntryStatusAsync("2.123"); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_CodeTransparency_GetEntryStatus_AllParameters() + public void Example_CodeTransparency_GetEntryStatuses_ListEntryStatuses() { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - - Response response = client.GetEntryStatus("", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("entryId").ToString()); - Console.WriteLine(result.GetProperty("error").ToString()); - Console.WriteLine(result.GetProperty("operationId").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_CodeTransparency_GetEntryStatus_AllParameters_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - - Response response = await client.GetEntryStatusAsync("", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("entryId").ToString()); - Console.WriteLine(result.GetProperty("error").ToString()); - Console.WriteLine(result.GetProperty("operationId").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_CodeTransparency_GetEntryStatus_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - - Response response = client.GetEntryStatus(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_CodeTransparency_GetEntryStatus_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - - Response response = await client.GetEntryStatusAsync(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_CodeTransparency_GetEntryStatuses_ShortVersion() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - - Response response = client.GetEntryStatuses(null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("operations")[0].GetProperty("operationId").ToString()); - Console.WriteLine(result.GetProperty("operations")[0].GetProperty("status").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_CodeTransparency_GetEntryStatuses_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - - Response response = await client.GetEntryStatusesAsync(null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("operations")[0].GetProperty("operationId").ToString()); - Console.WriteLine(result.GetProperty("operations")[0].GetProperty("status").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_CodeTransparency_GetEntryStatuses_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - - Response response = client.GetEntryStatuses(); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_CodeTransparency_GetEntryStatuses_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - - Response response = await client.GetEntryStatusesAsync(); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_CodeTransparency_GetEntryStatuses_AllParameters() - { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); Response response = client.GetEntryStatuses(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("operations")[0].GetProperty("entryId").ToString()); - Console.WriteLine(result.GetProperty("operations")[0].GetProperty("error").ToString()); Console.WriteLine(result.GetProperty("operations")[0].GetProperty("operationId").ToString()); Console.WriteLine(result.GetProperty("operations")[0].GetProperty("status").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_CodeTransparency_GetEntryStatuses_AllParameters_Async() + public async Task Example_CodeTransparency_GetEntryStatuses_ListEntryStatuses_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); Response response = await client.GetEntryStatusesAsync(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("operations")[0].GetProperty("entryId").ToString()); - Console.WriteLine(result.GetProperty("operations")[0].GetProperty("error").ToString()); Console.WriteLine(result.GetProperty("operations")[0].GetProperty("operationId").ToString()); Console.WriteLine(result.GetProperty("operations")[0].GetProperty("status").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_CodeTransparency_GetEntryStatuses_AllParameters_Convenience() + public void Example_CodeTransparency_GetEntryStatuses_ListEntryStatuses_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); @@ -222,9 +110,9 @@ public void Example_CodeTransparency_GetEntryStatuses_AllParameters_Convenience( [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_CodeTransparency_GetEntryStatuses_AllParameters_Convenience_Async() + public async Task Example_CodeTransparency_GetEntryStatuses_ListEntryStatuses_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); @@ -233,113 +121,13 @@ public async Task Example_CodeTransparency_GetEntryStatuses_AllParameters_Conven [Test] [Ignore("Only validating compilation of examples")] - public void Example_CodeTransparency_GetEntry_ShortVersion() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - - Response response = client.GetEntry("", null, null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_CodeTransparency_GetEntry_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - - Response response = await client.GetEntryAsync("", null, null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_CodeTransparency_GetEntry_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - - Response response = client.GetEntry(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_CodeTransparency_GetEntry_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - - Response response = await client.GetEntryAsync(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_CodeTransparency_GetEntry_AllParameters() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - - Response response = client.GetEntry("", true, null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_CodeTransparency_GetEntry_AllParameters_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - - Response response = await client.GetEntryAsync("", true, null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_CodeTransparency_GetEntry_AllParameters_Convenience() + public void Example_CodeTransparency_GetEntry_GetEntry() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - Response response = client.GetEntry("", embedReceipt: true); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_CodeTransparency_GetEntry_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - - Response response = await client.GetEntryAsync("", embedReceipt: true); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_CodeTransparency_GetEntryReceipt_ShortVersion() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - - Response response = client.GetEntryReceipt("", null); + Response response = client.GetEntry("2.131", null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -347,13 +135,13 @@ public void Example_CodeTransparency_GetEntryReceipt_ShortVersion() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_CodeTransparency_GetEntryReceipt_ShortVersion_Async() + public async Task Example_CodeTransparency_GetEntry_GetEntry_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - Response response = await client.GetEntryReceiptAsync("", null); + Response response = await client.GetEntryAsync("2.131", null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -361,35 +149,35 @@ public async Task Example_CodeTransparency_GetEntryReceipt_ShortVersion_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_CodeTransparency_GetEntryReceipt_ShortVersion_Convenience() + public void Example_CodeTransparency_GetEntry_GetEntry_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - Response response = client.GetEntryReceipt(""); + Response response = client.GetEntry("2.131"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_CodeTransparency_GetEntryReceipt_ShortVersion_Convenience_Async() + public async Task Example_CodeTransparency_GetEntry_GetEntry_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - Response response = await client.GetEntryReceiptAsync(""); + Response response = await client.GetEntryAsync("2.131"); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_CodeTransparency_GetEntryReceipt_AllParameters() + public void Example_CodeTransparency_GetEntryReceipt_GetEntryReceipt() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - Response response = client.GetEntryReceipt("", null); + Response response = client.GetEntryReceipt("2.131", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -397,13 +185,13 @@ public void Example_CodeTransparency_GetEntryReceipt_AllParameters() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_CodeTransparency_GetEntryReceipt_AllParameters_Async() + public async Task Example_CodeTransparency_GetEntryReceipt_GetEntryReceipt_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - Response response = await client.GetEntryReceiptAsync("", null); + Response response = await client.GetEntryReceiptAsync("2.131", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -411,87 +199,31 @@ public async Task Example_CodeTransparency_GetEntryReceipt_AllParameters_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_CodeTransparency_GetEntryReceipt_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - - Response response = client.GetEntryReceipt(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_CodeTransparency_GetEntryReceipt_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - - Response response = await client.GetEntryReceiptAsync(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_CodeTransparency_GetParameters_ShortVersion() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - - Response response = client.GetParameters(null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("serviceCertificate").ToString()); - Console.WriteLine(result.GetProperty("serviceId").ToString()); - Console.WriteLine(result.GetProperty("signatureAlgorithm").ToString()); - Console.WriteLine(result.GetProperty("treeAlgorithm").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_CodeTransparency_GetParameters_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - - Response response = await client.GetParametersAsync(null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("serviceCertificate").ToString()); - Console.WriteLine(result.GetProperty("serviceId").ToString()); - Console.WriteLine(result.GetProperty("signatureAlgorithm").ToString()); - Console.WriteLine(result.GetProperty("treeAlgorithm").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_CodeTransparency_GetParameters_ShortVersion_Convenience() + public void Example_CodeTransparency_GetEntryReceipt_GetEntryReceipt_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - Response response = client.GetParameters(); + Response response = client.GetEntryReceipt("2.131"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_CodeTransparency_GetParameters_ShortVersion_Convenience_Async() + public async Task Example_CodeTransparency_GetEntryReceipt_GetEntryReceipt_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - Response response = await client.GetParametersAsync(); + Response response = await client.GetEntryReceiptAsync("2.131"); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_CodeTransparency_GetParameters_AllParameters() + public void Example_CodeTransparency_GetParameters_GetParameters() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); @@ -506,9 +238,9 @@ public void Example_CodeTransparency_GetParameters_AllParameters() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_CodeTransparency_GetParameters_AllParameters_Async() + public async Task Example_CodeTransparency_GetParameters_GetParameters_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); @@ -523,9 +255,9 @@ public async Task Example_CodeTransparency_GetParameters_AllParameters_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_CodeTransparency_GetParameters_AllParameters_Convenience() + public void Example_CodeTransparency_GetParameters_GetParameters_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); @@ -534,9 +266,9 @@ public void Example_CodeTransparency_GetParameters_AllParameters_Convenience() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_CodeTransparency_GetParameters_AllParameters_Convenience_Async() + public async Task Example_CodeTransparency_GetParameters_GetParameters_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); @@ -545,67 +277,9 @@ public async Task Example_CodeTransparency_GetParameters_AllParameters_Convenien [Test] [Ignore("Only validating compilation of examples")] - public void Example_CodeTransparency_GetDidConfig_ShortVersion() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - - Response response = client.GetDidConfig(null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("controller").ToString()); - Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("publicKeyJwk").GetProperty("kty").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_CodeTransparency_GetDidConfig_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - - Response response = await client.GetDidConfigAsync(null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("controller").ToString()); - Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("publicKeyJwk").GetProperty("kty").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_CodeTransparency_GetDidConfig_ShortVersion_Convenience() + public void Example_CodeTransparency_GetDidConfig_GetDidConfig() { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - - Response response = client.GetDidConfig(); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_CodeTransparency_GetDidConfig_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - - Response response = await client.GetDidConfigAsync(); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_CodeTransparency_GetDidConfig_AllParameters() - { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); @@ -616,30 +290,14 @@ public void Example_CodeTransparency_GetDidConfig_AllParameters() Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("controller").ToString()); Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("publicKeyJwk").GetProperty("alg").ToString()); - Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("publicKeyJwk").GetProperty("crv").ToString()); - Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("publicKeyJwk").GetProperty("d").ToString()); - Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("publicKeyJwk").GetProperty("dp").ToString()); - Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("publicKeyJwk").GetProperty("dq").ToString()); - Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("publicKeyJwk").GetProperty("e").ToString()); - Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("publicKeyJwk").GetProperty("k").ToString()); - Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("publicKeyJwk").GetProperty("kid").ToString()); Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("publicKeyJwk").GetProperty("kty").ToString()); - Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("publicKeyJwk").GetProperty("n").ToString()); - Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("publicKeyJwk").GetProperty("p").ToString()); - Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("publicKeyJwk").GetProperty("q").ToString()); - Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("publicKeyJwk").GetProperty("qi").ToString()); - Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("publicKeyJwk").GetProperty("use").ToString()); - Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("publicKeyJwk").GetProperty("x").ToString()); - Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("publicKeyJwk").GetProperty("x5c")[0].ToString()); - Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("publicKeyJwk").GetProperty("y").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_CodeTransparency_GetDidConfig_AllParameters_Async() + public async Task Example_CodeTransparency_GetDidConfig_GetDidConfig_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); @@ -650,30 +308,14 @@ public async Task Example_CodeTransparency_GetDidConfig_AllParameters_Async() Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("controller").ToString()); Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("publicKeyJwk").GetProperty("alg").ToString()); - Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("publicKeyJwk").GetProperty("crv").ToString()); - Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("publicKeyJwk").GetProperty("d").ToString()); - Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("publicKeyJwk").GetProperty("dp").ToString()); - Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("publicKeyJwk").GetProperty("dq").ToString()); - Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("publicKeyJwk").GetProperty("e").ToString()); - Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("publicKeyJwk").GetProperty("k").ToString()); - Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("publicKeyJwk").GetProperty("kid").ToString()); Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("publicKeyJwk").GetProperty("kty").ToString()); - Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("publicKeyJwk").GetProperty("n").ToString()); - Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("publicKeyJwk").GetProperty("p").ToString()); - Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("publicKeyJwk").GetProperty("q").ToString()); - Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("publicKeyJwk").GetProperty("qi").ToString()); - Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("publicKeyJwk").GetProperty("use").ToString()); - Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("publicKeyJwk").GetProperty("x").ToString()); - Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("publicKeyJwk").GetProperty("x5c")[0].ToString()); - Console.WriteLine(result.GetProperty("assertionMethod")[0].GetProperty("publicKeyJwk").GetProperty("y").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_CodeTransparency_GetDidConfig_AllParameters_Convenience() + public void Example_CodeTransparency_GetDidConfig_GetDidConfig_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); @@ -682,9 +324,9 @@ public void Example_CodeTransparency_GetDidConfig_AllParameters_Convenience() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_CodeTransparency_GetDidConfig_AllParameters_Convenience_Async() + public async Task Example_CodeTransparency_GetDidConfig_GetDidConfig_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); @@ -693,9 +335,9 @@ public async Task Example_CodeTransparency_GetDidConfig_AllParameters_Convenienc [Test] [Ignore("Only validating compilation of examples")] - public void Example_CodeTransparency_GetCodeTransparencyConfig_ShortVersion() + public void Example_CodeTransparency_GetCodeTransparencyConfig_GetCodeTransparencyConfig() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); @@ -707,9 +349,9 @@ public void Example_CodeTransparency_GetCodeTransparencyConfig_ShortVersion() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_CodeTransparency_GetCodeTransparencyConfig_ShortVersion_Async() + public async Task Example_CodeTransparency_GetCodeTransparencyConfig_GetCodeTransparencyConfig_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); @@ -721,67 +363,9 @@ public async Task Example_CodeTransparency_GetCodeTransparencyConfig_ShortVersio [Test] [Ignore("Only validating compilation of examples")] - public void Example_CodeTransparency_GetCodeTransparencyConfig_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - - Response response = client.GetCodeTransparencyConfig(); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_CodeTransparency_GetCodeTransparencyConfig_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - - Response response = await client.GetCodeTransparencyConfigAsync(); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_CodeTransparency_GetCodeTransparencyConfig_AllParameters() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - - Response response = client.GetCodeTransparencyConfig(null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("policy").GetProperty("accepted_algorithms")[0].ToString()); - Console.WriteLine(result.GetProperty("policy").GetProperty("accepted_did_issuers")[0].ToString()); - Console.WriteLine(result.GetProperty("authentication").GetProperty("allow_unauthenticated").ToString()); - Console.WriteLine(result.GetProperty("authentication").GetProperty("jwt").GetProperty("required_claims").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("service_identifier").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_CodeTransparency_GetCodeTransparencyConfig_AllParameters_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - - Response response = await client.GetCodeTransparencyConfigAsync(null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("policy").GetProperty("accepted_algorithms")[0].ToString()); - Console.WriteLine(result.GetProperty("policy").GetProperty("accepted_did_issuers")[0].ToString()); - Console.WriteLine(result.GetProperty("authentication").GetProperty("allow_unauthenticated").ToString()); - Console.WriteLine(result.GetProperty("authentication").GetProperty("jwt").GetProperty("required_claims").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("service_identifier").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_CodeTransparency_GetCodeTransparencyConfig_AllParameters_Convenience() + public void Example_CodeTransparency_GetCodeTransparencyConfig_GetCodeTransparencyConfig_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); @@ -790,9 +374,9 @@ public void Example_CodeTransparency_GetCodeTransparencyConfig_AllParameters_Con [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_CodeTransparency_GetCodeTransparencyConfig_AllParameters_Convenience_Async() + public async Task Example_CodeTransparency_GetCodeTransparencyConfig_GetCodeTransparencyConfig_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); @@ -801,59 +385,9 @@ public async Task Example_CodeTransparency_GetCodeTransparencyConfig_AllParamete [Test] [Ignore("Only validating compilation of examples")] - public void Example_CodeTransparency_GetCodeTransparencyVersion_ShortVersion() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - - Response response = client.GetCodeTransparencyVersion(null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("scitt_version").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_CodeTransparency_GetCodeTransparencyVersion_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - - Response response = await client.GetCodeTransparencyVersionAsync(null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("scitt_version").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_CodeTransparency_GetCodeTransparencyVersion_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - - Response response = client.GetCodeTransparencyVersion(); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_CodeTransparency_GetCodeTransparencyVersion_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - - Response response = await client.GetCodeTransparencyVersionAsync(); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_CodeTransparency_GetCodeTransparencyVersion_AllParameters() + public void Example_CodeTransparency_GetCodeTransparencyVersion_GetCodeTransparencyVersion() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); @@ -865,9 +399,9 @@ public void Example_CodeTransparency_GetCodeTransparencyVersion_AllParameters() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_CodeTransparency_GetCodeTransparencyVersion_AllParameters_Async() + public async Task Example_CodeTransparency_GetCodeTransparencyVersion_GetCodeTransparencyVersion_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); @@ -879,9 +413,9 @@ public async Task Example_CodeTransparency_GetCodeTransparencyVersion_AllParamet [Test] [Ignore("Only validating compilation of examples")] - public void Example_CodeTransparency_GetCodeTransparencyVersion_AllParameters_Convenience() + public void Example_CodeTransparency_GetCodeTransparencyVersion_GetCodeTransparencyVersion_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); @@ -890,9 +424,9 @@ public void Example_CodeTransparency_GetCodeTransparencyVersion_AllParameters_Co [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_CodeTransparency_GetCodeTransparencyVersion_AllParameters_Convenience_Async() + public async Task Example_CodeTransparency_GetCodeTransparencyVersion_GetCodeTransparencyVersion_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); @@ -901,9 +435,9 @@ public async Task Example_CodeTransparency_GetCodeTransparencyVersion_AllParamet [Test] [Ignore("Only validating compilation of examples")] - public void Example_CodeTransparency_GetEntryIds_ShortVersion() + public void Example_CodeTransparency_GetEntryIds_ListEntryIds() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); @@ -916,9 +450,9 @@ public void Example_CodeTransparency_GetEntryIds_ShortVersion() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_CodeTransparency_GetEntryIds_ShortVersion_Async() + public async Task Example_CodeTransparency_GetEntryIds_ListEntryIds_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); @@ -931,9 +465,9 @@ public async Task Example_CodeTransparency_GetEntryIds_ShortVersion_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_CodeTransparency_GetEntryIds_ShortVersion_Convenience() + public void Example_CodeTransparency_GetEntryIds_ListEntryIds_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); @@ -944,9 +478,9 @@ public void Example_CodeTransparency_GetEntryIds_ShortVersion_Convenience() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_CodeTransparency_GetEntryIds_ShortVersion_Convenience_Async() + public async Task Example_CodeTransparency_GetEntryIds_ListEntryIds_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); @@ -954,61 +488,5 @@ public async Task Example_CodeTransparency_GetEntryIds_ShortVersion_Convenience_ { } } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_CodeTransparency_GetEntryIds_AllParameters() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - - foreach (BinaryData item in client.GetEntryIds(1234L, 1234L, null)) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_CodeTransparency_GetEntryIds_AllParameters_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - - await foreach (BinaryData item in client.GetEntryIdsAsync(1234L, 1234L, null)) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_CodeTransparency_GetEntryIds_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - - foreach (string item in client.GetEntryIds(from: 1234L, to: 1234L)) - { - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_CodeTransparency_GetEntryIds_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential); - - await foreach (string item in client.GetEntryIdsAsync(from: 1234L, to: 1234L)) - { - } - } } } diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/ContentSafetyModelFactory.cs b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/ContentSafetyModelFactory.cs index 140aed1f91c0..1f718056b007 100644 --- a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/ContentSafetyModelFactory.cs +++ b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/ContentSafetyModelFactory.cs @@ -97,15 +97,6 @@ public static ImageCategoriesAnalysis ImageCategoriesAnalysis(ImageCategory cate return new ImageCategoriesAnalysis(category, severity, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// Text blocklist name. - /// Text blocklist description. - /// A new instance for mocking. - public static TextBlocklist TextBlocklist(string name = null, string description = null) - { - return new TextBlocklist(name, description, serializedAdditionalRawData: null); - } - /// Initializes a new instance of . /// The service will generate a BlocklistItemId, which will be a UUID. /// BlocklistItem description. @@ -125,5 +116,14 @@ public static AddOrUpdateTextBlocklistItemsResult AddOrUpdateTextBlocklistItemsR return new AddOrUpdateTextBlocklistItemsResult(blocklistItems?.ToList(), serializedAdditionalRawData: null); } + + /// Initializes a new instance of . + /// Text blocklist name. + /// Text blocklist description. + /// A new instance for mocking. + public static TextBlocklist TextBlocklist(string name = null, string description = null) + { + return new TextBlocklist(name, description, serializedAdditionalRawData: null); + } } } diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/Docs/BlocklistClient.xml b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/Docs/BlocklistClient.xml index 2867b96ccc3b..1f155addaff7 100644 --- a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/Docs/BlocklistClient.xml +++ b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/Docs/BlocklistClient.xml @@ -5,67 +5,43 @@ This sample shows how to call AddOrUpdateBlocklistItemsAsync. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); BlocklistClient client = new BlocklistClient(endpoint, credential); AddOrUpdateTextBlocklistItemsOptions options = new AddOrUpdateTextBlocklistItemsOptions(new TextBlocklistItem[] { - new TextBlocklistItem("") -}); -Response response = await client.AddOrUpdateBlocklistItemsAsync("", options); -]]> -This sample shows how to call AddOrUpdateBlocklistItemsAsync with all parameters. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -BlocklistClient client = new BlocklistClient(endpoint, credential); - -AddOrUpdateTextBlocklistItemsOptions options = new AddOrUpdateTextBlocklistItemsOptions(new TextBlocklistItem[] -{ - new TextBlocklistItem("") + new TextBlocklistItem("hate") { - Description = "", + Description = "Hate word", } }); -Response response = await client.AddOrUpdateBlocklistItemsAsync("", options); +Response response = await client.AddOrUpdateBlocklistItemsAsync("TestBlocklist", options); ]]> This sample shows how to call AddOrUpdateBlocklistItems. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); BlocklistClient client = new BlocklistClient(endpoint, credential); AddOrUpdateTextBlocklistItemsOptions options = new AddOrUpdateTextBlocklistItemsOptions(new TextBlocklistItem[] { - new TextBlocklistItem("") -}); -Response response = client.AddOrUpdateBlocklistItems("", options); -]]> -This sample shows how to call AddOrUpdateBlocklistItems with all parameters. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -BlocklistClient client = new BlocklistClient(endpoint, credential); - -AddOrUpdateTextBlocklistItemsOptions options = new AddOrUpdateTextBlocklistItemsOptions(new TextBlocklistItem[] -{ - new TextBlocklistItem("") + new TextBlocklistItem("hate") { - Description = "", + Description = "Hate word", } }); -Response response = client.AddOrUpdateBlocklistItems("", options); +Response response = client.AddOrUpdateBlocklistItems("TestBlocklist", options); ]]> This sample shows how to call AddOrUpdateBlocklistItemsAsync and parse the result. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); BlocklistClient client = new BlocklistClient(endpoint, credential); @@ -75,68 +51,23 @@ using RequestContent content = RequestContent.Create(new { new { - text = "", + description = "Hate word", + text = "hate", } }, }); -Response response = await client.AddOrUpdateBlocklistItemsAsync("", content); +Response response = await client.AddOrUpdateBlocklistItemsAsync("TestBlocklist", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("blocklistItems")[0].GetProperty("blocklistItemId").ToString()); Console.WriteLine(result.GetProperty("blocklistItems")[0].GetProperty("text").ToString()); -]]> -This sample shows how to call AddOrUpdateBlocklistItemsAsync with all parameters and request content and parse the result. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -BlocklistClient client = new BlocklistClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - blocklistItems = new object[] - { - new - { - description = "", - text = "", - } - }, -}); -Response response = await client.AddOrUpdateBlocklistItemsAsync("", content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("blocklistItems")[0].GetProperty("blocklistItemId").ToString()); -Console.WriteLine(result.GetProperty("blocklistItems")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("blocklistItems")[0].GetProperty("text").ToString()); ]]> This sample shows how to call AddOrUpdateBlocklistItems and parse the result. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -BlocklistClient client = new BlocklistClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - blocklistItems = new object[] - { - new - { - text = "", - } - }, -}); -Response response = client.AddOrUpdateBlocklistItems("", content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("blocklistItems")[0].GetProperty("blocklistItemId").ToString()); -Console.WriteLine(result.GetProperty("blocklistItems")[0].GetProperty("text").ToString()); -]]> -This sample shows how to call AddOrUpdateBlocklistItems with all parameters and request content and parse the result. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); BlocklistClient client = new BlocklistClient(endpoint, credential); @@ -146,16 +77,15 @@ using RequestContent content = RequestContent.Create(new { new { - description = "", - text = "", + description = "Hate word", + text = "hate", } }, }); -Response response = client.AddOrUpdateBlocklistItems("", content); +Response response = client.AddOrUpdateBlocklistItems("TestBlocklist", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("blocklistItems")[0].GetProperty("blocklistItemId").ToString()); -Console.WriteLine(result.GetProperty("blocklistItems")[0].GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("blocklistItems")[0].GetProperty("text").ToString()); ]]> @@ -163,91 +93,41 @@ Console.WriteLine(result.GetProperty("blocklistItems")[0].GetProperty("text").To This sample shows how to call CreateOrUpdateTextBlocklistAsync and parse the result. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); BlocklistClient client = new BlocklistClient(endpoint, credential); -using RequestContent content = RequestContent.Create(new -{ - blocklistName = "", -}); -Response response = await client.CreateOrUpdateTextBlocklistAsync("", content); +using RequestContent content = null; +Response response = await client.CreateOrUpdateTextBlocklistAsync("TestBlocklist", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("blocklistName").ToString()); -]]> -This sample shows how to call CreateOrUpdateTextBlocklistAsync with all parameters and request content and parse the result. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -BlocklistClient client = new BlocklistClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - blocklistName = "", - description = "", -}); -Response response = await client.CreateOrUpdateTextBlocklistAsync("", content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("blocklistName").ToString()); -Console.WriteLine(result.GetProperty("description").ToString()); ]]> This sample shows how to call CreateOrUpdateTextBlocklist and parse the result. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -BlocklistClient client = new BlocklistClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - blocklistName = "", -}); -Response response = client.CreateOrUpdateTextBlocklist("", content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("blocklistName").ToString()); -]]> -This sample shows how to call CreateOrUpdateTextBlocklist with all parameters and request content and parse the result. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); BlocklistClient client = new BlocklistClient(endpoint, credential); -using RequestContent content = RequestContent.Create(new -{ - blocklistName = "", - description = "", -}); -Response response = client.CreateOrUpdateTextBlocklist("", content); +using RequestContent content = null; +Response response = client.CreateOrUpdateTextBlocklist("TestBlocklist", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("blocklistName").ToString()); -Console.WriteLine(result.GetProperty("description").ToString()); ]]> This sample shows how to call DeleteTextBlocklistAsync. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -BlocklistClient client = new BlocklistClient(endpoint, credential); - -Response response = await client.DeleteTextBlocklistAsync(""); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call DeleteTextBlocklistAsync with all parameters. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); BlocklistClient client = new BlocklistClient(endpoint, credential); -Response response = await client.DeleteTextBlocklistAsync(""); +Response response = await client.DeleteTextBlocklistAsync("TestBlocklist"); Console.WriteLine(response.Status); ]]> @@ -256,21 +136,11 @@ Console.WriteLine(response.Status); This sample shows how to call DeleteTextBlocklist. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -BlocklistClient client = new BlocklistClient(endpoint, credential); - -Response response = client.DeleteTextBlocklist(""); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call DeleteTextBlocklist with all parameters. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); BlocklistClient client = new BlocklistClient(endpoint, credential); -Response response = client.DeleteTextBlocklist(""); +Response response = client.DeleteTextBlocklist("TestBlocklist"); Console.WriteLine(response.Status); ]]> @@ -279,233 +149,133 @@ Console.WriteLine(response.Status); This sample shows how to call GetTextBlocklistAsync. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); BlocklistClient client = new BlocklistClient(endpoint, credential); -Response response = await client.GetTextBlocklistAsync(""); -]]> -This sample shows how to call GetTextBlocklistAsync with all parameters. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -BlocklistClient client = new BlocklistClient(endpoint, credential); - -Response response = await client.GetTextBlocklistAsync(""); +Response response = await client.GetTextBlocklistAsync("TestBlocklist"); ]]> This sample shows how to call GetTextBlocklist. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -BlocklistClient client = new BlocklistClient(endpoint, credential); - -Response response = client.GetTextBlocklist(""); -]]> -This sample shows how to call GetTextBlocklist with all parameters. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); BlocklistClient client = new BlocklistClient(endpoint, credential); -Response response = client.GetTextBlocklist(""); +Response response = client.GetTextBlocklist("TestBlocklist"); ]]> This sample shows how to call GetTextBlocklistAsync and parse the result. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -BlocklistClient client = new BlocklistClient(endpoint, credential); - -Response response = await client.GetTextBlocklistAsync("", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("blocklistName").ToString()); -]]> -This sample shows how to call GetTextBlocklistAsync with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); BlocklistClient client = new BlocklistClient(endpoint, credential); -Response response = await client.GetTextBlocklistAsync("", null); +Response response = await client.GetTextBlocklistAsync("TestBlocklist", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("blocklistName").ToString()); -Console.WriteLine(result.GetProperty("description").ToString()); ]]> This sample shows how to call GetTextBlocklist and parse the result. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -BlocklistClient client = new BlocklistClient(endpoint, credential); - -Response response = client.GetTextBlocklist("", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("blocklistName").ToString()); -]]> -This sample shows how to call GetTextBlocklist with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); BlocklistClient client = new BlocklistClient(endpoint, credential); -Response response = client.GetTextBlocklist("", null); +Response response = client.GetTextBlocklist("TestBlocklist", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("blocklistName").ToString()); -Console.WriteLine(result.GetProperty("description").ToString()); ]]> This sample shows how to call GetTextBlocklistItemAsync. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); BlocklistClient client = new BlocklistClient(endpoint, credential); -Response response = await client.GetTextBlocklistItemAsync("", ""); -]]> -This sample shows how to call GetTextBlocklistItemAsync with all parameters. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -BlocklistClient client = new BlocklistClient(endpoint, credential); - -Response response = await client.GetTextBlocklistItemAsync("", ""); +Response response = await client.GetTextBlocklistItemAsync("TestBlocklist", "9511969e-f1e3-4604-9127-05ee16c509ec"); ]]> This sample shows how to call GetTextBlocklistItem. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -BlocklistClient client = new BlocklistClient(endpoint, credential); - -Response response = client.GetTextBlocklistItem("", ""); -]]> -This sample shows how to call GetTextBlocklistItem with all parameters. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); BlocklistClient client = new BlocklistClient(endpoint, credential); -Response response = client.GetTextBlocklistItem("", ""); +Response response = client.GetTextBlocklistItem("TestBlocklist", "9511969e-f1e3-4604-9127-05ee16c509ec"); ]]> This sample shows how to call GetTextBlocklistItemAsync and parse the result. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); BlocklistClient client = new BlocklistClient(endpoint, credential); -Response response = await client.GetTextBlocklistItemAsync("", "", null); +Response response = await client.GetTextBlocklistItemAsync("TestBlocklist", "9511969e-f1e3-4604-9127-05ee16c509ec", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("blocklistItemId").ToString()); Console.WriteLine(result.GetProperty("text").ToString()); -]]> -This sample shows how to call GetTextBlocklistItemAsync with all parameters and parse the result. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -BlocklistClient client = new BlocklistClient(endpoint, credential); - -Response response = await client.GetTextBlocklistItemAsync("", "", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("blocklistItemId").ToString()); -Console.WriteLine(result.GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("text").ToString()); ]]> This sample shows how to call GetTextBlocklistItem and parse the result. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); BlocklistClient client = new BlocklistClient(endpoint, credential); -Response response = client.GetTextBlocklistItem("", "", null); +Response response = client.GetTextBlocklistItem("TestBlocklist", "9511969e-f1e3-4604-9127-05ee16c509ec", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("blocklistItemId").ToString()); Console.WriteLine(result.GetProperty("text").ToString()); -]]> -This sample shows how to call GetTextBlocklistItem with all parameters and parse the result. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -BlocklistClient client = new BlocklistClient(endpoint, credential); - -Response response = client.GetTextBlocklistItem("", "", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("blocklistItemId").ToString()); -Console.WriteLine(result.GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("text").ToString()); ]]> This sample shows how to call RemoveBlocklistItemsAsync. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -BlocklistClient client = new BlocklistClient(endpoint, credential); - -RemoveTextBlocklistItemsOptions options = new RemoveTextBlocklistItemsOptions(new string[] { "" }); -Response response = await client.RemoveBlocklistItemsAsync("", options); -]]> -This sample shows how to call RemoveBlocklistItemsAsync with all parameters. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); BlocklistClient client = new BlocklistClient(endpoint, credential); -RemoveTextBlocklistItemsOptions options = new RemoveTextBlocklistItemsOptions(new string[] { "" }); -Response response = await client.RemoveBlocklistItemsAsync("", options); +RemoveTextBlocklistItemsOptions options = new RemoveTextBlocklistItemsOptions(new string[] { "9511969e-f1e3-4604-9127-05ee16c509ec" }); +Response response = await client.RemoveBlocklistItemsAsync("TestBlocklist", options); ]]> This sample shows how to call RemoveBlocklistItems. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); BlocklistClient client = new BlocklistClient(endpoint, credential); -RemoveTextBlocklistItemsOptions options = new RemoveTextBlocklistItemsOptions(new string[] { "" }); -Response response = client.RemoveBlocklistItems("", options); -]]> -This sample shows how to call RemoveBlocklistItems with all parameters. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -BlocklistClient client = new BlocklistClient(endpoint, credential); - -RemoveTextBlocklistItemsOptions options = new RemoveTextBlocklistItemsOptions(new string[] { "" }); -Response response = client.RemoveBlocklistItems("", options); +RemoveTextBlocklistItemsOptions options = new RemoveTextBlocklistItemsOptions(new string[] { "9511969e-f1e3-4604-9127-05ee16c509ec" }); +Response response = client.RemoveBlocklistItems("TestBlocklist", options); ]]> This sample shows how to call RemoveBlocklistItemsAsync. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); BlocklistClient client = new BlocklistClient(endpoint, credential); @@ -513,27 +283,10 @@ using RequestContent content = RequestContent.Create(new { blocklistItemIds = new object[] { - "" + "9511969e-f1e3-4604-9127-05ee16c509ec" }, }); -Response response = await client.RemoveBlocklistItemsAsync("", content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call RemoveBlocklistItemsAsync with all parameters and request content. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -BlocklistClient client = new BlocklistClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - blocklistItemIds = new object[] - { - "" - }, -}); -Response response = await client.RemoveBlocklistItemsAsync("", content); +Response response = await client.RemoveBlocklistItemsAsync("TestBlocklist", content); Console.WriteLine(response.Status); ]]> @@ -542,24 +295,7 @@ Console.WriteLine(response.Status); This sample shows how to call RemoveBlocklistItems. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -BlocklistClient client = new BlocklistClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - blocklistItemIds = new object[] - { - "" - }, -}); -Response response = client.RemoveBlocklistItems("", content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call RemoveBlocklistItems with all parameters and request content. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); BlocklistClient client = new BlocklistClient(endpoint, credential); @@ -567,10 +303,10 @@ using RequestContent content = RequestContent.Create(new { blocklistItemIds = new object[] { - "" + "9511969e-f1e3-4604-9127-05ee16c509ec" }, }); -Response response = client.RemoveBlocklistItems("", content); +Response response = client.RemoveBlocklistItems("TestBlocklist", content); Console.WriteLine(response.Status); ]]> @@ -579,21 +315,11 @@ Console.WriteLine(response.Status); This sample shows how to call GetTextBlocklistItemsAsync. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -BlocklistClient client = new BlocklistClient(endpoint, credential); - -await foreach (TextBlocklistItem item in client.GetTextBlocklistItemsAsync("")) -{ -} -]]> -This sample shows how to call GetTextBlocklistItemsAsync with all parameters. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); BlocklistClient client = new BlocklistClient(endpoint, credential); -await foreach (TextBlocklistItem item in client.GetTextBlocklistItemsAsync("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) +await foreach (TextBlocklistItem item in client.GetTextBlocklistItemsAsync("TestBlocklist")) { } ]]> @@ -602,21 +328,11 @@ await foreach (TextBlocklistItem item in client.GetTextBlocklistItemsAsync(" This sample shows how to call GetTextBlocklistItems. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); BlocklistClient client = new BlocklistClient(endpoint, credential); -foreach (TextBlocklistItem item in client.GetTextBlocklistItems("")) -{ -} -]]> -This sample shows how to call GetTextBlocklistItems with all parameters. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -BlocklistClient client = new BlocklistClient(endpoint, credential); - -foreach (TextBlocklistItem item in client.GetTextBlocklistItems("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) +foreach (TextBlocklistItem item in client.GetTextBlocklistItems("TestBlocklist")) { } ]]> @@ -625,28 +341,14 @@ foreach (TextBlocklistItem item in client.GetTextBlocklistItems("", maxCou This sample shows how to call GetTextBlocklistItemsAsync and parse the result. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -BlocklistClient client = new BlocklistClient(endpoint, credential); - -await foreach (BinaryData item in client.GetTextBlocklistItemsAsync("", null, null, null, null)) -{ - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("blocklistItemId").ToString()); - Console.WriteLine(result.GetProperty("text").ToString()); -} -]]> -This sample shows how to call GetTextBlocklistItemsAsync with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); BlocklistClient client = new BlocklistClient(endpoint, credential); -await foreach (BinaryData item in client.GetTextBlocklistItemsAsync("", 1234, 1234, 1234, null)) +await foreach (BinaryData item in client.GetTextBlocklistItemsAsync("TestBlocklist", null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("blocklistItemId").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("text").ToString()); } ]]> @@ -655,28 +357,14 @@ await foreach (BinaryData item in client.GetTextBlocklistItemsAsync("", 12 This sample shows how to call GetTextBlocklistItems and parse the result. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -BlocklistClient client = new BlocklistClient(endpoint, credential); - -foreach (BinaryData item in client.GetTextBlocklistItems("", null, null, null, null)) -{ - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("blocklistItemId").ToString()); - Console.WriteLine(result.GetProperty("text").ToString()); -} -]]> -This sample shows how to call GetTextBlocklistItems with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); BlocklistClient client = new BlocklistClient(endpoint, credential); -foreach (BinaryData item in client.GetTextBlocklistItems("", 1234, 1234, 1234, null)) +foreach (BinaryData item in client.GetTextBlocklistItems("TestBlocklist", null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("blocklistItemId").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("text").ToString()); } ]]> @@ -685,17 +373,7 @@ foreach (BinaryData item in client.GetTextBlocklistItems("", 1234, 1234, 1 This sample shows how to call GetTextBlocklistsAsync. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -BlocklistClient client = new BlocklistClient(endpoint, credential); - -await foreach (TextBlocklist item in client.GetTextBlocklistsAsync()) -{ -} -]]> -This sample shows how to call GetTextBlocklistsAsync with all parameters. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); BlocklistClient client = new BlocklistClient(endpoint, credential); @@ -708,17 +386,7 @@ await foreach (TextBlocklist item in client.GetTextBlocklistsAsync()) This sample shows how to call GetTextBlocklists. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -BlocklistClient client = new BlocklistClient(endpoint, credential); - -foreach (TextBlocklist item in client.GetTextBlocklists()) -{ -} -]]> -This sample shows how to call GetTextBlocklists with all parameters. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); BlocklistClient client = new BlocklistClient(endpoint, credential); @@ -731,19 +399,7 @@ foreach (TextBlocklist item in client.GetTextBlocklists()) This sample shows how to call GetTextBlocklistsAsync and parse the result. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -BlocklistClient client = new BlocklistClient(endpoint, credential); - -await foreach (BinaryData item in client.GetTextBlocklistsAsync(null)) -{ - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("blocklistName").ToString()); -} -]]> -This sample shows how to call GetTextBlocklistsAsync with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); BlocklistClient client = new BlocklistClient(endpoint, credential); @@ -751,7 +407,6 @@ await foreach (BinaryData item in client.GetTextBlocklistsAsync(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("blocklistName").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); } ]]> @@ -759,19 +414,7 @@ await foreach (BinaryData item in client.GetTextBlocklistsAsync(null)) This sample shows how to call GetTextBlocklists and parse the result. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -BlocklistClient client = new BlocklistClient(endpoint, credential); - -foreach (BinaryData item in client.GetTextBlocklists(null)) -{ - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("blocklistName").ToString()); -} -]]> -This sample shows how to call GetTextBlocklists with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); BlocklistClient client = new BlocklistClient(endpoint, credential); @@ -779,7 +422,6 @@ foreach (BinaryData item in client.GetTextBlocklists(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("blocklistName").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); } ]]> diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/Docs/ContentSafetyClient.xml b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/Docs/ContentSafetyClient.xml index f5ffab408d37..e08488786ea6 100644 --- a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/Docs/ContentSafetyClient.xml +++ b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/Docs/ContentSafetyClient.xml @@ -5,26 +5,11 @@ This sample shows how to call AnalyzeTextAsync. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); -AnalyzeTextOptions options = new AnalyzeTextOptions(""); -Response response = await client.AnalyzeTextAsync(options); -]]> -This sample shows how to call AnalyzeTextAsync with all parameters. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - -AnalyzeTextOptions options = new AnalyzeTextOptions("") -{ - Categories = { TextCategory.Hate }, - BlocklistNames = { "" }, - HaltOnBlocklistHit = true, - OutputType = AnalyzeTextOutputType.FourSeverityLevels, -}; +AnalyzeTextOptions options = new AnalyzeTextOptions("This is text example"); Response response = await client.AnalyzeTextAsync(options); ]]> @@ -32,26 +17,11 @@ Response response = await client.AnalyzeTextAsync(options); This sample shows how to call AnalyzeText. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - -AnalyzeTextOptions options = new AnalyzeTextOptions(""); -Response response = client.AnalyzeText(options); -]]> -This sample shows how to call AnalyzeText with all parameters. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); -AnalyzeTextOptions options = new AnalyzeTextOptions("") -{ - Categories = { TextCategory.Hate }, - BlocklistNames = { "" }, - HaltOnBlocklistHit = true, - OutputType = AnalyzeTextOutputType.FourSeverityLevels, -}; +AnalyzeTextOptions options = new AnalyzeTextOptions("This is text example"); Response response = client.AnalyzeText(options); ]]> @@ -59,166 +29,67 @@ Response response = client.AnalyzeText(options); This sample shows how to call AnalyzeTextAsync and parse the result. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - text = "", -}); -Response response = await client.AnalyzeTextAsync(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("categoriesAnalysis")[0].GetProperty("category").ToString()); -]]> -This sample shows how to call AnalyzeTextAsync with all request content and parse the result. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - text = "", - categories = new object[] - { - "Hate" - }, - blocklistNames = new object[] - { - "" - }, - haltOnBlocklistHit = true, - outputType = "FourSeverityLevels", + text = "This is text example", }); Response response = await client.AnalyzeTextAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("blocklistsMatch")[0].GetProperty("blocklistName").ToString()); -Console.WriteLine(result.GetProperty("blocklistsMatch")[0].GetProperty("blocklistItemId").ToString()); -Console.WriteLine(result.GetProperty("blocklistsMatch")[0].GetProperty("blocklistItemText").ToString()); Console.WriteLine(result.GetProperty("categoriesAnalysis")[0].GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("categoriesAnalysis")[0].GetProperty("severity").ToString()); ]]> This sample shows how to call AnalyzeText and parse the result. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - text = "", -}); -Response response = client.AnalyzeText(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("categoriesAnalysis")[0].GetProperty("category").ToString()); -]]> -This sample shows how to call AnalyzeText with all request content and parse the result. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - text = "", - categories = new object[] - { - "Hate" - }, - blocklistNames = new object[] - { - "" - }, - haltOnBlocklistHit = true, - outputType = "FourSeverityLevels", + text = "This is text example", }); Response response = client.AnalyzeText(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("blocklistsMatch")[0].GetProperty("blocklistName").ToString()); -Console.WriteLine(result.GetProperty("blocklistsMatch")[0].GetProperty("blocklistItemId").ToString()); -Console.WriteLine(result.GetProperty("blocklistsMatch")[0].GetProperty("blocklistItemText").ToString()); Console.WriteLine(result.GetProperty("categoriesAnalysis")[0].GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("categoriesAnalysis")[0].GetProperty("severity").ToString()); ]]> This sample shows how to call AnalyzeImageAsync. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); AnalyzeImageOptions options = new AnalyzeImageOptions(new ContentSafetyImageData()); Response response = await client.AnalyzeImageAsync(options); -]]> -This sample shows how to call AnalyzeImageAsync with all parameters. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - -AnalyzeImageOptions options = new AnalyzeImageOptions(new ContentSafetyImageData()) -{ - Categories = { ImageCategory.Hate }, - OutputType = AnalyzeImageOutputType.FourSeverityLevels, -}; -Response response = await client.AnalyzeImageAsync(options); ]]> This sample shows how to call AnalyzeImage. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); AnalyzeImageOptions options = new AnalyzeImageOptions(new ContentSafetyImageData()); Response response = client.AnalyzeImage(options); -]]> -This sample shows how to call AnalyzeImage with all parameters. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - -AnalyzeImageOptions options = new AnalyzeImageOptions(new ContentSafetyImageData()) -{ - Categories = { ImageCategory.Hate }, - OutputType = AnalyzeImageOutputType.FourSeverityLevels, -}; -Response response = client.AnalyzeImage(options); ]]> This sample shows how to call AnalyzeImageAsync and parse the result. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - image = new object(), -}); -Response response = await client.AnalyzeImageAsync(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("categoriesAnalysis")[0].GetProperty("category").ToString()); -]]> -This sample shows how to call AnalyzeImageAsync with all request content and parse the result. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); @@ -226,42 +97,20 @@ using RequestContent content = RequestContent.Create(new { image = new { - content = new object(), - blobUrl = "http://localhost:3000", + content = "Y29udGVudDE=", }, - categories = new object[] - { - "Hate" - }, - outputType = "FourSeverityLevels", }); Response response = await client.AnalyzeImageAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("categoriesAnalysis")[0].GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("categoriesAnalysis")[0].GetProperty("severity").ToString()); ]]> This sample shows how to call AnalyzeImage and parse the result. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - image = new object(), -}); -Response response = client.AnalyzeImage(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("categoriesAnalysis")[0].GetProperty("category").ToString()); -]]> -This sample shows how to call AnalyzeImage with all request content and parse the result. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); @@ -269,20 +118,13 @@ using RequestContent content = RequestContent.Create(new { image = new { - content = new object(), - blobUrl = "http://localhost:3000", - }, - categories = new object[] - { - "Hate" + content = "Y29udGVudDE=", }, - outputType = "FourSeverityLevels", }); Response response = client.AnalyzeImage(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("categoriesAnalysis")[0].GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("categoriesAnalysis")[0].GetProperty("severity").ToString()); ]]> diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/tests/Generated/Samples/Samples_BlocklistClient.cs b/sdk/contentsafety/Azure.AI.ContentSafety/tests/Generated/Samples/Samples_BlocklistClient.cs index d3db9d9fdab9..054ddad0e1df 100644 --- a/sdk/contentsafety/Azure.AI.ContentSafety/tests/Generated/Samples/Samples_BlocklistClient.cs +++ b/sdk/contentsafety/Azure.AI.ContentSafety/tests/Generated/Samples/Samples_BlocklistClient.cs @@ -18,9 +18,9 @@ public partial class Samples_BlocklistClient { [Test] [Ignore("Only validating compilation of examples")] - public void Example_BlocklistClient_AddOrUpdateBlocklistItems_ShortVersion() + public void Example_BlocklistClient_AddOrUpdateBlocklistItems_AddOrUpdateBlocklistItemsToTextBlocklist() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); BlocklistClient client = new BlocklistClient(endpoint, credential); @@ -30,11 +30,12 @@ public void Example_BlocklistClient_AddOrUpdateBlocklistItems_ShortVersion() { new { -text = "", +description = "Hate word", +text = "hate", } }, }); - Response response = client.AddOrUpdateBlocklistItems("", content); + Response response = client.AddOrUpdateBlocklistItems("TestBlocklist", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("blocklistItems")[0].GetProperty("blocklistItemId").ToString()); @@ -43,9 +44,9 @@ public void Example_BlocklistClient_AddOrUpdateBlocklistItems_ShortVersion() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_BlocklistClient_AddOrUpdateBlocklistItems_ShortVersion_Async() + public async Task Example_BlocklistClient_AddOrUpdateBlocklistItems_AddOrUpdateBlocklistItemsToTextBlocklist_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); BlocklistClient client = new BlocklistClient(endpoint, credential); @@ -55,11 +56,12 @@ public async Task Example_BlocklistClient_AddOrUpdateBlocklistItems_ShortVersion { new { -text = "", +description = "Hate word", +text = "hate", } }, }); - Response response = await client.AddOrUpdateBlocklistItemsAsync("", content); + Response response = await client.AddOrUpdateBlocklistItemsAsync("TestBlocklist", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("blocklistItems")[0].GetProperty("blocklistItemId").ToString()); @@ -68,137 +70,50 @@ public async Task Example_BlocklistClient_AddOrUpdateBlocklistItems_ShortVersion [Test] [Ignore("Only validating compilation of examples")] - public void Example_BlocklistClient_AddOrUpdateBlocklistItems_ShortVersion_Convenience() + public void Example_BlocklistClient_AddOrUpdateBlocklistItems_AddOrUpdateBlocklistItemsToTextBlocklist_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); BlocklistClient client = new BlocklistClient(endpoint, credential); AddOrUpdateTextBlocklistItemsOptions options = new AddOrUpdateTextBlocklistItemsOptions(new TextBlocklistItem[] { -new TextBlocklistItem("") - }); - Response response = client.AddOrUpdateBlocklistItems("", options); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_BlocklistClient_AddOrUpdateBlocklistItems_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - BlocklistClient client = new BlocklistClient(endpoint, credential); - - AddOrUpdateTextBlocklistItemsOptions options = new AddOrUpdateTextBlocklistItemsOptions(new TextBlocklistItem[] - { -new TextBlocklistItem("") - }); - Response response = await client.AddOrUpdateBlocklistItemsAsync("", options); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_BlocklistClient_AddOrUpdateBlocklistItems_AllParameters() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - BlocklistClient client = new BlocklistClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - blocklistItems = new object[] - { -new +new TextBlocklistItem("hate") { -description = "", -text = "", +Description = "Hate word", } - }, }); - Response response = client.AddOrUpdateBlocklistItems("", content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("blocklistItems")[0].GetProperty("blocklistItemId").ToString()); - Console.WriteLine(result.GetProperty("blocklistItems")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("blocklistItems")[0].GetProperty("text").ToString()); + Response response = client.AddOrUpdateBlocklistItems("TestBlocklist", options); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_BlocklistClient_AddOrUpdateBlocklistItems_AllParameters_Async() + public async Task Example_BlocklistClient_AddOrUpdateBlocklistItems_AddOrUpdateBlocklistItemsToTextBlocklist_Convenience_Async() { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - BlocklistClient client = new BlocklistClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - blocklistItems = new object[] - { -new -{ -description = "", -text = "", -} - }, - }); - Response response = await client.AddOrUpdateBlocklistItemsAsync("", content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("blocklistItems")[0].GetProperty("blocklistItemId").ToString()); - Console.WriteLine(result.GetProperty("blocklistItems")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("blocklistItems")[0].GetProperty("text").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_BlocklistClient_AddOrUpdateBlocklistItems_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - BlocklistClient client = new BlocklistClient(endpoint, credential); - - AddOrUpdateTextBlocklistItemsOptions options = new AddOrUpdateTextBlocklistItemsOptions(new TextBlocklistItem[] - { -new TextBlocklistItem("") -{ -Description = "", -} - }); - Response response = client.AddOrUpdateBlocklistItems("", options); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_BlocklistClient_AddOrUpdateBlocklistItems_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); BlocklistClient client = new BlocklistClient(endpoint, credential); AddOrUpdateTextBlocklistItemsOptions options = new AddOrUpdateTextBlocklistItemsOptions(new TextBlocklistItem[] { -new TextBlocklistItem("") +new TextBlocklistItem("hate") { -Description = "", +Description = "Hate word", } }); - Response response = await client.AddOrUpdateBlocklistItemsAsync("", options); + Response response = await client.AddOrUpdateBlocklistItemsAsync("TestBlocklist", options); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_TextBlocklist_CreateOrUpdateTextBlocklist_ShortVersion() + public void Example_TextBlocklist_CreateOrUpdateTextBlocklist_CreateOrUpdateTextBlocklist() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); BlocklistClient client = new BlocklistClient(endpoint, credential); - using RequestContent content = RequestContent.Create(new - { - blocklistName = "", - }); - Response response = client.CreateOrUpdateTextBlocklist("", content); + using RequestContent content = null; + Response response = client.CreateOrUpdateTextBlocklist("TestBlocklist", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("blocklistName").ToString()); @@ -206,17 +121,14 @@ public void Example_TextBlocklist_CreateOrUpdateTextBlocklist_ShortVersion() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_TextBlocklist_CreateOrUpdateTextBlocklist_ShortVersion_Async() + public async Task Example_TextBlocklist_CreateOrUpdateTextBlocklist_CreateOrUpdateTextBlocklist_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); BlocklistClient client = new BlocklistClient(endpoint, credential); - using RequestContent content = RequestContent.Create(new - { - blocklistName = "", - }); - Response response = await client.CreateOrUpdateTextBlocklistAsync("", content); + using RequestContent content = null; + Response response = await client.CreateOrUpdateTextBlocklistAsync("TestBlocklist", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("blocklistName").ToString()); @@ -224,309 +136,137 @@ public async Task Example_TextBlocklist_CreateOrUpdateTextBlocklist_ShortVersion [Test] [Ignore("Only validating compilation of examples")] - public void Example_TextBlocklist_CreateOrUpdateTextBlocklist_AllParameters() + public void Example_TextBlocklist_DeleteTextBlocklist_DeleteTextBlocklistByBlocklistName() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); BlocklistClient client = new BlocklistClient(endpoint, credential); - using RequestContent content = RequestContent.Create(new - { - blocklistName = "", - description = "", - }); - Response response = client.CreateOrUpdateTextBlocklist("", content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("blocklistName").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_TextBlocklist_CreateOrUpdateTextBlocklist_AllParameters_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - BlocklistClient client = new BlocklistClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - blocklistName = "", - description = "", - }); - Response response = await client.CreateOrUpdateTextBlocklistAsync("", content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("blocklistName").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_TextBlocklist_DeleteTextBlocklist_ShortVersion() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - BlocklistClient client = new BlocklistClient(endpoint, credential); - - Response response = client.DeleteTextBlocklist(""); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_TextBlocklist_DeleteTextBlocklist_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - BlocklistClient client = new BlocklistClient(endpoint, credential); - - Response response = await client.DeleteTextBlocklistAsync(""); + Response response = client.DeleteTextBlocklist("TestBlocklist"); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_TextBlocklist_DeleteTextBlocklist_AllParameters() + public async Task Example_TextBlocklist_DeleteTextBlocklist_DeleteTextBlocklistByBlocklistName_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); BlocklistClient client = new BlocklistClient(endpoint, credential); - Response response = client.DeleteTextBlocklist(""); + Response response = await client.DeleteTextBlocklistAsync("TestBlocklist"); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_TextBlocklist_DeleteTextBlocklist_AllParameters_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - BlocklistClient client = new BlocklistClient(endpoint, credential); - - Response response = await client.DeleteTextBlocklistAsync(""); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_TextBlocklist_GetTextBlocklist_ShortVersion() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - BlocklistClient client = new BlocklistClient(endpoint, credential); - - Response response = client.GetTextBlocklist("", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("blocklistName").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_TextBlocklist_GetTextBlocklist_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - BlocklistClient client = new BlocklistClient(endpoint, credential); - - Response response = await client.GetTextBlocklistAsync("", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("blocklistName").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_TextBlocklist_GetTextBlocklist_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - BlocklistClient client = new BlocklistClient(endpoint, credential); - - Response response = client.GetTextBlocklist(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_TextBlocklist_GetTextBlocklist_ShortVersion_Convenience_Async() + public void Example_TextBlocklist_GetTextBlocklist_GetTextBlocklistByBlocklistName() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); BlocklistClient client = new BlocklistClient(endpoint, credential); - Response response = await client.GetTextBlocklistAsync(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_TextBlocklist_GetTextBlocklist_AllParameters() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - BlocklistClient client = new BlocklistClient(endpoint, credential); - - Response response = client.GetTextBlocklist("", null); + Response response = client.GetTextBlocklist("TestBlocklist", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("blocklistName").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_TextBlocklist_GetTextBlocklist_AllParameters_Async() + public async Task Example_TextBlocklist_GetTextBlocklist_GetTextBlocklistByBlocklistName_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); BlocklistClient client = new BlocklistClient(endpoint, credential); - Response response = await client.GetTextBlocklistAsync("", null); + Response response = await client.GetTextBlocklistAsync("TestBlocklist", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("blocklistName").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_TextBlocklist_GetTextBlocklist_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - BlocklistClient client = new BlocklistClient(endpoint, credential); - - Response response = client.GetTextBlocklist(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_TextBlocklist_GetTextBlocklist_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - BlocklistClient client = new BlocklistClient(endpoint, credential); - - Response response = await client.GetTextBlocklistAsync(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_TextBlocklistItem_GetTextBlocklistItem_ShortVersion() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - BlocklistClient client = new BlocklistClient(endpoint, credential); - - Response response = client.GetTextBlocklistItem("", "", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("blocklistItemId").ToString()); - Console.WriteLine(result.GetProperty("text").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_TextBlocklistItem_GetTextBlocklistItem_ShortVersion_Async() + public void Example_TextBlocklist_GetTextBlocklist_GetTextBlocklistByBlocklistName_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); BlocklistClient client = new BlocklistClient(endpoint, credential); - Response response = await client.GetTextBlocklistItemAsync("", "", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("blocklistItemId").ToString()); - Console.WriteLine(result.GetProperty("text").ToString()); + Response response = client.GetTextBlocklist("TestBlocklist"); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_TextBlocklistItem_GetTextBlocklistItem_ShortVersion_Convenience() + public async Task Example_TextBlocklist_GetTextBlocklist_GetTextBlocklistByBlocklistName_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); BlocklistClient client = new BlocklistClient(endpoint, credential); - Response response = client.GetTextBlocklistItem("", ""); + Response response = await client.GetTextBlocklistAsync("TestBlocklist"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_TextBlocklistItem_GetTextBlocklistItem_ShortVersion_Convenience_Async() + public void Example_TextBlocklistItem_GetTextBlocklistItem_GetBlockItemByBlocklistNameAndBlocklistItemId() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); BlocklistClient client = new BlocklistClient(endpoint, credential); - Response response = await client.GetTextBlocklistItemAsync("", ""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_TextBlocklistItem_GetTextBlocklistItem_AllParameters() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - BlocklistClient client = new BlocklistClient(endpoint, credential); - - Response response = client.GetTextBlocklistItem("", "", null); + Response response = client.GetTextBlocklistItem("TestBlocklist", "9511969e-f1e3-4604-9127-05ee16c509ec", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("blocklistItemId").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("text").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_TextBlocklistItem_GetTextBlocklistItem_AllParameters_Async() + public async Task Example_TextBlocklistItem_GetTextBlocklistItem_GetBlockItemByBlocklistNameAndBlocklistItemId_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); BlocklistClient client = new BlocklistClient(endpoint, credential); - Response response = await client.GetTextBlocklistItemAsync("", "", null); + Response response = await client.GetTextBlocklistItemAsync("TestBlocklist", "9511969e-f1e3-4604-9127-05ee16c509ec", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("blocklistItemId").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("text").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_TextBlocklistItem_GetTextBlocklistItem_AllParameters_Convenience() + public void Example_TextBlocklistItem_GetTextBlocklistItem_GetBlockItemByBlocklistNameAndBlocklistItemId_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); BlocklistClient client = new BlocklistClient(endpoint, credential); - Response response = client.GetTextBlocklistItem("", ""); + Response response = client.GetTextBlocklistItem("TestBlocklist", "9511969e-f1e3-4604-9127-05ee16c509ec"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_TextBlocklistItem_GetTextBlocklistItem_AllParameters_Convenience_Async() + public async Task Example_TextBlocklistItem_GetTextBlocklistItem_GetBlockItemByBlocklistNameAndBlocklistItemId_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); BlocklistClient client = new BlocklistClient(endpoint, credential); - Response response = await client.GetTextBlocklistItemAsync("", ""); + Response response = await client.GetTextBlocklistItemAsync("TestBlocklist", "9511969e-f1e3-4604-9127-05ee16c509ec"); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_BlocklistClient_RemoveBlocklistItems_ShortVersion() + public void Example_BlocklistClient_RemoveBlocklistItems_RemoveBlockItemsFromTextBlocklist() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); BlocklistClient client = new BlocklistClient(endpoint, credential); @@ -534,19 +274,19 @@ public void Example_BlocklistClient_RemoveBlocklistItems_ShortVersion() { blocklistItemIds = new object[] { -"" +"9511969e-f1e3-4604-9127-05ee16c509ec" }, }); - Response response = client.RemoveBlocklistItems("", content); + Response response = client.RemoveBlocklistItems("TestBlocklist", content); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_BlocklistClient_RemoveBlocklistItems_ShortVersion_Async() + public async Task Example_BlocklistClient_RemoveBlocklistItems_RemoveBlockItemsFromTextBlocklist_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); BlocklistClient client = new BlocklistClient(endpoint, credential); @@ -554,111 +294,47 @@ public async Task Example_BlocklistClient_RemoveBlocklistItems_ShortVersion_Asyn { blocklistItemIds = new object[] { -"" +"9511969e-f1e3-4604-9127-05ee16c509ec" }, }); - Response response = await client.RemoveBlocklistItemsAsync("", content); + Response response = await client.RemoveBlocklistItemsAsync("TestBlocklist", content); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_BlocklistClient_RemoveBlocklistItems_ShortVersion_Convenience() + public void Example_BlocklistClient_RemoveBlocklistItems_RemoveBlockItemsFromTextBlocklist_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); BlocklistClient client = new BlocklistClient(endpoint, credential); - RemoveTextBlocklistItemsOptions options = new RemoveTextBlocklistItemsOptions(new string[] { "" }); - Response response = client.RemoveBlocklistItems("", options); + RemoveTextBlocklistItemsOptions options = new RemoveTextBlocklistItemsOptions(new string[] { "9511969e-f1e3-4604-9127-05ee16c509ec" }); + Response response = client.RemoveBlocklistItems("TestBlocklist", options); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_BlocklistClient_RemoveBlocklistItems_ShortVersion_Convenience_Async() + public async Task Example_BlocklistClient_RemoveBlocklistItems_RemoveBlockItemsFromTextBlocklist_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); BlocklistClient client = new BlocklistClient(endpoint, credential); - RemoveTextBlocklistItemsOptions options = new RemoveTextBlocklistItemsOptions(new string[] { "" }); - Response response = await client.RemoveBlocklistItemsAsync("", options); + RemoveTextBlocklistItemsOptions options = new RemoveTextBlocklistItemsOptions(new string[] { "9511969e-f1e3-4604-9127-05ee16c509ec" }); + Response response = await client.RemoveBlocklistItemsAsync("TestBlocklist", options); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_BlocklistClient_RemoveBlocklistItems_AllParameters() + public void Example_TextBlocklistItem_GetTextBlocklistItems_GetAllBlockItemsByBlocklistName() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); BlocklistClient client = new BlocklistClient(endpoint, credential); - using RequestContent content = RequestContent.Create(new - { - blocklistItemIds = new object[] - { -"" - }, - }); - Response response = client.RemoveBlocklistItems("", content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_BlocklistClient_RemoveBlocklistItems_AllParameters_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - BlocklistClient client = new BlocklistClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - blocklistItemIds = new object[] - { -"" - }, - }); - Response response = await client.RemoveBlocklistItemsAsync("", content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_BlocklistClient_RemoveBlocklistItems_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - BlocklistClient client = new BlocklistClient(endpoint, credential); - - RemoveTextBlocklistItemsOptions options = new RemoveTextBlocklistItemsOptions(new string[] { "" }); - Response response = client.RemoveBlocklistItems("", options); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_BlocklistClient_RemoveBlocklistItems_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - BlocklistClient client = new BlocklistClient(endpoint, credential); - - RemoveTextBlocklistItemsOptions options = new RemoveTextBlocklistItemsOptions(new string[] { "" }); - Response response = await client.RemoveBlocklistItemsAsync("", options); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_TextBlocklistItem_GetTextBlocklistItems_ShortVersion() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - BlocklistClient client = new BlocklistClient(endpoint, credential); - - foreach (BinaryData item in client.GetTextBlocklistItems("", null, null, null, null)) + foreach (BinaryData item in client.GetTextBlocklistItems("TestBlocklist", null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("blocklistItemId").ToString()); @@ -668,13 +344,13 @@ public void Example_TextBlocklistItem_GetTextBlocklistItems_ShortVersion() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_TextBlocklistItem_GetTextBlocklistItems_ShortVersion_Async() + public async Task Example_TextBlocklistItem_GetTextBlocklistItems_GetAllBlockItemsByBlocklistName_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); BlocklistClient client = new BlocklistClient(endpoint, credential); - await foreach (BinaryData item in client.GetTextBlocklistItemsAsync("", null, null, null, null)) + await foreach (BinaryData item in client.GetTextBlocklistItemsAsync("TestBlocklist", null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("blocklistItemId").ToString()); @@ -684,151 +360,35 @@ public async Task Example_TextBlocklistItem_GetTextBlocklistItems_ShortVersion_A [Test] [Ignore("Only validating compilation of examples")] - public void Example_TextBlocklistItem_GetTextBlocklistItems_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - BlocklistClient client = new BlocklistClient(endpoint, credential); - - foreach (TextBlocklistItem item in client.GetTextBlocklistItems("")) - { - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_TextBlocklistItem_GetTextBlocklistItems_ShortVersion_Convenience_Async() + public void Example_TextBlocklistItem_GetTextBlocklistItems_GetAllBlockItemsByBlocklistName_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); BlocklistClient client = new BlocklistClient(endpoint, credential); - await foreach (TextBlocklistItem item in client.GetTextBlocklistItemsAsync("")) + foreach (TextBlocklistItem item in client.GetTextBlocklistItems("TestBlocklist")) { } } [Test] [Ignore("Only validating compilation of examples")] - public void Example_TextBlocklistItem_GetTextBlocklistItems_AllParameters() + public async Task Example_TextBlocklistItem_GetTextBlocklistItems_GetAllBlockItemsByBlocklistName_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); BlocklistClient client = new BlocklistClient(endpoint, credential); - foreach (BinaryData item in client.GetTextBlocklistItems("", 1234, 1234, 1234, null)) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("blocklistItemId").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("text").ToString()); - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_TextBlocklistItem_GetTextBlocklistItems_AllParameters_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - BlocklistClient client = new BlocklistClient(endpoint, credential); - - await foreach (BinaryData item in client.GetTextBlocklistItemsAsync("", 1234, 1234, 1234, null)) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("blocklistItemId").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("text").ToString()); - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_TextBlocklistItem_GetTextBlocklistItems_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - BlocklistClient client = new BlocklistClient(endpoint, credential); - - foreach (TextBlocklistItem item in client.GetTextBlocklistItems("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) - { - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_TextBlocklistItem_GetTextBlocklistItems_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - BlocklistClient client = new BlocklistClient(endpoint, credential); - - await foreach (TextBlocklistItem item in client.GetTextBlocklistItemsAsync("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) - { - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_TextBlocklist_GetTextBlocklists_ShortVersion() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - BlocklistClient client = new BlocklistClient(endpoint, credential); - - foreach (BinaryData item in client.GetTextBlocklists(null)) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("blocklistName").ToString()); - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_TextBlocklist_GetTextBlocklists_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - BlocklistClient client = new BlocklistClient(endpoint, credential); - - await foreach (BinaryData item in client.GetTextBlocklistsAsync(null)) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("blocklistName").ToString()); - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_TextBlocklist_GetTextBlocklists_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - BlocklistClient client = new BlocklistClient(endpoint, credential); - - foreach (TextBlocklist item in client.GetTextBlocklists()) - { - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_TextBlocklist_GetTextBlocklists_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - BlocklistClient client = new BlocklistClient(endpoint, credential); - - await foreach (TextBlocklist item in client.GetTextBlocklistsAsync()) + await foreach (TextBlocklistItem item in client.GetTextBlocklistItemsAsync("TestBlocklist")) { } } [Test] [Ignore("Only validating compilation of examples")] - public void Example_TextBlocklist_GetTextBlocklists_AllParameters() + public void Example_TextBlocklist_GetTextBlocklists_GetAllTextBlocklists() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); BlocklistClient client = new BlocklistClient(endpoint, credential); @@ -836,15 +396,14 @@ public void Example_TextBlocklist_GetTextBlocklists_AllParameters() { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("blocklistName").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); } } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_TextBlocklist_GetTextBlocklists_AllParameters_Async() + public async Task Example_TextBlocklist_GetTextBlocklists_GetAllTextBlocklists_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); BlocklistClient client = new BlocklistClient(endpoint, credential); @@ -852,15 +411,14 @@ public async Task Example_TextBlocklist_GetTextBlocklists_AllParameters_Async() { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("blocklistName").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); } } [Test] [Ignore("Only validating compilation of examples")] - public void Example_TextBlocklist_GetTextBlocklists_AllParameters_Convenience() + public void Example_TextBlocklist_GetTextBlocklists_GetAllTextBlocklists_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); BlocklistClient client = new BlocklistClient(endpoint, credential); @@ -871,9 +429,9 @@ public void Example_TextBlocklist_GetTextBlocklists_AllParameters_Convenience() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_TextBlocklist_GetTextBlocklists_AllParameters_Convenience_Async() + public async Task Example_TextBlocklist_GetTextBlocklists_GetAllTextBlocklists_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); BlocklistClient client = new BlocklistClient(endpoint, credential); diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/tests/Generated/Samples/Samples_ContentSafetyClient.cs b/sdk/contentsafety/Azure.AI.ContentSafety/tests/Generated/Samples/Samples_ContentSafetyClient.cs index 1c44aae47ff7..08c06719c611 100644 --- a/sdk/contentsafety/Azure.AI.ContentSafety/tests/Generated/Samples/Samples_ContentSafetyClient.cs +++ b/sdk/contentsafety/Azure.AI.ContentSafety/tests/Generated/Samples/Samples_ContentSafetyClient.cs @@ -18,15 +18,15 @@ public partial class Samples_ContentSafetyClient { [Test] [Ignore("Only validating compilation of examples")] - public void Example_ContentSafetyClient_AnalyzeText_ShortVersion() + public void Example_ContentSafetyClient_AnalyzeText_AnalyzeText() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - text = "", + text = "This is text example", }); Response response = client.AnalyzeText(content); @@ -36,15 +36,15 @@ public void Example_ContentSafetyClient_AnalyzeText_ShortVersion() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_ContentSafetyClient_AnalyzeText_ShortVersion_Async() + public async Task Example_ContentSafetyClient_AnalyzeText_AnalyzeText_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - text = "", + text = "This is text example", }); Response response = await client.AnalyzeTextAsync(content); @@ -54,193 +54,33 @@ public async Task Example_ContentSafetyClient_AnalyzeText_ShortVersion_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_ContentSafetyClient_AnalyzeText_ShortVersion_Convenience() + public void Example_ContentSafetyClient_AnalyzeText_AnalyzeText_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - AnalyzeTextOptions options = new AnalyzeTextOptions(""); + AnalyzeTextOptions options = new AnalyzeTextOptions("This is text example"); Response response = client.AnalyzeText(options); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_ContentSafetyClient_AnalyzeText_ShortVersion_Convenience_Async() + public async Task Example_ContentSafetyClient_AnalyzeText_AnalyzeText_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - AnalyzeTextOptions options = new AnalyzeTextOptions(""); + AnalyzeTextOptions options = new AnalyzeTextOptions("This is text example"); Response response = await client.AnalyzeTextAsync(options); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_ContentSafetyClient_AnalyzeText_AllParameters() + public void Example_ContentSafetyClient_AnalyzeImage_AnalyzeImage() { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - text = "", - categories = new object[] - { -"Hate" - }, - blocklistNames = new object[] - { -"" - }, - haltOnBlocklistHit = true, - outputType = "FourSeverityLevels", - }); - Response response = client.AnalyzeText(content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("blocklistsMatch")[0].GetProperty("blocklistName").ToString()); - Console.WriteLine(result.GetProperty("blocklistsMatch")[0].GetProperty("blocklistItemId").ToString()); - Console.WriteLine(result.GetProperty("blocklistsMatch")[0].GetProperty("blocklistItemText").ToString()); - Console.WriteLine(result.GetProperty("categoriesAnalysis")[0].GetProperty("category").ToString()); - Console.WriteLine(result.GetProperty("categoriesAnalysis")[0].GetProperty("severity").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_ContentSafetyClient_AnalyzeText_AllParameters_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - text = "", - categories = new object[] - { -"Hate" - }, - blocklistNames = new object[] - { -"" - }, - haltOnBlocklistHit = true, - outputType = "FourSeverityLevels", - }); - Response response = await client.AnalyzeTextAsync(content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("blocklistsMatch")[0].GetProperty("blocklistName").ToString()); - Console.WriteLine(result.GetProperty("blocklistsMatch")[0].GetProperty("blocklistItemId").ToString()); - Console.WriteLine(result.GetProperty("blocklistsMatch")[0].GetProperty("blocklistItemText").ToString()); - Console.WriteLine(result.GetProperty("categoriesAnalysis")[0].GetProperty("category").ToString()); - Console.WriteLine(result.GetProperty("categoriesAnalysis")[0].GetProperty("severity").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_ContentSafetyClient_AnalyzeText_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - - AnalyzeTextOptions options = new AnalyzeTextOptions("") - { - Categories = { TextCategory.Hate }, - BlocklistNames = { "" }, - HaltOnBlocklistHit = true, - OutputType = AnalyzeTextOutputType.FourSeverityLevels, - }; - Response response = client.AnalyzeText(options); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_ContentSafetyClient_AnalyzeText_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - - AnalyzeTextOptions options = new AnalyzeTextOptions("") - { - Categories = { TextCategory.Hate }, - BlocklistNames = { "" }, - HaltOnBlocklistHit = true, - OutputType = AnalyzeTextOutputType.FourSeverityLevels, - }; - Response response = await client.AnalyzeTextAsync(options); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_ContentSafetyClient_AnalyzeImage_ShortVersion() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - image = new object(), - }); - Response response = client.AnalyzeImage(content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("categoriesAnalysis")[0].GetProperty("category").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_ContentSafetyClient_AnalyzeImage_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - image = new object(), - }); - Response response = await client.AnalyzeImageAsync(content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("categoriesAnalysis")[0].GetProperty("category").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_ContentSafetyClient_AnalyzeImage_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - - AnalyzeImageOptions options = new AnalyzeImageOptions(new ContentSafetyImageData()); - Response response = client.AnalyzeImage(options); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_ContentSafetyClient_AnalyzeImage_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - - AnalyzeImageOptions options = new AnalyzeImageOptions(new ContentSafetyImageData()); - Response response = await client.AnalyzeImageAsync(options); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_ContentSafetyClient_AnalyzeImage_AllParameters() - { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); @@ -248,27 +88,20 @@ public void Example_ContentSafetyClient_AnalyzeImage_AllParameters() { image = new { - content = new object(), - blobUrl = "http://localhost:3000", + content = "Y29udGVudDE=", }, - categories = new object[] - { -"Hate" - }, - outputType = "FourSeverityLevels", }); Response response = client.AnalyzeImage(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("categoriesAnalysis")[0].GetProperty("category").ToString()); - Console.WriteLine(result.GetProperty("categoriesAnalysis")[0].GetProperty("severity").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_ContentSafetyClient_AnalyzeImage_AllParameters_Async() + public async Task Example_ContentSafetyClient_AnalyzeImage_AnalyzeImage_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); @@ -276,51 +109,36 @@ public async Task Example_ContentSafetyClient_AnalyzeImage_AllParameters_Async() { image = new { - content = new object(), - blobUrl = "http://localhost:3000", + content = "Y29udGVudDE=", }, - categories = new object[] - { -"Hate" - }, - outputType = "FourSeverityLevels", }); Response response = await client.AnalyzeImageAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("categoriesAnalysis")[0].GetProperty("category").ToString()); - Console.WriteLine(result.GetProperty("categoriesAnalysis")[0].GetProperty("severity").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_ContentSafetyClient_AnalyzeImage_AllParameters_Convenience() + public void Example_ContentSafetyClient_AnalyzeImage_AnalyzeImage_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - AnalyzeImageOptions options = new AnalyzeImageOptions(new ContentSafetyImageData()) - { - Categories = { ImageCategory.Hate }, - OutputType = AnalyzeImageOutputType.FourSeverityLevels, - }; + AnalyzeImageOptions options = new AnalyzeImageOptions(new ContentSafetyImageData()); Response response = client.AnalyzeImage(options); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_ContentSafetyClient_AnalyzeImage_AllParameters_Convenience_Async() + public async Task Example_ContentSafetyClient_AnalyzeImage_AnalyzeImage_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - AnalyzeImageOptions options = new AnalyzeImageOptions(new ContentSafetyImageData()) - { - Categories = { ImageCategory.Hate }, - OutputType = AnalyzeImageOutputType.FourSeverityLevels, - }; + AnalyzeImageOptions options = new AnalyzeImageOptions(new ContentSafetyImageData()); Response response = await client.AnalyzeImageAsync(options); } } diff --git a/sdk/devcenter/Azure.Developer.DevCenter/api/Azure.Developer.DevCenter.netstandard2.0.cs b/sdk/devcenter/Azure.Developer.DevCenter/api/Azure.Developer.DevCenter.netstandard2.0.cs index e4a45c551c81..8eb054972a63 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/api/Azure.Developer.DevCenter.netstandard2.0.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/api/Azure.Developer.DevCenter.netstandard2.0.cs @@ -240,7 +240,7 @@ internal DevBoxActionDelayResult() { } } public partial class DevBoxHardwareProfile : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - internal DevBoxHardwareProfile() { } + public DevBoxHardwareProfile() { } public int? MemoryGB { get { throw null; } } public Azure.Developer.DevCenter.Models.SkuName? SkuName { get { throw null; } } public int? VCPUs { get { throw null; } } @@ -252,7 +252,7 @@ internal DevBoxHardwareProfile() { } } public partial class DevBoxImageReference : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - internal DevBoxImageReference() { } + public DevBoxImageReference() { } public string Name { get { throw null; } } public string OperatingSystem { get { throw null; } } public string OSBuildNumber { get { throw null; } } @@ -354,8 +354,8 @@ internal DevBoxSchedule() { } } public partial class DevBoxStorageProfile : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - internal DevBoxStorageProfile() { } - public Azure.Developer.DevCenter.Models.OSDisk OSDisk { get { throw null; } } + public DevBoxStorageProfile() { } + public Azure.Developer.DevCenter.Models.OSDisk OSDisk { get { throw null; } set { } } Azure.Developer.DevCenter.Models.DevBoxStorageProfile System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Developer.DevCenter.Models.DevBoxStorageProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -576,7 +576,7 @@ internal EnvironmentDefinitionParameter() { } } public partial class OSDisk : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - internal OSDisk() { } + public OSDisk() { } public int? DiskSizeGB { get { throw null; } } Azure.Developer.DevCenter.Models.OSDisk System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Custom/DevCenterModelFactory.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Custom/DevCenterModelFactory.cs index 20f948a22b57..aa98623e9f24 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Custom/DevCenterModelFactory.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Custom/DevCenterModelFactory.cs @@ -8,5 +8,12 @@ namespace Azure.Developer.DevCenter.Models [CodeGenClient("DeveloperDevCenterModelFactory")] public static partial class DevCenterModelFactory { + /// Initializes a new instance of . + /// Settings for the operating system disk. + /// A new instance for mocking. + public static DevBoxStorageProfile DevBoxStorageProfile(OSDisk osDisk = null) + { + return new DevBoxStorageProfile(osDisk, serializedAdditionalRawData: null); + } } } diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/DevCenterModelFactory.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/DevCenterModelFactory.cs index ee046a85e234..ea10b8dc1251 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/DevCenterModelFactory.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/DevCenterModelFactory.cs @@ -28,54 +28,37 @@ public static DevCenterProject DevCenterProject(string name = null, string descr return new DevCenterProject(name, description, maxDevBoxesPerUser, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// Display name for the Dev Box. - /// Name of the project this Dev Box belongs to. - /// The name of the Dev Box pool this machine belongs to. + /// Initializes a new instance of . + /// Pool name. + /// Azure region where Dev Boxes in the pool are located. + /// The operating system type of Dev Boxes in this pool. + /// Hardware settings for the Dev Boxes created in this pool. /// Indicates whether hibernate is enabled/disabled or unknown. - /// The current provisioning state of the Dev Box. - /// - /// The current action state of the Dev Box. This is state is based on previous - /// action performed by user. - /// - /// The current power state of the Dev Box. - /// - /// A unique identifier for the Dev Box. This is a GUID-formatted string (e.g. - /// 00000000-0000-0000-0000-000000000000). + /// Storage settings for Dev Box created in this pool. + /// Image settings for Dev Boxes create in this pool. + /// + /// Indicates whether owners of Dev Boxes in this pool are local administrators on + /// the Dev Boxes. /// - /// Provisioning or action error details. Populated only for error states. - /// - /// Azure region where this Dev Box is located. This will be the same region as the - /// Virtual Network it is attached to. + /// Stop on disconnect configuration settings for Dev Boxes created in this pool. + /// + /// Overall health status of the Pool. Indicates whether or not the Pool is + /// available to create Dev Boxes. /// - /// The operating system type of this Dev Box. - /// The AAD object id of the user this Dev Box is assigned to. - /// Information about the Dev Box's hardware resources. - /// Storage settings for this Dev Box. - /// Information about the image used for this Dev Box. - /// Creation time of this Dev Box. - /// Indicates whether the owner of the Dev Box is a local administrator. - /// A new instance for mocking. - public static DevBox DevBox(string name = null, string projectName = null, string poolName = null, HibernateSupport? hibernateSupport = null, DevBoxProvisioningState? provisioningState = null, string actionState = null, PowerState? powerState = null, Guid? uniqueId = null, ResponseError error = null, AzureLocation? location = null, DevBoxOSType? osType = null, Guid? userId = null, DevBoxHardwareProfile hardwareProfile = null, DevBoxStorageProfile storageProfile = null, DevBoxImageReference imageReference = null, DateTimeOffset? createdTime = null, LocalAdministratorStatus? localAdministratorStatus = null) + /// A new instance for mocking. + public static DevBoxPool DevBoxPool(string name = null, AzureLocation location = default, DevBoxOSType? osType = null, DevBoxHardwareProfile hardwareProfile = null, HibernateSupport? hibernateSupport = null, DevBoxStorageProfile storageProfile = null, DevBoxImageReference imageReference = null, LocalAdministratorStatus? localAdministratorStatus = null, StopOnDisconnectConfiguration stopOnDisconnect = null, PoolHealthStatus healthStatus = default) { - return new DevBox( + return new DevBoxPool( name, - projectName, - poolName, - hibernateSupport, - provisioningState, - actionState, - powerState, - uniqueId, - error, location, osType, - userId, hardwareProfile, + hibernateSupport, storageProfile, imageReference, - createdTime, localAdministratorStatus, + stopOnDisconnect, + healthStatus, serializedAdditionalRawData: null); } @@ -89,14 +72,6 @@ public static DevBoxHardwareProfile DevBoxHardwareProfile(SkuName? skuName = nul return new DevBoxHardwareProfile(skuName, vcpUs, memoryGB, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// Settings for the operating system disk. - /// A new instance for mocking. - public static DevBoxStorageProfile DevBoxStorageProfile(OSDisk osDisk = null) - { - return new DevBoxStorageProfile(osDisk, serializedAdditionalRawData: null); - } - /// Initializes a new instance of . /// The size of the OS Disk in gigabytes. /// A new instance for mocking. @@ -123,40 +98,6 @@ public static DevBoxImageReference DevBoxImageReference(string name = null, stri serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// Pool name. - /// Azure region where Dev Boxes in the pool are located. - /// The operating system type of Dev Boxes in this pool. - /// Hardware settings for the Dev Boxes created in this pool. - /// Indicates whether hibernate is enabled/disabled or unknown. - /// Storage settings for Dev Box created in this pool. - /// Image settings for Dev Boxes create in this pool. - /// - /// Indicates whether owners of Dev Boxes in this pool are local administrators on - /// the Dev Boxes. - /// - /// Stop on disconnect configuration settings for Dev Boxes created in this pool. - /// - /// Overall health status of the Pool. Indicates whether or not the Pool is - /// available to create Dev Boxes. - /// - /// A new instance for mocking. - public static DevBoxPool DevBoxPool(string name = null, AzureLocation location = default, DevBoxOSType? osType = null, DevBoxHardwareProfile hardwareProfile = null, HibernateSupport? hibernateSupport = null, DevBoxStorageProfile storageProfile = null, DevBoxImageReference imageReference = null, LocalAdministratorStatus? localAdministratorStatus = null, StopOnDisconnectConfiguration stopOnDisconnect = null, PoolHealthStatus healthStatus = default) - { - return new DevBoxPool( - name, - location, - osType, - hardwareProfile, - hibernateSupport, - storageProfile, - imageReference, - localAdministratorStatus, - stopOnDisconnect, - healthStatus, - serializedAdditionalRawData: null); - } - /// Initializes a new instance of . /// /// Indicates whether the feature to stop the devbox on disconnect once the grace @@ -190,6 +131,57 @@ public static DevBoxSchedule DevBoxSchedule(string name = null, ScheduleType sch serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// Display name for the Dev Box. + /// Name of the project this Dev Box belongs to. + /// The name of the Dev Box pool this machine belongs to. + /// Indicates whether hibernate is enabled/disabled or unknown. + /// The current provisioning state of the Dev Box. + /// + /// The current action state of the Dev Box. This is state is based on previous + /// action performed by user. + /// + /// The current power state of the Dev Box. + /// + /// A unique identifier for the Dev Box. This is a GUID-formatted string (e.g. + /// 00000000-0000-0000-0000-000000000000). + /// + /// Provisioning or action error details. Populated only for error states. + /// + /// Azure region where this Dev Box is located. This will be the same region as the + /// Virtual Network it is attached to. + /// + /// The operating system type of this Dev Box. + /// The AAD object id of the user this Dev Box is assigned to. + /// Information about the Dev Box's hardware resources. + /// Storage settings for this Dev Box. + /// Information about the image used for this Dev Box. + /// Creation time of this Dev Box. + /// Indicates whether the owner of the Dev Box is a local administrator. + /// A new instance for mocking. + public static DevBox DevBox(string name = null, string projectName = null, string poolName = null, HibernateSupport? hibernateSupport = null, DevBoxProvisioningState? provisioningState = null, string actionState = null, PowerState? powerState = null, Guid? uniqueId = null, ResponseError error = null, AzureLocation? location = null, DevBoxOSType? osType = null, Guid? userId = null, DevBoxHardwareProfile hardwareProfile = null, DevBoxStorageProfile storageProfile = null, DevBoxImageReference imageReference = null, DateTimeOffset? createdTime = null, LocalAdministratorStatus? localAdministratorStatus = null) + { + return new DevBox( + name, + projectName, + poolName, + hibernateSupport, + provisioningState, + actionState, + powerState, + uniqueId, + error, + location, + osType, + userId, + hardwareProfile, + storageProfile, + imageReference, + createdTime, + localAdministratorStatus, + serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// URL to open a browser based RDP session. /// Link to open a Remote Desktop session. diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Docs/DeploymentEnvironmentsClient.xml b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Docs/DeploymentEnvironmentsClient.xml index 4cab4d449bb5..e78f5f5dcfad 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Docs/DeploymentEnvironmentsClient.xml +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Docs/DeploymentEnvironmentsClient.xml @@ -5,176 +5,89 @@ This sample shows how to call GetEnvironmentAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); -Response response = await client.GetEnvironmentAsync("", "", ""); -]]> -This sample shows how to call GetEnvironmentAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - -Response response = await client.GetEnvironmentAsync("", "", ""); +Response response = await client.GetEnvironmentAsync("myProject", "me", "mydevenv"); ]]> This sample shows how to call GetEnvironment. "); -TokenCredential credential = new DefaultAzureCredential(); -DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - -Response response = client.GetEnvironment("", "", ""); -]]> -This sample shows how to call GetEnvironment with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); -Response response = client.GetEnvironment("", "", ""); +Response response = client.GetEnvironment("myProject", "me", "mydevenv"); ]]> This sample shows how to call GetEnvironmentAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); -Response response = await client.GetEnvironmentAsync("", "", "", null); +Response response = await client.GetEnvironmentAsync("myProject", "me", "mydevenv", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("environmentType").ToString()); Console.WriteLine(result.GetProperty("catalogName").ToString()); Console.WriteLine(result.GetProperty("environmentDefinitionName").ToString()); -]]> -This sample shows how to call GetEnvironmentAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - -Response response = await client.GetEnvironmentAsync("", "", "", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("parameters").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("environmentType").ToString()); -Console.WriteLine(result.GetProperty("user").ToString()); -Console.WriteLine(result.GetProperty("provisioningState").ToString()); -Console.WriteLine(result.GetProperty("resourceGroupId").ToString()); -Console.WriteLine(result.GetProperty("catalogName").ToString()); -Console.WriteLine(result.GetProperty("environmentDefinitionName").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); ]]> This sample shows how to call GetEnvironment and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - -Response response = client.GetEnvironment("", "", "", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("environmentType").ToString()); -Console.WriteLine(result.GetProperty("catalogName").ToString()); -Console.WriteLine(result.GetProperty("environmentDefinitionName").ToString()); -]]> -This sample shows how to call GetEnvironment with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); -Response response = client.GetEnvironment("", "", "", null); +Response response = client.GetEnvironment("myProject", "me", "mydevenv", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("parameters").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("environmentType").ToString()); -Console.WriteLine(result.GetProperty("user").ToString()); -Console.WriteLine(result.GetProperty("provisioningState").ToString()); -Console.WriteLine(result.GetProperty("resourceGroupId").ToString()); Console.WriteLine(result.GetProperty("catalogName").ToString()); Console.WriteLine(result.GetProperty("environmentDefinitionName").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); ]]> This sample shows how to call GetCatalogAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); -Response response = await client.GetCatalogAsync("", ""); -]]> -This sample shows how to call GetCatalogAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - -Response response = await client.GetCatalogAsync("", ""); +Response response = await client.GetCatalogAsync("myProject", "foo"); ]]> This sample shows how to call GetCatalog. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); -Response response = client.GetCatalog("", ""); -]]> -This sample shows how to call GetCatalog with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - -Response response = client.GetCatalog("", ""); +Response response = client.GetCatalog("myProject", "foo"); ]]> This sample shows how to call GetCatalogAsync and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - -Response response = await client.GetCatalogAsync("", "", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("name").ToString()); -]]> -This sample shows how to call GetCatalogAsync with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); -Response response = await client.GetCatalogAsync("", "", null); +Response response = await client.GetCatalogAsync("myProject", "foo", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); @@ -184,22 +97,11 @@ Console.WriteLine(result.GetProperty("name").ToString()); This sample shows how to call GetCatalog and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); -Response response = client.GetCatalog("", "", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("name").ToString()); -]]> -This sample shows how to call GetCatalog with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - -Response response = client.GetCatalog("", "", null); +Response response = client.GetCatalog("myProject", "foo", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); @@ -209,139 +111,65 @@ Console.WriteLine(result.GetProperty("name").ToString()); This sample shows how to call GetEnvironmentDefinitionAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); -Response response = await client.GetEnvironmentDefinitionAsync("", "", ""); -]]> -This sample shows how to call GetEnvironmentDefinitionAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - -Response response = await client.GetEnvironmentDefinitionAsync("", "", ""); +Response response = await client.GetEnvironmentDefinitionAsync("myProject", "myCatalog", "foo"); ]]> This sample shows how to call GetEnvironmentDefinition. "); -TokenCredential credential = new DefaultAzureCredential(); -DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - -Response response = client.GetEnvironmentDefinition("", "", ""); -]]> -This sample shows how to call GetEnvironmentDefinition with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); -Response response = client.GetEnvironmentDefinition("", "", ""); +Response response = client.GetEnvironmentDefinition("myProject", "myCatalog", "foo"); ]]> This sample shows how to call GetEnvironmentDefinitionAsync and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - -Response response = await client.GetEnvironmentDefinitionAsync("", "", "", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("catalogName").ToString()); -]]> -This sample shows how to call GetEnvironmentDefinitionAsync with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); -Response response = await client.GetEnvironmentDefinitionAsync("", "", "", null); +Response response = await client.GetEnvironmentDefinitionAsync("myProject", "myCatalog", "foo", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("catalogName").ToString()); -Console.WriteLine(result.GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("default").ToString()); -Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("readOnly").ToString()); -Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("required").ToString()); -Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("allowed")[0].ToString()); -Console.WriteLine(result.GetProperty("parametersSchema").ToString()); -Console.WriteLine(result.GetProperty("templatePath").ToString()); ]]> This sample shows how to call GetEnvironmentDefinition and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - -Response response = client.GetEnvironmentDefinition("", "", "", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("catalogName").ToString()); -]]> -This sample shows how to call GetEnvironmentDefinition with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); -Response response = client.GetEnvironmentDefinition("", "", "", null); +Response response = client.GetEnvironmentDefinition("myProject", "myCatalog", "foo", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("catalogName").ToString()); -Console.WriteLine(result.GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("default").ToString()); -Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("readOnly").ToString()); -Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("required").ToString()); -Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("allowed")[0].ToString()); -Console.WriteLine(result.GetProperty("parametersSchema").ToString()); -Console.WriteLine(result.GetProperty("templatePath").ToString()); ]]> This sample shows how to call GetAllEnvironmentsAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); -await foreach (DevCenterEnvironment item in client.GetAllEnvironmentsAsync("")) -{ -} -]]> -This sample shows how to call GetAllEnvironmentsAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - -await foreach (DevCenterEnvironment item in client.GetAllEnvironmentsAsync("")) +await foreach (DevCenterEnvironment item in client.GetAllEnvironmentsAsync("myProject")) { } ]]> @@ -350,21 +178,11 @@ await foreach (DevCenterEnvironment item in client.GetAllEnvironmentsAsync(" This sample shows how to call GetAllEnvironments. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); -foreach (DevCenterEnvironment item in client.GetAllEnvironments("")) -{ -} -]]> -This sample shows how to call GetAllEnvironments with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - -foreach (DevCenterEnvironment item in client.GetAllEnvironments("")) +foreach (DevCenterEnvironment item in client.GetAllEnvironments("myProject")) { } ]]> @@ -373,40 +191,17 @@ foreach (DevCenterEnvironment item in client.GetAllEnvironments("") This sample shows how to call GetAllEnvironmentsAsync and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - -await foreach (BinaryData item in client.GetAllEnvironmentsAsync("", null)) -{ - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("environmentType").ToString()); - Console.WriteLine(result.GetProperty("catalogName").ToString()); - Console.WriteLine(result.GetProperty("environmentDefinitionName").ToString()); -} -]]> -This sample shows how to call GetAllEnvironmentsAsync with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); -await foreach (BinaryData item in client.GetAllEnvironmentsAsync("", null)) +await foreach (BinaryData item in client.GetAllEnvironmentsAsync("myProject", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("parameters").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("environmentType").ToString()); - Console.WriteLine(result.GetProperty("user").ToString()); - Console.WriteLine(result.GetProperty("provisioningState").ToString()); - Console.WriteLine(result.GetProperty("resourceGroupId").ToString()); Console.WriteLine(result.GetProperty("catalogName").ToString()); Console.WriteLine(result.GetProperty("environmentDefinitionName").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); } ]]> @@ -414,11 +209,11 @@ await foreach (BinaryData item in client.GetAllEnvironmentsAsync("" This sample shows how to call GetAllEnvironments and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); -foreach (BinaryData item in client.GetAllEnvironments("", null)) +foreach (BinaryData item in client.GetAllEnvironments("myProject", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); @@ -426,50 +221,17 @@ foreach (BinaryData item in client.GetAllEnvironments("", null)) Console.WriteLine(result.GetProperty("catalogName").ToString()); Console.WriteLine(result.GetProperty("environmentDefinitionName").ToString()); } -]]> -This sample shows how to call GetAllEnvironments with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - -foreach (BinaryData item in client.GetAllEnvironments("", null)) -{ - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("parameters").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("environmentType").ToString()); - Console.WriteLine(result.GetProperty("user").ToString()); - Console.WriteLine(result.GetProperty("provisioningState").ToString()); - Console.WriteLine(result.GetProperty("resourceGroupId").ToString()); - Console.WriteLine(result.GetProperty("catalogName").ToString()); - Console.WriteLine(result.GetProperty("environmentDefinitionName").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); -} ]]> This sample shows how to call GetEnvironmentsAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - -await foreach (DevCenterEnvironment item in client.GetEnvironmentsAsync("", "")) -{ -} -]]> -This sample shows how to call GetEnvironmentsAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); -await foreach (DevCenterEnvironment item in client.GetEnvironmentsAsync("", "")) +await foreach (DevCenterEnvironment item in client.GetEnvironmentsAsync("myProject", "me")) { } ]]> @@ -478,21 +240,11 @@ await foreach (DevCenterEnvironment item in client.GetEnvironmentsAsync(" This sample shows how to call GetEnvironments. "); -TokenCredential credential = new DefaultAzureCredential(); -DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - -foreach (DevCenterEnvironment item in client.GetEnvironments("", "")) -{ -} -]]> -This sample shows how to call GetEnvironments with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); -foreach (DevCenterEnvironment item in client.GetEnvironments("", "")) +foreach (DevCenterEnvironment item in client.GetEnvironments("myProject", "me")) { } ]]> @@ -501,40 +253,17 @@ foreach (DevCenterEnvironment item in client.GetEnvironments("", "< This sample shows how to call GetEnvironmentsAsync and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - -await foreach (BinaryData item in client.GetEnvironmentsAsync("", "", null)) -{ - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("environmentType").ToString()); - Console.WriteLine(result.GetProperty("catalogName").ToString()); - Console.WriteLine(result.GetProperty("environmentDefinitionName").ToString()); -} -]]> -This sample shows how to call GetEnvironmentsAsync with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); -await foreach (BinaryData item in client.GetEnvironmentsAsync("", "", null)) +await foreach (BinaryData item in client.GetEnvironmentsAsync("myProject", "me", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("parameters").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("environmentType").ToString()); - Console.WriteLine(result.GetProperty("user").ToString()); - Console.WriteLine(result.GetProperty("provisioningState").ToString()); - Console.WriteLine(result.GetProperty("resourceGroupId").ToString()); Console.WriteLine(result.GetProperty("catalogName").ToString()); Console.WriteLine(result.GetProperty("environmentDefinitionName").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); } ]]> @@ -542,11 +271,11 @@ await foreach (BinaryData item in client.GetEnvironmentsAsync("", " This sample shows how to call GetEnvironments and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); -foreach (BinaryData item in client.GetEnvironments("", "", null)) +foreach (BinaryData item in client.GetEnvironments("myProject", "me", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); @@ -554,50 +283,17 @@ foreach (BinaryData item in client.GetEnvironments("", "", Console.WriteLine(result.GetProperty("catalogName").ToString()); Console.WriteLine(result.GetProperty("environmentDefinitionName").ToString()); } -]]> -This sample shows how to call GetEnvironments with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - -foreach (BinaryData item in client.GetEnvironments("", "", null)) -{ - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("parameters").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("environmentType").ToString()); - Console.WriteLine(result.GetProperty("user").ToString()); - Console.WriteLine(result.GetProperty("provisioningState").ToString()); - Console.WriteLine(result.GetProperty("resourceGroupId").ToString()); - Console.WriteLine(result.GetProperty("catalogName").ToString()); - Console.WriteLine(result.GetProperty("environmentDefinitionName").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); -} ]]> This sample shows how to call GetCatalogsAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); -await foreach (DevCenterCatalog item in client.GetCatalogsAsync("")) -{ -} -]]> -This sample shows how to call GetCatalogsAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - -await foreach (DevCenterCatalog item in client.GetCatalogsAsync("")) +await foreach (DevCenterCatalog item in client.GetCatalogsAsync("myProject")) { } ]]> @@ -606,21 +302,11 @@ await foreach (DevCenterCatalog item in client.GetCatalogsAsync("") This sample shows how to call GetCatalogs. "); -TokenCredential credential = new DefaultAzureCredential(); -DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - -foreach (DevCenterCatalog item in client.GetCatalogs("")) -{ -} -]]> -This sample shows how to call GetCatalogs with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); -foreach (DevCenterCatalog item in client.GetCatalogs("")) +foreach (DevCenterCatalog item in client.GetCatalogs("myProject")) { } ]]> @@ -629,23 +315,11 @@ foreach (DevCenterCatalog item in client.GetCatalogs("")) This sample shows how to call GetCatalogsAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); -await foreach (BinaryData item in client.GetCatalogsAsync("", null)) -{ - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); -} -]]> -This sample shows how to call GetCatalogsAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - -await foreach (BinaryData item in client.GetCatalogsAsync("", null)) +await foreach (BinaryData item in client.GetCatalogsAsync("myProject", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); @@ -656,23 +330,11 @@ await foreach (BinaryData item in client.GetCatalogsAsync("", null) This sample shows how to call GetCatalogs and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - -foreach (BinaryData item in client.GetCatalogs("", null)) -{ - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); -} -]]> -This sample shows how to call GetCatalogs with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); -foreach (BinaryData item in client.GetCatalogs("", null)) +foreach (BinaryData item in client.GetCatalogs("myProject", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); @@ -683,21 +345,11 @@ foreach (BinaryData item in client.GetCatalogs("", null)) This sample shows how to call GetEnvironmentDefinitionsAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - -await foreach (EnvironmentDefinition item in client.GetEnvironmentDefinitionsAsync("")) -{ -} -]]> -This sample shows how to call GetEnvironmentDefinitionsAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); -await foreach (EnvironmentDefinition item in client.GetEnvironmentDefinitionsAsync("")) +await foreach (EnvironmentDefinition item in client.GetEnvironmentDefinitionsAsync("myProject")) { } ]]> @@ -706,21 +358,11 @@ await foreach (EnvironmentDefinition item in client.GetEnvironmentDefinitionsAsy This sample shows how to call GetEnvironmentDefinitions. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); -foreach (EnvironmentDefinition item in client.GetEnvironmentDefinitions("")) -{ -} -]]> -This sample shows how to call GetEnvironmentDefinitions with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - -foreach (EnvironmentDefinition item in client.GetEnvironmentDefinitions("")) +foreach (EnvironmentDefinition item in client.GetEnvironmentDefinitions("myProject")) { } ]]> @@ -729,41 +371,16 @@ foreach (EnvironmentDefinition item in client.GetEnvironmentDefinitions(" This sample shows how to call GetEnvironmentDefinitionsAsync and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - -await foreach (BinaryData item in client.GetEnvironmentDefinitionsAsync("", null)) -{ - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("catalogName").ToString()); -} -]]> -This sample shows how to call GetEnvironmentDefinitionsAsync with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); -await foreach (BinaryData item in client.GetEnvironmentDefinitionsAsync("", null)) +await foreach (BinaryData item in client.GetEnvironmentDefinitionsAsync("myProject", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("catalogName").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("default").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("readOnly").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("required").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("allowed")[0].ToString()); - Console.WriteLine(result.GetProperty("parametersSchema").ToString()); - Console.WriteLine(result.GetProperty("templatePath").ToString()); } ]]> @@ -771,63 +388,28 @@ await foreach (BinaryData item in client.GetEnvironmentDefinitionsAsync(" This sample shows how to call GetEnvironmentDefinitions and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); -foreach (BinaryData item in client.GetEnvironmentDefinitions("", null)) +foreach (BinaryData item in client.GetEnvironmentDefinitions("myProject", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("catalogName").ToString()); } -]]> -This sample shows how to call GetEnvironmentDefinitions with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - -foreach (BinaryData item in client.GetEnvironmentDefinitions("", null)) -{ - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("catalogName").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("default").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("readOnly").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("required").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("allowed")[0].ToString()); - Console.WriteLine(result.GetProperty("parametersSchema").ToString()); - Console.WriteLine(result.GetProperty("templatePath").ToString()); -} ]]> This sample shows how to call GetEnvironmentDefinitionsByCatalogAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - -await foreach (EnvironmentDefinition item in client.GetEnvironmentDefinitionsByCatalogAsync("", "")) -{ -} -]]> -This sample shows how to call GetEnvironmentDefinitionsByCatalogAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); -await foreach (EnvironmentDefinition item in client.GetEnvironmentDefinitionsByCatalogAsync("", "")) +await foreach (EnvironmentDefinition item in client.GetEnvironmentDefinitionsByCatalogAsync("myProject", "myCatalog")) { } ]]> @@ -836,21 +418,11 @@ await foreach (EnvironmentDefinition item in client.GetEnvironmentDefinitionsByC This sample shows how to call GetEnvironmentDefinitionsByCatalog. "); -TokenCredential credential = new DefaultAzureCredential(); -DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - -foreach (EnvironmentDefinition item in client.GetEnvironmentDefinitionsByCatalog("", "")) -{ -} -]]> -This sample shows how to call GetEnvironmentDefinitionsByCatalog with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); -foreach (EnvironmentDefinition item in client.GetEnvironmentDefinitionsByCatalog("", "")) +foreach (EnvironmentDefinition item in client.GetEnvironmentDefinitionsByCatalog("myProject", "myCatalog")) { } ]]> @@ -859,83 +431,33 @@ foreach (EnvironmentDefinition item in client.GetEnvironmentDefinitionsByCatalog This sample shows how to call GetEnvironmentDefinitionsByCatalogAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); -await foreach (BinaryData item in client.GetEnvironmentDefinitionsByCatalogAsync("", "", null)) +await foreach (BinaryData item in client.GetEnvironmentDefinitionsByCatalogAsync("myProject", "myCatalog", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("catalogName").ToString()); } -]]> -This sample shows how to call GetEnvironmentDefinitionsByCatalogAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - -await foreach (BinaryData item in client.GetEnvironmentDefinitionsByCatalogAsync("", "", null)) -{ - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("catalogName").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("default").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("readOnly").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("required").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("allowed")[0].ToString()); - Console.WriteLine(result.GetProperty("parametersSchema").ToString()); - Console.WriteLine(result.GetProperty("templatePath").ToString()); -} ]]> This sample shows how to call GetEnvironmentDefinitionsByCatalog and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - -foreach (BinaryData item in client.GetEnvironmentDefinitionsByCatalog("", "", null)) -{ - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("catalogName").ToString()); -} -]]> -This sample shows how to call GetEnvironmentDefinitionsByCatalog with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); -foreach (BinaryData item in client.GetEnvironmentDefinitionsByCatalog("", "", null)) +foreach (BinaryData item in client.GetEnvironmentDefinitionsByCatalog("myProject", "myCatalog", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("catalogName").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("default").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("readOnly").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("required").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("allowed")[0].ToString()); - Console.WriteLine(result.GetProperty("parametersSchema").ToString()); - Console.WriteLine(result.GetProperty("templatePath").ToString()); } ]]> @@ -943,21 +465,11 @@ foreach (BinaryData item in client.GetEnvironmentDefinitionsByCatalog(" This sample shows how to call GetEnvironmentTypesAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); -await foreach (DevCenterEnvironmentType item in client.GetEnvironmentTypesAsync("")) -{ -} -]]> -This sample shows how to call GetEnvironmentTypesAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - -await foreach (DevCenterEnvironmentType item in client.GetEnvironmentTypesAsync("")) +await foreach (DevCenterEnvironmentType item in client.GetEnvironmentTypesAsync("myProject")) { } ]]> @@ -966,21 +478,11 @@ await foreach (DevCenterEnvironmentType item in client.GetEnvironmentTypesAsync( This sample shows how to call GetEnvironmentTypes. "); -TokenCredential credential = new DefaultAzureCredential(); -DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - -foreach (DevCenterEnvironmentType item in client.GetEnvironmentTypes("")) -{ -} -]]> -This sample shows how to call GetEnvironmentTypes with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); -foreach (DevCenterEnvironmentType item in client.GetEnvironmentTypes("")) +foreach (DevCenterEnvironmentType item in client.GetEnvironmentTypes("myProject")) { } ]]> @@ -989,25 +491,11 @@ foreach (DevCenterEnvironmentType item in client.GetEnvironmentTypes(" This sample shows how to call GetEnvironmentTypesAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); -await foreach (BinaryData item in client.GetEnvironmentTypesAsync("", null)) -{ - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("deploymentTargetId").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); -} -]]> -This sample shows how to call GetEnvironmentTypesAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - -await foreach (BinaryData item in client.GetEnvironmentTypesAsync("", null)) +await foreach (BinaryData item in client.GetEnvironmentTypesAsync("myProject", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); @@ -1020,25 +508,11 @@ await foreach (BinaryData item in client.GetEnvironmentTypesAsync(" This sample shows how to call GetEnvironmentTypes and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - -foreach (BinaryData item in client.GetEnvironmentTypes("", null)) -{ - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("deploymentTargetId").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); -} -]]> -This sample shows how to call GetEnvironmentTypes with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); -foreach (BinaryData item in client.GetEnvironmentTypes("", null)) +foreach (BinaryData item in client.GetEnvironmentTypes("myProject", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); @@ -1051,152 +525,80 @@ foreach (BinaryData item in client.GetEnvironmentTypes("", null)) This sample shows how to call CreateOrUpdateEnvironmentAsync and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - environmentType = "", - catalogName = "", - environmentDefinitionName = "", -}); -Operation operation = await client.CreateOrUpdateEnvironmentAsync(WaitUntil.Completed, "", "", "", content); -BinaryData responseData = operation.Value; - -JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("environmentType").ToString()); -Console.WriteLine(result.GetProperty("catalogName").ToString()); -Console.WriteLine(result.GetProperty("environmentDefinitionName").ToString()); -]]> -This sample shows how to call CreateOrUpdateEnvironmentAsync with all parameters and request content and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { + environmentType = "DevTest", + catalogName = "main", + environmentDefinitionName = "helloworld", parameters = new { - key = new object(), + functionAppRuntime = "node", + storageAccountType = "Standard_LRS", }, - environmentType = "", - catalogName = "", - environmentDefinitionName = "", }); -Operation operation = await client.CreateOrUpdateEnvironmentAsync(WaitUntil.Completed, "", "", "", content); +Operation operation = await client.CreateOrUpdateEnvironmentAsync(WaitUntil.Completed, "myProject", "me", "mydevenv", content); BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; -Console.WriteLine(result.GetProperty("parameters").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("environmentType").ToString()); -Console.WriteLine(result.GetProperty("user").ToString()); -Console.WriteLine(result.GetProperty("provisioningState").ToString()); -Console.WriteLine(result.GetProperty("resourceGroupId").ToString()); Console.WriteLine(result.GetProperty("catalogName").ToString()); Console.WriteLine(result.GetProperty("environmentDefinitionName").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); ]]> This sample shows how to call CreateOrUpdateEnvironment and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - environmentType = "", - catalogName = "", - environmentDefinitionName = "", -}); -Operation operation = client.CreateOrUpdateEnvironment(WaitUntil.Completed, "", "", "", content); -BinaryData responseData = operation.Value; - -JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("environmentType").ToString()); -Console.WriteLine(result.GetProperty("catalogName").ToString()); -Console.WriteLine(result.GetProperty("environmentDefinitionName").ToString()); -]]> -This sample shows how to call CreateOrUpdateEnvironment with all parameters and request content and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { + environmentType = "DevTest", + catalogName = "main", + environmentDefinitionName = "helloworld", parameters = new { - key = new object(), + functionAppRuntime = "node", + storageAccountType = "Standard_LRS", }, - environmentType = "", - catalogName = "", - environmentDefinitionName = "", }); -Operation operation = client.CreateOrUpdateEnvironment(WaitUntil.Completed, "", "", "", content); +Operation operation = client.CreateOrUpdateEnvironment(WaitUntil.Completed, "myProject", "me", "mydevenv", content); BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; -Console.WriteLine(result.GetProperty("parameters").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("environmentType").ToString()); -Console.WriteLine(result.GetProperty("user").ToString()); -Console.WriteLine(result.GetProperty("provisioningState").ToString()); -Console.WriteLine(result.GetProperty("resourceGroupId").ToString()); Console.WriteLine(result.GetProperty("catalogName").ToString()); Console.WriteLine(result.GetProperty("environmentDefinitionName").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); ]]> This sample shows how to call DeleteEnvironmentAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - -Operation operation = await client.DeleteEnvironmentAsync(WaitUntil.Completed, "", "", ""); -]]> -This sample shows how to call DeleteEnvironmentAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); -Operation operation = await client.DeleteEnvironmentAsync(WaitUntil.Completed, "", "", ""); +Operation operation = await client.DeleteEnvironmentAsync(WaitUntil.Completed, "myProject", "me", "mydevenv"); ]]> This sample shows how to call DeleteEnvironment. "); -TokenCredential credential = new DefaultAzureCredential(); -DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - -Operation operation = client.DeleteEnvironment(WaitUntil.Completed, "", "", ""); -]]> -This sample shows how to call DeleteEnvironment with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); -Operation operation = client.DeleteEnvironment(WaitUntil.Completed, "", "", ""); +Operation operation = client.DeleteEnvironment(WaitUntil.Completed, "myProject", "me", "mydevenv"); ]]> diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Docs/DevBoxesClient.xml b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Docs/DevBoxesClient.xml index e91bf74e83a8..752f3310d0e3 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Docs/DevBoxesClient.xml +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Docs/DevBoxesClient.xml @@ -5,123 +5,53 @@ This sample shows how to call GetPoolAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); -Response response = await client.GetPoolAsync("", ""); -]]> -This sample shows how to call GetPoolAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -DevBoxesClient client = new DevBoxesClient(endpoint, credential); - -Response response = await client.GetPoolAsync("", ""); +Response response = await client.GetPoolAsync("myProject", "DevPool"); ]]> This sample shows how to call GetPool. "); -TokenCredential credential = new DefaultAzureCredential(); -DevBoxesClient client = new DevBoxesClient(endpoint, credential); - -Response response = client.GetPool("", ""); -]]> -This sample shows how to call GetPool with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); -Response response = client.GetPool("", ""); +Response response = client.GetPool("myProject", "DevPool"); ]]> This sample shows how to call GetPoolAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); -Response response = await client.GetPoolAsync("", "", null); +Response response = await client.GetPoolAsync("myProject", "DevPool", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("location").ToString()); Console.WriteLine(result.GetProperty("healthStatus").ToString()); -]]> -This sample shows how to call GetPoolAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -DevBoxesClient client = new DevBoxesClient(endpoint, credential); - -Response response = await client.GetPoolAsync("", "", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("location").ToString()); -Console.WriteLine(result.GetProperty("osType").ToString()); -Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("skuName").ToString()); -Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("vCPUs").ToString()); -Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("memoryGB").ToString()); -Console.WriteLine(result.GetProperty("hibernateSupport").ToString()); -Console.WriteLine(result.GetProperty("storageProfile").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); -Console.WriteLine(result.GetProperty("imageReference").GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("imageReference").GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("imageReference").GetProperty("operatingSystem").ToString()); -Console.WriteLine(result.GetProperty("imageReference").GetProperty("osBuildNumber").ToString()); -Console.WriteLine(result.GetProperty("imageReference").GetProperty("publishedDate").ToString()); -Console.WriteLine(result.GetProperty("localAdministrator").ToString()); -Console.WriteLine(result.GetProperty("stopOnDisconnect").GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("stopOnDisconnect").GetProperty("gracePeriodMinutes").ToString()); -Console.WriteLine(result.GetProperty("healthStatus").ToString()); ]]> This sample shows how to call GetPool and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -DevBoxesClient client = new DevBoxesClient(endpoint, credential); - -Response response = client.GetPool("", "", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("location").ToString()); -Console.WriteLine(result.GetProperty("healthStatus").ToString()); -]]> -This sample shows how to call GetPool with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); -Response response = client.GetPool("", "", null); +Response response = client.GetPool("myProject", "DevPool", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("location").ToString()); -Console.WriteLine(result.GetProperty("osType").ToString()); -Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("skuName").ToString()); -Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("vCPUs").ToString()); -Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("memoryGB").ToString()); -Console.WriteLine(result.GetProperty("hibernateSupport").ToString()); -Console.WriteLine(result.GetProperty("storageProfile").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); -Console.WriteLine(result.GetProperty("imageReference").GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("imageReference").GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("imageReference").GetProperty("operatingSystem").ToString()); -Console.WriteLine(result.GetProperty("imageReference").GetProperty("osBuildNumber").ToString()); -Console.WriteLine(result.GetProperty("imageReference").GetProperty("publishedDate").ToString()); -Console.WriteLine(result.GetProperty("localAdministrator").ToString()); -Console.WriteLine(result.GetProperty("stopOnDisconnect").GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("stopOnDisconnect").GetProperty("gracePeriodMinutes").ToString()); Console.WriteLine(result.GetProperty("healthStatus").ToString()); ]]> @@ -129,64 +59,33 @@ Console.WriteLine(result.GetProperty("healthStatus").ToString()); This sample shows how to call GetScheduleAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); -Response response = await client.GetScheduleAsync("", "", ""); -]]> -This sample shows how to call GetScheduleAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -DevBoxesClient client = new DevBoxesClient(endpoint, credential); - -Response response = await client.GetScheduleAsync("", "", ""); +Response response = await client.GetScheduleAsync("myProject", "DevPool", "default"); ]]> This sample shows how to call GetSchedule. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); -Response response = client.GetSchedule("", "", ""); -]]> -This sample shows how to call GetSchedule with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -DevBoxesClient client = new DevBoxesClient(endpoint, credential); - -Response response = client.GetSchedule("", "", ""); +Response response = client.GetSchedule("myProject", "DevPool", "default"); ]]> This sample shows how to call GetScheduleAsync and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -DevBoxesClient client = new DevBoxesClient(endpoint, credential); - -Response response = await client.GetScheduleAsync("", "", "", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("frequency").ToString()); -Console.WriteLine(result.GetProperty("time").ToString()); -Console.WriteLine(result.GetProperty("timeZone").ToString()); -]]> -This sample shows how to call GetScheduleAsync with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); -Response response = await client.GetScheduleAsync("", "", "", null); +Response response = await client.GetScheduleAsync("myProject", "DevPool", "default", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); @@ -200,26 +99,11 @@ Console.WriteLine(result.GetProperty("timeZone").ToString()); This sample shows how to call GetSchedule and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -DevBoxesClient client = new DevBoxesClient(endpoint, credential); - -Response response = client.GetSchedule("", "", "", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("frequency").ToString()); -Console.WriteLine(result.GetProperty("time").ToString()); -Console.WriteLine(result.GetProperty("timeZone").ToString()); -]]> -This sample shows how to call GetSchedule with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); -Response response = client.GetSchedule("", "", "", null); +Response response = client.GetSchedule("myProject", "DevPool", "default", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); @@ -233,351 +117,167 @@ Console.WriteLine(result.GetProperty("timeZone").ToString()); This sample shows how to call GetDevBoxAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -DevBoxesClient client = new DevBoxesClient(endpoint, credential); - -Response response = await client.GetDevBoxAsync("", "", ""); -]]> -This sample shows how to call GetDevBoxAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); -Response response = await client.GetDevBoxAsync("", "", ""); +Response response = await client.GetDevBoxAsync("myProject", "me", "MyDevBox"); ]]> This sample shows how to call GetDevBox. "); -TokenCredential credential = new DefaultAzureCredential(); -DevBoxesClient client = new DevBoxesClient(endpoint, credential); - -Response response = client.GetDevBox("", "", ""); -]]> -This sample shows how to call GetDevBox with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); -Response response = client.GetDevBox("", "", ""); +Response response = client.GetDevBox("myProject", "me", "MyDevBox"); ]]> This sample shows how to call GetDevBoxAsync and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -DevBoxesClient client = new DevBoxesClient(endpoint, credential); - -Response response = await client.GetDevBoxAsync("", "", "", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("poolName").ToString()); -]]> -This sample shows how to call GetDevBoxAsync with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); -Response response = await client.GetDevBoxAsync("", "", "", null); +Response response = await client.GetDevBoxAsync("myProject", "me", "MyDevBox", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("projectName").ToString()); Console.WriteLine(result.GetProperty("poolName").ToString()); -Console.WriteLine(result.GetProperty("hibernateSupport").ToString()); -Console.WriteLine(result.GetProperty("provisioningState").ToString()); -Console.WriteLine(result.GetProperty("actionState").ToString()); -Console.WriteLine(result.GetProperty("powerState").ToString()); -Console.WriteLine(result.GetProperty("uniqueId").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); -Console.WriteLine(result.GetProperty("location").ToString()); -Console.WriteLine(result.GetProperty("osType").ToString()); -Console.WriteLine(result.GetProperty("user").ToString()); -Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("skuName").ToString()); -Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("vCPUs").ToString()); -Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("memoryGB").ToString()); -Console.WriteLine(result.GetProperty("storageProfile").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); -Console.WriteLine(result.GetProperty("imageReference").GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("imageReference").GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("imageReference").GetProperty("operatingSystem").ToString()); -Console.WriteLine(result.GetProperty("imageReference").GetProperty("osBuildNumber").ToString()); -Console.WriteLine(result.GetProperty("imageReference").GetProperty("publishedDate").ToString()); -Console.WriteLine(result.GetProperty("createdTime").ToString()); -Console.WriteLine(result.GetProperty("localAdministrator").ToString()); ]]> This sample shows how to call GetDevBox and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -DevBoxesClient client = new DevBoxesClient(endpoint, credential); - -Response response = client.GetDevBox("", "", "", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("poolName").ToString()); -]]> -This sample shows how to call GetDevBox with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); -Response response = client.GetDevBox("", "", "", null); +Response response = client.GetDevBox("myProject", "me", "MyDevBox", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("projectName").ToString()); Console.WriteLine(result.GetProperty("poolName").ToString()); -Console.WriteLine(result.GetProperty("hibernateSupport").ToString()); -Console.WriteLine(result.GetProperty("provisioningState").ToString()); -Console.WriteLine(result.GetProperty("actionState").ToString()); -Console.WriteLine(result.GetProperty("powerState").ToString()); -Console.WriteLine(result.GetProperty("uniqueId").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); -Console.WriteLine(result.GetProperty("location").ToString()); -Console.WriteLine(result.GetProperty("osType").ToString()); -Console.WriteLine(result.GetProperty("user").ToString()); -Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("skuName").ToString()); -Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("vCPUs").ToString()); -Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("memoryGB").ToString()); -Console.WriteLine(result.GetProperty("storageProfile").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); -Console.WriteLine(result.GetProperty("imageReference").GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("imageReference").GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("imageReference").GetProperty("operatingSystem").ToString()); -Console.WriteLine(result.GetProperty("imageReference").GetProperty("osBuildNumber").ToString()); -Console.WriteLine(result.GetProperty("imageReference").GetProperty("publishedDate").ToString()); -Console.WriteLine(result.GetProperty("createdTime").ToString()); -Console.WriteLine(result.GetProperty("localAdministrator").ToString()); ]]> This sample shows how to call GetRemoteConnectionAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -DevBoxesClient client = new DevBoxesClient(endpoint, credential); - -Response response = await client.GetRemoteConnectionAsync("", "", ""); -]]> -This sample shows how to call GetRemoteConnectionAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); -Response response = await client.GetRemoteConnectionAsync("", "", ""); +Response response = await client.GetRemoteConnectionAsync("myProject", "me", "MyDevBox"); ]]> This sample shows how to call GetRemoteConnection. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); -Response response = client.GetRemoteConnection("", "", ""); -]]> -This sample shows how to call GetRemoteConnection with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -DevBoxesClient client = new DevBoxesClient(endpoint, credential); - -Response response = client.GetRemoteConnection("", "", ""); +Response response = client.GetRemoteConnection("myProject", "me", "MyDevBox"); ]]> This sample shows how to call GetRemoteConnectionAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); -Response response = await client.GetRemoteConnectionAsync("", "", "", null); +Response response = await client.GetRemoteConnectionAsync("myProject", "me", "MyDevBox", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetRemoteConnectionAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -DevBoxesClient client = new DevBoxesClient(endpoint, credential); - -Response response = await client.GetRemoteConnectionAsync("", "", "", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("webUrl").ToString()); -Console.WriteLine(result.GetProperty("rdpConnectionUrl").ToString()); ]]> This sample shows how to call GetRemoteConnection and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); -Response response = client.GetRemoteConnection("", "", "", null); +Response response = client.GetRemoteConnection("myProject", "me", "MyDevBox", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetRemoteConnection with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -DevBoxesClient client = new DevBoxesClient(endpoint, credential); - -Response response = client.GetRemoteConnection("", "", "", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("webUrl").ToString()); -Console.WriteLine(result.GetProperty("rdpConnectionUrl").ToString()); ]]> This sample shows how to call GetDevBoxActionAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); -Response response = await client.GetDevBoxActionAsync("", "", "", ""); -]]> -This sample shows how to call GetDevBoxActionAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -DevBoxesClient client = new DevBoxesClient(endpoint, credential); - -Response response = await client.GetDevBoxActionAsync("", "", "", ""); +Response response = await client.GetDevBoxActionAsync("myProject", "me", "myDevBox", "schedule-default"); ]]> This sample shows how to call GetDevBoxAction. "); -TokenCredential credential = new DefaultAzureCredential(); -DevBoxesClient client = new DevBoxesClient(endpoint, credential); - -Response response = client.GetDevBoxAction("", "", "", ""); -]]> -This sample shows how to call GetDevBoxAction with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); -Response response = client.GetDevBoxAction("", "", "", ""); +Response response = client.GetDevBoxAction("myProject", "me", "myDevBox", "schedule-default"); ]]> This sample shows how to call GetDevBoxActionAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); -Response response = await client.GetDevBoxActionAsync("", "", "", "", null); +Response response = await client.GetDevBoxActionAsync("myProject", "me", "myDevBox", "schedule-default", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("actionType").ToString()); Console.WriteLine(result.GetProperty("sourceId").ToString()); -]]> -This sample shows how to call GetDevBoxActionAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -DevBoxesClient client = new DevBoxesClient(endpoint, credential); - -Response response = await client.GetDevBoxActionAsync("", "", "", "", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("actionType").ToString()); -Console.WriteLine(result.GetProperty("sourceId").ToString()); -Console.WriteLine(result.GetProperty("suspendedUntil").ToString()); -Console.WriteLine(result.GetProperty("next").GetProperty("scheduledTime").ToString()); ]]> This sample shows how to call GetDevBoxAction and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); -Response response = client.GetDevBoxAction("", "", "", "", null); +Response response = client.GetDevBoxAction("myProject", "me", "myDevBox", "schedule-default", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("actionType").ToString()); Console.WriteLine(result.GetProperty("sourceId").ToString()); -]]> -This sample shows how to call GetDevBoxAction with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -DevBoxesClient client = new DevBoxesClient(endpoint, credential); - -Response response = client.GetDevBoxAction("", "", "", "", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("actionType").ToString()); -Console.WriteLine(result.GetProperty("sourceId").ToString()); -Console.WriteLine(result.GetProperty("suspendedUntil").ToString()); -Console.WriteLine(result.GetProperty("next").GetProperty("scheduledTime").ToString()); ]]> This sample shows how to call SkipActionAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); -Response response = await client.SkipActionAsync("", "", "", ""); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call SkipActionAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -DevBoxesClient client = new DevBoxesClient(endpoint, credential); - -Response response = await client.SkipActionAsync("", "", "", ""); +Response response = await client.SkipActionAsync("myProject", "me", "myDevBox", "schedule-default"); Console.WriteLine(response.Status); ]]> @@ -586,21 +286,11 @@ Console.WriteLine(response.Status); This sample shows how to call SkipAction. "); -TokenCredential credential = new DefaultAzureCredential(); -DevBoxesClient client = new DevBoxesClient(endpoint, credential); - -Response response = client.SkipAction("", "", "", ""); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call SkipAction with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); -Response response = client.SkipAction("", "", "", ""); +Response response = client.SkipAction("myProject", "me", "myDevBox", "schedule-default"); Console.WriteLine(response.Status); ]]> @@ -609,121 +299,65 @@ Console.WriteLine(response.Status); This sample shows how to call DelayActionAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); -Response response = await client.DelayActionAsync("", "", "", "", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); -]]> -This sample shows how to call DelayActionAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -DevBoxesClient client = new DevBoxesClient(endpoint, credential); - -Response response = await client.DelayActionAsync("", "", "", "", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); +Response response = await client.DelayActionAsync("myProject", "me", "myDevBox", "schedule-default", DateTimeOffset.Parse("2022-09-30T17:00:00Z")); ]]> This sample shows how to call DelayAction. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); -Response response = client.DelayAction("", "", "", "", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); -]]> -This sample shows how to call DelayAction with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -DevBoxesClient client = new DevBoxesClient(endpoint, credential); - -Response response = client.DelayAction("", "", "", "", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); +Response response = client.DelayAction("myProject", "me", "myDevBox", "schedule-default", DateTimeOffset.Parse("2022-09-30T17:00:00Z")); ]]> This sample shows how to call DelayActionAsync and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -DevBoxesClient client = new DevBoxesClient(endpoint, credential); - -Response response = await client.DelayActionAsync("", "", "", "", 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("actionType").ToString()); -Console.WriteLine(result.GetProperty("sourceId").ToString()); -]]> -This sample shows how to call DelayActionAsync with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); -Response response = await client.DelayActionAsync("", "", "", "", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), null); +Response response = await client.DelayActionAsync("myProject", "me", "myDevBox", "schedule-default", DateTimeOffset.Parse("2022-09-30T17:00:00Z"), null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("actionType").ToString()); Console.WriteLine(result.GetProperty("sourceId").ToString()); -Console.WriteLine(result.GetProperty("suspendedUntil").ToString()); -Console.WriteLine(result.GetProperty("next").GetProperty("scheduledTime").ToString()); ]]> This sample shows how to call DelayAction and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); -Response response = client.DelayAction("", "", "", "", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), null); +Response response = client.DelayAction("myProject", "me", "myDevBox", "schedule-default", DateTimeOffset.Parse("2022-09-30T17:00:00Z"), null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("actionType").ToString()); Console.WriteLine(result.GetProperty("sourceId").ToString()); -]]> -This sample shows how to call DelayAction with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -DevBoxesClient client = new DevBoxesClient(endpoint, credential); - -Response response = client.DelayAction("", "", "", "", 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("actionType").ToString()); -Console.WriteLine(result.GetProperty("sourceId").ToString()); -Console.WriteLine(result.GetProperty("suspendedUntil").ToString()); -Console.WriteLine(result.GetProperty("next").GetProperty("scheduledTime").ToString()); ]]> This sample shows how to call GetPoolsAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); -await foreach (DevBoxPool item in client.GetPoolsAsync("")) -{ -} -]]> -This sample shows how to call GetPoolsAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -DevBoxesClient client = new DevBoxesClient(endpoint, credential); - -await foreach (DevBoxPool item in client.GetPoolsAsync("")) +await foreach (DevBoxPool item in client.GetPoolsAsync("myProject")) { } ]]> @@ -732,21 +366,11 @@ await foreach (DevBoxPool item in client.GetPoolsAsync("")) This sample shows how to call GetPools. "); -TokenCredential credential = new DefaultAzureCredential(); -DevBoxesClient client = new DevBoxesClient(endpoint, credential); - -foreach (DevBoxPool item in client.GetPools("")) -{ -} -]]> -This sample shows how to call GetPools with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); -foreach (DevBoxPool item in client.GetPools("")) +foreach (DevBoxPool item in client.GetPools("myProject")) { } ]]> @@ -755,43 +379,15 @@ foreach (DevBoxPool item in client.GetPools("")) This sample shows how to call GetPoolsAsync and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -DevBoxesClient client = new DevBoxesClient(endpoint, credential); - -await foreach (BinaryData item in client.GetPoolsAsync("", null)) -{ - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("location").ToString()); - Console.WriteLine(result.GetProperty("healthStatus").ToString()); -} -]]> -This sample shows how to call GetPoolsAsync with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); -await foreach (BinaryData item in client.GetPoolsAsync("", null)) +await foreach (BinaryData item in client.GetPoolsAsync("myProject", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("location").ToString()); - Console.WriteLine(result.GetProperty("osType").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("skuName").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("vCPUs").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("memoryGB").ToString()); - Console.WriteLine(result.GetProperty("hibernateSupport").ToString()); - Console.WriteLine(result.GetProperty("storageProfile").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("operatingSystem").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("osBuildNumber").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("publishedDate").ToString()); - Console.WriteLine(result.GetProperty("localAdministrator").ToString()); - Console.WriteLine(result.GetProperty("stopOnDisconnect").GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("stopOnDisconnect").GetProperty("gracePeriodMinutes").ToString()); Console.WriteLine(result.GetProperty("healthStatus").ToString()); } ]]> @@ -800,43 +396,15 @@ await foreach (BinaryData item in client.GetPoolsAsync("", null)) This sample shows how to call GetPools and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -DevBoxesClient client = new DevBoxesClient(endpoint, credential); - -foreach (BinaryData item in client.GetPools("", null)) -{ - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("location").ToString()); - Console.WriteLine(result.GetProperty("healthStatus").ToString()); -} -]]> -This sample shows how to call GetPools with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); -foreach (BinaryData item in client.GetPools("", null)) +foreach (BinaryData item in client.GetPools("myProject", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("location").ToString()); - Console.WriteLine(result.GetProperty("osType").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("skuName").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("vCPUs").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("memoryGB").ToString()); - Console.WriteLine(result.GetProperty("hibernateSupport").ToString()); - Console.WriteLine(result.GetProperty("storageProfile").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("operatingSystem").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("osBuildNumber").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("publishedDate").ToString()); - Console.WriteLine(result.GetProperty("localAdministrator").ToString()); - Console.WriteLine(result.GetProperty("stopOnDisconnect").GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("stopOnDisconnect").GetProperty("gracePeriodMinutes").ToString()); Console.WriteLine(result.GetProperty("healthStatus").ToString()); } ]]> @@ -845,21 +413,11 @@ foreach (BinaryData item in client.GetPools("", null)) This sample shows how to call GetSchedulesAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -DevBoxesClient client = new DevBoxesClient(endpoint, credential); - -await foreach (DevBoxSchedule item in client.GetSchedulesAsync("", "")) -{ -} -]]> -This sample shows how to call GetSchedulesAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); -await foreach (DevBoxSchedule item in client.GetSchedulesAsync("", "")) +await foreach (DevBoxSchedule item in client.GetSchedulesAsync("myProject", "DevPool")) { } ]]> @@ -868,21 +426,11 @@ await foreach (DevBoxSchedule item in client.GetSchedulesAsync("", This sample shows how to call GetSchedules. "); -TokenCredential credential = new DefaultAzureCredential(); -DevBoxesClient client = new DevBoxesClient(endpoint, credential); - -foreach (DevBoxSchedule item in client.GetSchedules("", "")) -{ -} -]]> -This sample shows how to call GetSchedules with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); -foreach (DevBoxSchedule item in client.GetSchedules("", "")) +foreach (DevBoxSchedule item in client.GetSchedules("myProject", "DevPool")) { } ]]> @@ -891,27 +439,11 @@ foreach (DevBoxSchedule item in client.GetSchedules("", " This sample shows how to call GetSchedulesAsync and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -DevBoxesClient client = new DevBoxesClient(endpoint, credential); - -await foreach (BinaryData item in client.GetSchedulesAsync("", "", null)) -{ - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("frequency").ToString()); - Console.WriteLine(result.GetProperty("time").ToString()); - Console.WriteLine(result.GetProperty("timeZone").ToString()); -} -]]> -This sample shows how to call GetSchedulesAsync with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); -await foreach (BinaryData item in client.GetSchedulesAsync("", "", null)) +await foreach (BinaryData item in client.GetSchedulesAsync("myProject", "DevPool", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); @@ -926,27 +458,11 @@ await foreach (BinaryData item in client.GetSchedulesAsync("", " This sample shows how to call GetSchedules and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -DevBoxesClient client = new DevBoxesClient(endpoint, credential); - -foreach (BinaryData item in client.GetSchedules("", "", null)) -{ - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("frequency").ToString()); - Console.WriteLine(result.GetProperty("time").ToString()); - Console.WriteLine(result.GetProperty("timeZone").ToString()); -} -]]> -This sample shows how to call GetSchedules with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); -foreach (BinaryData item in client.GetSchedules("", "", null)) +foreach (BinaryData item in client.GetSchedules("myProject", "DevPool", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); @@ -961,17 +477,7 @@ foreach (BinaryData item in client.GetSchedules("", "", n This sample shows how to call GetAllDevBoxesAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -DevBoxesClient client = new DevBoxesClient(endpoint, credential); - -await foreach (DevBox item in client.GetAllDevBoxesAsync()) -{ -} -]]> -This sample shows how to call GetAllDevBoxesAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); @@ -984,17 +490,7 @@ await foreach (DevBox item in client.GetAllDevBoxesAsync()) This sample shows how to call GetAllDevBoxes. "); -TokenCredential credential = new DefaultAzureCredential(); -DevBoxesClient client = new DevBoxesClient(endpoint, credential); - -foreach (DevBox item in client.GetAllDevBoxes()) -{ -} -]]> -This sample shows how to call GetAllDevBoxes with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); @@ -1007,7 +503,7 @@ foreach (DevBox item in client.GetAllDevBoxes()) This sample shows how to call GetAllDevBoxesAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); @@ -1017,63 +513,13 @@ await foreach (BinaryData item in client.GetAllDevBoxesAsync(null)) Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("poolName").ToString()); } -]]> -This sample shows how to call GetAllDevBoxesAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -DevBoxesClient client = new DevBoxesClient(endpoint, credential); - -await foreach (BinaryData item in client.GetAllDevBoxesAsync(null)) -{ - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("projectName").ToString()); - Console.WriteLine(result.GetProperty("poolName").ToString()); - Console.WriteLine(result.GetProperty("hibernateSupport").ToString()); - Console.WriteLine(result.GetProperty("provisioningState").ToString()); - Console.WriteLine(result.GetProperty("actionState").ToString()); - Console.WriteLine(result.GetProperty("powerState").ToString()); - Console.WriteLine(result.GetProperty("uniqueId").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("location").ToString()); - Console.WriteLine(result.GetProperty("osType").ToString()); - Console.WriteLine(result.GetProperty("user").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("skuName").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("vCPUs").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("memoryGB").ToString()); - Console.WriteLine(result.GetProperty("storageProfile").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("operatingSystem").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("osBuildNumber").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("publishedDate").ToString()); - Console.WriteLine(result.GetProperty("createdTime").ToString()); - Console.WriteLine(result.GetProperty("localAdministrator").ToString()); -} ]]> This sample shows how to call GetAllDevBoxes and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -DevBoxesClient client = new DevBoxesClient(endpoint, credential); - -foreach (BinaryData item in client.GetAllDevBoxes(null)) -{ - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("poolName").ToString()); -} -]]> -This sample shows how to call GetAllDevBoxes with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); @@ -1081,31 +527,7 @@ foreach (BinaryData item in client.GetAllDevBoxes(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("projectName").ToString()); Console.WriteLine(result.GetProperty("poolName").ToString()); - Console.WriteLine(result.GetProperty("hibernateSupport").ToString()); - Console.WriteLine(result.GetProperty("provisioningState").ToString()); - Console.WriteLine(result.GetProperty("actionState").ToString()); - Console.WriteLine(result.GetProperty("powerState").ToString()); - Console.WriteLine(result.GetProperty("uniqueId").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("location").ToString()); - Console.WriteLine(result.GetProperty("osType").ToString()); - Console.WriteLine(result.GetProperty("user").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("skuName").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("vCPUs").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("memoryGB").ToString()); - Console.WriteLine(result.GetProperty("storageProfile").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("operatingSystem").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("osBuildNumber").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("publishedDate").ToString()); - Console.WriteLine(result.GetProperty("createdTime").ToString()); - Console.WriteLine(result.GetProperty("localAdministrator").ToString()); } ]]> @@ -1113,21 +535,11 @@ foreach (BinaryData item in client.GetAllDevBoxes(null)) This sample shows how to call GetAllDevBoxesByUserAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); -await foreach (DevBox item in client.GetAllDevBoxesByUserAsync("")) -{ -} -]]> -This sample shows how to call GetAllDevBoxesByUserAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -DevBoxesClient client = new DevBoxesClient(endpoint, credential); - -await foreach (DevBox item in client.GetAllDevBoxesByUserAsync("")) +await foreach (DevBox item in client.GetAllDevBoxesByUserAsync("me")) { } ]]> @@ -1136,21 +548,11 @@ await foreach (DevBox item in client.GetAllDevBoxesByUserAsync("")) This sample shows how to call GetAllDevBoxesByUser. "); -TokenCredential credential = new DefaultAzureCredential(); -DevBoxesClient client = new DevBoxesClient(endpoint, credential); - -foreach (DevBox item in client.GetAllDevBoxesByUser("")) -{ -} -]]> -This sample shows how to call GetAllDevBoxesByUser with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); -foreach (DevBox item in client.GetAllDevBoxesByUser("")) +foreach (DevBox item in client.GetAllDevBoxesByUser("me")) { } ]]> @@ -1159,52 +561,15 @@ foreach (DevBox item in client.GetAllDevBoxesByUser("")) This sample shows how to call GetAllDevBoxesByUserAsync and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -DevBoxesClient client = new DevBoxesClient(endpoint, credential); - -await foreach (BinaryData item in client.GetAllDevBoxesByUserAsync("", null)) -{ - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("poolName").ToString()); -} -]]> -This sample shows how to call GetAllDevBoxesByUserAsync with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); -await foreach (BinaryData item in client.GetAllDevBoxesByUserAsync("", null)) +await foreach (BinaryData item in client.GetAllDevBoxesByUserAsync("me", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("projectName").ToString()); Console.WriteLine(result.GetProperty("poolName").ToString()); - Console.WriteLine(result.GetProperty("hibernateSupport").ToString()); - Console.WriteLine(result.GetProperty("provisioningState").ToString()); - Console.WriteLine(result.GetProperty("actionState").ToString()); - Console.WriteLine(result.GetProperty("powerState").ToString()); - Console.WriteLine(result.GetProperty("uniqueId").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("location").ToString()); - Console.WriteLine(result.GetProperty("osType").ToString()); - Console.WriteLine(result.GetProperty("user").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("skuName").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("vCPUs").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("memoryGB").ToString()); - Console.WriteLine(result.GetProperty("storageProfile").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("operatingSystem").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("osBuildNumber").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("publishedDate").ToString()); - Console.WriteLine(result.GetProperty("createdTime").ToString()); - Console.WriteLine(result.GetProperty("localAdministrator").ToString()); } ]]> @@ -1212,74 +577,27 @@ await foreach (BinaryData item in client.GetAllDevBoxesByUserAsync("", n This sample shows how to call GetAllDevBoxesByUser and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); -foreach (BinaryData item in client.GetAllDevBoxesByUser("", null)) +foreach (BinaryData item in client.GetAllDevBoxesByUser("me", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("poolName").ToString()); } -]]> -This sample shows how to call GetAllDevBoxesByUser with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -DevBoxesClient client = new DevBoxesClient(endpoint, credential); - -foreach (BinaryData item in client.GetAllDevBoxesByUser("", null)) -{ - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("projectName").ToString()); - Console.WriteLine(result.GetProperty("poolName").ToString()); - Console.WriteLine(result.GetProperty("hibernateSupport").ToString()); - Console.WriteLine(result.GetProperty("provisioningState").ToString()); - Console.WriteLine(result.GetProperty("actionState").ToString()); - Console.WriteLine(result.GetProperty("powerState").ToString()); - Console.WriteLine(result.GetProperty("uniqueId").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("location").ToString()); - Console.WriteLine(result.GetProperty("osType").ToString()); - Console.WriteLine(result.GetProperty("user").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("skuName").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("vCPUs").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("memoryGB").ToString()); - Console.WriteLine(result.GetProperty("storageProfile").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("operatingSystem").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("osBuildNumber").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("publishedDate").ToString()); - Console.WriteLine(result.GetProperty("createdTime").ToString()); - Console.WriteLine(result.GetProperty("localAdministrator").ToString()); -} ]]> This sample shows how to call GetDevBoxesAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -DevBoxesClient client = new DevBoxesClient(endpoint, credential); - -await foreach (DevBox item in client.GetDevBoxesAsync("", "")) -{ -} -]]> -This sample shows how to call GetDevBoxesAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); -await foreach (DevBox item in client.GetDevBoxesAsync("", "")) +await foreach (DevBox item in client.GetDevBoxesAsync("myProject", "me")) { } ]]> @@ -1288,21 +606,11 @@ await foreach (DevBox item in client.GetDevBoxesAsync("", " This sample shows how to call GetDevBoxes. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); -foreach (DevBox item in client.GetDevBoxes("", "")) -{ -} -]]> -This sample shows how to call GetDevBoxes with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -DevBoxesClient client = new DevBoxesClient(endpoint, credential); - -foreach (DevBox item in client.GetDevBoxes("", "")) +foreach (DevBox item in client.GetDevBoxes("myProject", "me")) { } ]]> @@ -1311,52 +619,15 @@ foreach (DevBox item in client.GetDevBoxes("", "")) This sample shows how to call GetDevBoxesAsync and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -DevBoxesClient client = new DevBoxesClient(endpoint, credential); - -await foreach (BinaryData item in client.GetDevBoxesAsync("", "", null)) -{ - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("poolName").ToString()); -} -]]> -This sample shows how to call GetDevBoxesAsync with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); -await foreach (BinaryData item in client.GetDevBoxesAsync("", "", null)) +await foreach (BinaryData item in client.GetDevBoxesAsync("myProject", "me", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("projectName").ToString()); Console.WriteLine(result.GetProperty("poolName").ToString()); - Console.WriteLine(result.GetProperty("hibernateSupport").ToString()); - Console.WriteLine(result.GetProperty("provisioningState").ToString()); - Console.WriteLine(result.GetProperty("actionState").ToString()); - Console.WriteLine(result.GetProperty("powerState").ToString()); - Console.WriteLine(result.GetProperty("uniqueId").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("location").ToString()); - Console.WriteLine(result.GetProperty("osType").ToString()); - Console.WriteLine(result.GetProperty("user").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("skuName").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("vCPUs").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("memoryGB").ToString()); - Console.WriteLine(result.GetProperty("storageProfile").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("operatingSystem").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("osBuildNumber").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("publishedDate").ToString()); - Console.WriteLine(result.GetProperty("createdTime").ToString()); - Console.WriteLine(result.GetProperty("localAdministrator").ToString()); } ]]> @@ -1364,52 +635,15 @@ await foreach (BinaryData item in client.GetDevBoxesAsync("", " This sample shows how to call GetDevBoxes and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -DevBoxesClient client = new DevBoxesClient(endpoint, credential); - -foreach (BinaryData item in client.GetDevBoxes("", "", null)) -{ - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("poolName").ToString()); -} -]]> -This sample shows how to call GetDevBoxes with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); -foreach (BinaryData item in client.GetDevBoxes("", "", null)) +foreach (BinaryData item in client.GetDevBoxes("myProject", "me", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("projectName").ToString()); Console.WriteLine(result.GetProperty("poolName").ToString()); - Console.WriteLine(result.GetProperty("hibernateSupport").ToString()); - Console.WriteLine(result.GetProperty("provisioningState").ToString()); - Console.WriteLine(result.GetProperty("actionState").ToString()); - Console.WriteLine(result.GetProperty("powerState").ToString()); - Console.WriteLine(result.GetProperty("uniqueId").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("location").ToString()); - Console.WriteLine(result.GetProperty("osType").ToString()); - Console.WriteLine(result.GetProperty("user").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("skuName").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("vCPUs").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("memoryGB").ToString()); - Console.WriteLine(result.GetProperty("storageProfile").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("operatingSystem").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("osBuildNumber").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("publishedDate").ToString()); - Console.WriteLine(result.GetProperty("createdTime").ToString()); - Console.WriteLine(result.GetProperty("localAdministrator").ToString()); } ]]> @@ -1417,21 +651,11 @@ foreach (BinaryData item in client.GetDevBoxes("", "", null This sample shows how to call GetDevBoxActionsAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); -await foreach (DevBoxAction item in client.GetDevBoxActionsAsync("", "", "")) -{ -} -]]> -This sample shows how to call GetDevBoxActionsAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -DevBoxesClient client = new DevBoxesClient(endpoint, credential); - -await foreach (DevBoxAction item in client.GetDevBoxActionsAsync("", "", "")) +await foreach (DevBoxAction item in client.GetDevBoxActionsAsync("myProject", "me", "myDevBox")) { } ]]> @@ -1440,21 +664,11 @@ await foreach (DevBoxAction item in client.GetDevBoxActionsAsync("" This sample shows how to call GetDevBoxActions. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); -foreach (DevBoxAction item in client.GetDevBoxActions("", "", "")) -{ -} -]]> -This sample shows how to call GetDevBoxActions with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -DevBoxesClient client = new DevBoxesClient(endpoint, credential); - -foreach (DevBoxAction item in client.GetDevBoxActions("", "", "")) +foreach (DevBoxAction item in client.GetDevBoxActions("myProject", "me", "myDevBox")) { } ]]> @@ -1463,32 +677,16 @@ foreach (DevBoxAction item in client.GetDevBoxActions("", " This sample shows how to call GetDevBoxActionsAsync and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -DevBoxesClient client = new DevBoxesClient(endpoint, credential); - -await foreach (BinaryData item in client.GetDevBoxActionsAsync("", "", "", null)) -{ - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("actionType").ToString()); - Console.WriteLine(result.GetProperty("sourceId").ToString()); -} -]]> -This sample shows how to call GetDevBoxActionsAsync with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); -await foreach (BinaryData item in client.GetDevBoxActionsAsync("", "", "", null)) +await foreach (BinaryData item in client.GetDevBoxActionsAsync("myProject", "me", "myDevBox", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("actionType").ToString()); Console.WriteLine(result.GetProperty("sourceId").ToString()); - Console.WriteLine(result.GetProperty("suspendedUntil").ToString()); - Console.WriteLine(result.GetProperty("next").GetProperty("scheduledTime").ToString()); } ]]> @@ -1496,54 +694,28 @@ await foreach (BinaryData item in client.GetDevBoxActionsAsync("", This sample shows how to call GetDevBoxActions and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); -foreach (BinaryData item in client.GetDevBoxActions("", "", "", null)) +foreach (BinaryData item in client.GetDevBoxActions("myProject", "me", "myDevBox", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("actionType").ToString()); Console.WriteLine(result.GetProperty("sourceId").ToString()); } -]]> -This sample shows how to call GetDevBoxActions with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -DevBoxesClient client = new DevBoxesClient(endpoint, credential); - -foreach (BinaryData item in client.GetDevBoxActions("", "", "", null)) -{ - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("actionType").ToString()); - Console.WriteLine(result.GetProperty("sourceId").ToString()); - Console.WriteLine(result.GetProperty("suspendedUntil").ToString()); - Console.WriteLine(result.GetProperty("next").GetProperty("scheduledTime").ToString()); -} ]]> This sample shows how to call DelayAllActionsAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); -await foreach (DevBoxActionDelayResult item in client.DelayAllActionsAsync("", "", "", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"))) -{ -} -]]> -This sample shows how to call DelayAllActionsAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -DevBoxesClient client = new DevBoxesClient(endpoint, credential); - -await foreach (DevBoxActionDelayResult item in client.DelayAllActionsAsync("", "", "", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"))) +await foreach (DevBoxActionDelayResult item in client.DelayAllActionsAsync("myProject", "me", "myDevBox", DateTimeOffset.Parse("2022-09-30T17:00:00Z"))) { } ]]> @@ -1552,21 +724,11 @@ await foreach (DevBoxActionDelayResult item in client.DelayAllActionsAsync(" This sample shows how to call DelayAllActions. "); -TokenCredential credential = new DefaultAzureCredential(); -DevBoxesClient client = new DevBoxesClient(endpoint, credential); - -foreach (DevBoxActionDelayResult item in client.DelayAllActions("", "", "", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"))) -{ -} -]]> -This sample shows how to call DelayAllActions with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); -foreach (DevBoxActionDelayResult item in client.DelayAllActions("", "", "", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"))) +foreach (DevBoxActionDelayResult item in client.DelayAllActions("myProject", "me", "myDevBox", DateTimeOffset.Parse("2022-09-30T17:00:00Z"))) { } ]]> @@ -1575,37 +737,15 @@ foreach (DevBoxActionDelayResult item in client.DelayAllActions("", This sample shows how to call DelayAllActionsAsync and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -DevBoxesClient client = new DevBoxesClient(endpoint, credential); - -await foreach (BinaryData item in client.DelayAllActionsAsync("", "", "", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), null)) -{ - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("result").ToString()); -} -]]> -This sample shows how to call DelayAllActionsAsync with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); -await foreach (BinaryData item in client.DelayAllActionsAsync("", "", "", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), null)) +await foreach (BinaryData item in client.DelayAllActionsAsync("myProject", "me", "myDevBox", DateTimeOffset.Parse("2022-09-30T17:00:00Z"), null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("result").ToString()); - Console.WriteLine(result.GetProperty("action").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("action").GetProperty("actionType").ToString()); - Console.WriteLine(result.GetProperty("action").GetProperty("sourceId").ToString()); - Console.WriteLine(result.GetProperty("action").GetProperty("suspendedUntil").ToString()); - Console.WriteLine(result.GetProperty("action").GetProperty("next").GetProperty("scheduledTime").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); } ]]> @@ -1613,37 +753,15 @@ await foreach (BinaryData item in client.DelayAllActionsAsync("", " This sample shows how to call DelayAllActions and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -DevBoxesClient client = new DevBoxesClient(endpoint, credential); - -foreach (BinaryData item in client.DelayAllActions("", "", "", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), null)) -{ - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("result").ToString()); -} -]]> -This sample shows how to call DelayAllActions with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); -foreach (BinaryData item in client.DelayAllActions("", "", "", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), null)) +foreach (BinaryData item in client.DelayAllActions("myProject", "me", "myDevBox", DateTimeOffset.Parse("2022-09-30T17:00:00Z"), null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("result").ToString()); - Console.WriteLine(result.GetProperty("action").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("action").GetProperty("actionType").ToString()); - Console.WriteLine(result.GetProperty("action").GetProperty("sourceId").ToString()); - Console.WriteLine(result.GetProperty("action").GetProperty("suspendedUntil").ToString()); - Console.WriteLine(result.GetProperty("action").GetProperty("next").GetProperty("scheduledTime").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); } ]]> @@ -1651,276 +769,128 @@ foreach (BinaryData item in client.DelayAllActions("", "", This sample shows how to call CreateDevBoxAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - poolName = "", + poolName = "LargeDevWorkStationPool", }); -Operation operation = await client.CreateDevBoxAsync(WaitUntil.Completed, "", "", "", content); +Operation operation = await client.CreateDevBoxAsync(WaitUntil.Completed, "myProject", "me", "MyDevBox", content); BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("poolName").ToString()); -]]> -This sample shows how to call CreateDevBoxAsync with all parameters and request content and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -DevBoxesClient client = new DevBoxesClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - poolName = "", - localAdministrator = "Enabled", -}); -Operation operation = await client.CreateDevBoxAsync(WaitUntil.Completed, "", "", "", content); -BinaryData responseData = operation.Value; - -JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("projectName").ToString()); -Console.WriteLine(result.GetProperty("poolName").ToString()); -Console.WriteLine(result.GetProperty("hibernateSupport").ToString()); -Console.WriteLine(result.GetProperty("provisioningState").ToString()); -Console.WriteLine(result.GetProperty("actionState").ToString()); -Console.WriteLine(result.GetProperty("powerState").ToString()); -Console.WriteLine(result.GetProperty("uniqueId").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); -Console.WriteLine(result.GetProperty("location").ToString()); -Console.WriteLine(result.GetProperty("osType").ToString()); -Console.WriteLine(result.GetProperty("user").ToString()); -Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("skuName").ToString()); -Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("vCPUs").ToString()); -Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("memoryGB").ToString()); -Console.WriteLine(result.GetProperty("storageProfile").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); -Console.WriteLine(result.GetProperty("imageReference").GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("imageReference").GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("imageReference").GetProperty("operatingSystem").ToString()); -Console.WriteLine(result.GetProperty("imageReference").GetProperty("osBuildNumber").ToString()); -Console.WriteLine(result.GetProperty("imageReference").GetProperty("publishedDate").ToString()); -Console.WriteLine(result.GetProperty("createdTime").ToString()); -Console.WriteLine(result.GetProperty("localAdministrator").ToString()); ]]> This sample shows how to call CreateDevBox and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -DevBoxesClient client = new DevBoxesClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - poolName = "", -}); -Operation operation = client.CreateDevBox(WaitUntil.Completed, "", "", "", content); -BinaryData responseData = operation.Value; - -JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("poolName").ToString()); -]]> -This sample shows how to call CreateDevBox with all parameters and request content and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - poolName = "", - localAdministrator = "Enabled", + poolName = "LargeDevWorkStationPool", }); -Operation operation = client.CreateDevBox(WaitUntil.Completed, "", "", "", content); +Operation operation = client.CreateDevBox(WaitUntil.Completed, "myProject", "me", "MyDevBox", content); BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("projectName").ToString()); Console.WriteLine(result.GetProperty("poolName").ToString()); -Console.WriteLine(result.GetProperty("hibernateSupport").ToString()); -Console.WriteLine(result.GetProperty("provisioningState").ToString()); -Console.WriteLine(result.GetProperty("actionState").ToString()); -Console.WriteLine(result.GetProperty("powerState").ToString()); -Console.WriteLine(result.GetProperty("uniqueId").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); -Console.WriteLine(result.GetProperty("location").ToString()); -Console.WriteLine(result.GetProperty("osType").ToString()); -Console.WriteLine(result.GetProperty("user").ToString()); -Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("skuName").ToString()); -Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("vCPUs").ToString()); -Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("memoryGB").ToString()); -Console.WriteLine(result.GetProperty("storageProfile").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); -Console.WriteLine(result.GetProperty("imageReference").GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("imageReference").GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("imageReference").GetProperty("operatingSystem").ToString()); -Console.WriteLine(result.GetProperty("imageReference").GetProperty("osBuildNumber").ToString()); -Console.WriteLine(result.GetProperty("imageReference").GetProperty("publishedDate").ToString()); -Console.WriteLine(result.GetProperty("createdTime").ToString()); -Console.WriteLine(result.GetProperty("localAdministrator").ToString()); ]]> This sample shows how to call DeleteDevBoxAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -DevBoxesClient client = new DevBoxesClient(endpoint, credential); - -Operation operation = await client.DeleteDevBoxAsync(WaitUntil.Completed, "", "", ""); -]]> -This sample shows how to call DeleteDevBoxAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); -Operation operation = await client.DeleteDevBoxAsync(WaitUntil.Completed, "", "", ""); +Operation operation = await client.DeleteDevBoxAsync(WaitUntil.Completed, "myProject", "me", "MyDevBox"); ]]> This sample shows how to call DeleteDevBox. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); -Operation operation = client.DeleteDevBox(WaitUntil.Completed, "", "", ""); -]]> -This sample shows how to call DeleteDevBox with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -DevBoxesClient client = new DevBoxesClient(endpoint, credential); - -Operation operation = client.DeleteDevBox(WaitUntil.Completed, "", "", ""); +Operation operation = client.DeleteDevBox(WaitUntil.Completed, "myProject", "me", "MyDevBox"); ]]> This sample shows how to call StartDevBoxAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -DevBoxesClient client = new DevBoxesClient(endpoint, credential); - -Operation operation = await client.StartDevBoxAsync(WaitUntil.Completed, "", "", ""); -]]> -This sample shows how to call StartDevBoxAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); -Operation operation = await client.StartDevBoxAsync(WaitUntil.Completed, "", "", ""); +Operation operation = await client.StartDevBoxAsync(WaitUntil.Completed, "myProject", "me", "MyDevBox"); ]]> This sample shows how to call StartDevBox. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); -Operation operation = client.StartDevBox(WaitUntil.Completed, "", "", ""); -]]> -This sample shows how to call StartDevBox with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -DevBoxesClient client = new DevBoxesClient(endpoint, credential); - -Operation operation = client.StartDevBox(WaitUntil.Completed, "", "", ""); +Operation operation = client.StartDevBox(WaitUntil.Completed, "myProject", "me", "MyDevBox"); ]]> This sample shows how to call StopDevBoxAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -DevBoxesClient client = new DevBoxesClient(endpoint, credential); - -Operation operation = await client.StopDevBoxAsync(WaitUntil.Completed, "", "", ""); -]]> -This sample shows how to call StopDevBoxAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); -Operation operation = await client.StopDevBoxAsync(WaitUntil.Completed, "", "", "", hibernate: true); +Operation operation = await client.StopDevBoxAsync(WaitUntil.Completed, "myProject", "me", "MyDevBox"); ]]> This sample shows how to call StopDevBox. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); -Operation operation = client.StopDevBox(WaitUntil.Completed, "", "", ""); -]]> -This sample shows how to call StopDevBox with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -DevBoxesClient client = new DevBoxesClient(endpoint, credential); - -Operation operation = client.StopDevBox(WaitUntil.Completed, "", "", "", hibernate: true); +Operation operation = client.StopDevBox(WaitUntil.Completed, "myProject", "me", "MyDevBox"); ]]> This sample shows how to call RestartDevBoxAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -DevBoxesClient client = new DevBoxesClient(endpoint, credential); - -Operation operation = await client.RestartDevBoxAsync(WaitUntil.Completed, "", "", ""); -]]> -This sample shows how to call RestartDevBoxAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); -Operation operation = await client.RestartDevBoxAsync(WaitUntil.Completed, "", "", ""); +Operation operation = await client.RestartDevBoxAsync(WaitUntil.Completed, "myProject", "me", "MyDevBox"); ]]> This sample shows how to call RestartDevBox. "); -TokenCredential credential = new DefaultAzureCredential(); -DevBoxesClient client = new DevBoxesClient(endpoint, credential); - -Operation operation = client.RestartDevBox(WaitUntil.Completed, "", "", ""); -]]> -This sample shows how to call RestartDevBox with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); -Operation operation = client.RestartDevBox(WaitUntil.Completed, "", "", ""); +Operation operation = client.RestartDevBox(WaitUntil.Completed, "myProject", "me", "MyDevBox"); ]]> diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Docs/DevCenterClient.xml b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Docs/DevCenterClient.xml index d043ea778f39..ad3f3483e576 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Docs/DevCenterClient.xml +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Docs/DevCenterClient.xml @@ -5,109 +5,57 @@ This sample shows how to call GetProjectAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevCenterClient client = new DevCenterClient(endpoint, credential); -Response response = await client.GetProjectAsync(""); -]]> -This sample shows how to call GetProjectAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -DevCenterClient client = new DevCenterClient(endpoint, credential); - -Response response = await client.GetProjectAsync(""); +Response response = await client.GetProjectAsync("myProject"); ]]> This sample shows how to call GetProject. "); -TokenCredential credential = new DefaultAzureCredential(); -DevCenterClient client = new DevCenterClient(endpoint, credential); - -Response response = client.GetProject(""); -]]> -This sample shows how to call GetProject with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevCenterClient client = new DevCenterClient(endpoint, credential); -Response response = client.GetProject(""); +Response response = client.GetProject("myProject"); ]]> This sample shows how to call GetProjectAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevCenterClient client = new DevCenterClient(endpoint, credential); -Response response = await client.GetProjectAsync("", null); +Response response = await client.GetProjectAsync("myProject", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); -]]> -This sample shows how to call GetProjectAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -DevCenterClient client = new DevCenterClient(endpoint, credential); - -Response response = await client.GetProjectAsync("", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("maxDevBoxesPerUser").ToString()); ]]> This sample shows how to call GetProject and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevCenterClient client = new DevCenterClient(endpoint, credential); -Response response = client.GetProject("", null); +Response response = client.GetProject("myProject", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); -]]> -This sample shows how to call GetProject with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -DevCenterClient client = new DevCenterClient(endpoint, credential); - -Response response = client.GetProject("", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("maxDevBoxesPerUser").ToString()); ]]> This sample shows how to call GetProjectsAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -DevCenterClient client = new DevCenterClient(endpoint, credential); - -await foreach (DevCenterProject item in client.GetProjectsAsync()) -{ -} -]]> -This sample shows how to call GetProjectsAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevCenterClient client = new DevCenterClient(endpoint, credential); @@ -120,17 +68,7 @@ await foreach (DevCenterProject item in client.GetProjectsAsync()) This sample shows how to call GetProjects. "); -TokenCredential credential = new DefaultAzureCredential(); -DevCenterClient client = new DevCenterClient(endpoint, credential); - -foreach (DevCenterProject item in client.GetProjects()) -{ -} -]]> -This sample shows how to call GetProjects with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevCenterClient client = new DevCenterClient(endpoint, credential); @@ -143,7 +81,7 @@ foreach (DevCenterProject item in client.GetProjects()) This sample shows how to call GetProjectsAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevCenterClient client = new DevCenterClient(endpoint, credential); @@ -152,39 +90,13 @@ await foreach (BinaryData item in client.GetProjectsAsync(null)) JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); } -]]> -This sample shows how to call GetProjectsAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -DevCenterClient client = new DevCenterClient(endpoint, credential); - -await foreach (BinaryData item in client.GetProjectsAsync(null)) -{ - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("maxDevBoxesPerUser").ToString()); -} ]]> This sample shows how to call GetProjects and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -DevCenterClient client = new DevCenterClient(endpoint, credential); - -foreach (BinaryData item in client.GetProjects(null)) -{ - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); -} -]]> -This sample shows how to call GetProjects with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevCenterClient client = new DevCenterClient(endpoint, credential); @@ -192,8 +104,6 @@ foreach (BinaryData item in client.GetProjects(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("maxDevBoxesPerUser").ToString()); } ]]> diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxHardwareProfile.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxHardwareProfile.cs index e09e808a4e10..5272d181a26e 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxHardwareProfile.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxHardwareProfile.cs @@ -46,7 +46,7 @@ public partial class DevBoxHardwareProfile private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal DevBoxHardwareProfile() + public DevBoxHardwareProfile() { } diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxImageReference.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxImageReference.cs index 596dcb3dce32..f007cf201494 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxImageReference.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxImageReference.cs @@ -46,7 +46,7 @@ public partial class DevBoxImageReference private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal DevBoxImageReference() + public DevBoxImageReference() { } diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxStorageProfile.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxStorageProfile.cs index 241b2d6ba63d..6f3815d1bcd4 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxStorageProfile.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxStorageProfile.cs @@ -46,7 +46,7 @@ public partial class DevBoxStorageProfile private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal DevBoxStorageProfile() + public DevBoxStorageProfile() { } @@ -60,6 +60,6 @@ internal DevBoxStorageProfile(OSDisk osDisk, IDictionary ser } /// Settings for the operating system disk. - public OSDisk OSDisk { get; } + public OSDisk OSDisk { get; set; } } } diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/OSDisk.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/OSDisk.cs index 2f15b624a167..86ef3ae3f62a 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/OSDisk.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/OSDisk.cs @@ -46,7 +46,7 @@ public partial class OSDisk private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal OSDisk() + public OSDisk() { } diff --git a/sdk/devcenter/Azure.Developer.DevCenter/tests/Generated/Samples/Samples_DeploymentEnvironmentsClient.cs b/sdk/devcenter/Azure.Developer.DevCenter/tests/Generated/Samples/Samples_DeploymentEnvironmentsClient.cs index 6a10ecb302d2..3bac6833b92d 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/tests/Generated/Samples/Samples_DeploymentEnvironmentsClient.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/tests/Generated/Samples/Samples_DeploymentEnvironmentsClient.cs @@ -19,13 +19,13 @@ public partial class Samples_DeploymentEnvironmentsClient { [Test] [Ignore("Only validating compilation of examples")] - public void Example_Environment_GetEnvironment_ShortVersion() + public void Example_Environment_GetEnvironment_GetsAnEnvironment() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - Response response = client.GetEnvironment("", "", "", null); + Response response = client.GetEnvironment("myProject", "me", "mydevenv", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); @@ -36,13 +36,13 @@ public void Example_Environment_GetEnvironment_ShortVersion() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Environment_GetEnvironment_ShortVersion_Async() + public async Task Example_Environment_GetEnvironment_GetsAnEnvironment_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - Response response = await client.GetEnvironmentAsync("", "", "", null); + Response response = await client.GetEnvironmentAsync("myProject", "me", "mydevenv", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); @@ -53,477 +53,139 @@ public async Task Example_Environment_GetEnvironment_ShortVersion_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Environment_GetEnvironment_ShortVersion_Convenience() + public void Example_Environment_GetEnvironment_GetsAnEnvironment_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - Response response = client.GetEnvironment("", "", ""); + Response response = client.GetEnvironment("myProject", "me", "mydevenv"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Environment_GetEnvironment_ShortVersion_Convenience_Async() + public async Task Example_Environment_GetEnvironment_GetsAnEnvironment_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - Response response = await client.GetEnvironmentAsync("", "", ""); + Response response = await client.GetEnvironmentAsync("myProject", "me", "mydevenv"); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Environment_GetEnvironment_AllParameters() + public void Example_Catalog_GetCatalog_GetsTheSpecifiedCatalogWithinTheProject() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - Response response = client.GetEnvironment("", "", "", null); + Response response = client.GetCatalog("myProject", "foo", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("parameters").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("environmentType").ToString()); - Console.WriteLine(result.GetProperty("user").ToString()); - Console.WriteLine(result.GetProperty("provisioningState").ToString()); - Console.WriteLine(result.GetProperty("resourceGroupId").ToString()); - Console.WriteLine(result.GetProperty("catalogName").ToString()); - Console.WriteLine(result.GetProperty("environmentDefinitionName").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Environment_GetEnvironment_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - - Response response = await client.GetEnvironmentAsync("", "", "", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("parameters").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("environmentType").ToString()); - Console.WriteLine(result.GetProperty("user").ToString()); - Console.WriteLine(result.GetProperty("provisioningState").ToString()); - Console.WriteLine(result.GetProperty("resourceGroupId").ToString()); - Console.WriteLine(result.GetProperty("catalogName").ToString()); - Console.WriteLine(result.GetProperty("environmentDefinitionName").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Environment_GetEnvironment_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - - Response response = client.GetEnvironment("", "", ""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Environment_GetEnvironment_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - - Response response = await client.GetEnvironmentAsync("", "", ""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Catalog_GetCatalog_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - - Response response = client.GetCatalog("", "", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Catalog_GetCatalog_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - - Response response = await client.GetCatalogAsync("", "", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Catalog_GetCatalog_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - - Response response = client.GetCatalog("", ""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Catalog_GetCatalog_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - - Response response = await client.GetCatalogAsync("", ""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Catalog_GetCatalog_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - - Response response = client.GetCatalog("", "", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Catalog_GetCatalog_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - - Response response = await client.GetCatalogAsync("", "", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Catalog_GetCatalog_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - - Response response = client.GetCatalog("", ""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Catalog_GetCatalog_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - - Response response = await client.GetCatalogAsync("", ""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_EnvironmentDefinition_GetEnvironmentDefinition_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - - Response response = client.GetEnvironmentDefinition("", "", "", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("catalogName").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_EnvironmentDefinition_GetEnvironmentDefinition_ShortVersion_Async() + public async Task Example_Catalog_GetCatalog_GetsTheSpecifiedCatalogWithinTheProject_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - Response response = await client.GetEnvironmentDefinitionAsync("", "", "", null); + Response response = await client.GetCatalogAsync("myProject", "foo", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("catalogName").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_EnvironmentDefinition_GetEnvironmentDefinition_ShortVersion_Convenience() + public void Example_Catalog_GetCatalog_GetsTheSpecifiedCatalogWithinTheProject_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - Response response = client.GetEnvironmentDefinition("", "", ""); + Response response = client.GetCatalog("myProject", "foo"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_EnvironmentDefinition_GetEnvironmentDefinition_ShortVersion_Convenience_Async() + public async Task Example_Catalog_GetCatalog_GetsTheSpecifiedCatalogWithinTheProject_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - Response response = await client.GetEnvironmentDefinitionAsync("", "", ""); + Response response = await client.GetCatalogAsync("myProject", "foo"); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_EnvironmentDefinition_GetEnvironmentDefinition_AllParameters() + public void Example_EnvironmentDefinition_GetEnvironmentDefinition_GetAnEnvironmentDefinitionFromACatalog() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - Response response = client.GetEnvironmentDefinition("", "", "", null); + Response response = client.GetEnvironmentDefinition("myProject", "myCatalog", "foo", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("catalogName").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("default").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("readOnly").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("required").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("allowed")[0].ToString()); - Console.WriteLine(result.GetProperty("parametersSchema").ToString()); - Console.WriteLine(result.GetProperty("templatePath").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_EnvironmentDefinition_GetEnvironmentDefinition_AllParameters_Async() + public async Task Example_EnvironmentDefinition_GetEnvironmentDefinition_GetAnEnvironmentDefinitionFromACatalog_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - Response response = await client.GetEnvironmentDefinitionAsync("", "", "", null); + Response response = await client.GetEnvironmentDefinitionAsync("myProject", "myCatalog", "foo", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("catalogName").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("default").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("readOnly").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("required").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("allowed")[0].ToString()); - Console.WriteLine(result.GetProperty("parametersSchema").ToString()); - Console.WriteLine(result.GetProperty("templatePath").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_EnvironmentDefinition_GetEnvironmentDefinition_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - - Response response = client.GetEnvironmentDefinition("", "", ""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_EnvironmentDefinition_GetEnvironmentDefinition_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - - Response response = await client.GetEnvironmentDefinitionAsync("", "", ""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_EnvironmentClientOperations_GetAllEnvironments_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - - foreach (BinaryData item in client.GetAllEnvironments("", null)) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("environmentType").ToString()); - Console.WriteLine(result.GetProperty("catalogName").ToString()); - Console.WriteLine(result.GetProperty("environmentDefinitionName").ToString()); - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_EnvironmentClientOperations_GetAllEnvironments_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - - await foreach (BinaryData item in client.GetAllEnvironmentsAsync("", null)) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("environmentType").ToString()); - Console.WriteLine(result.GetProperty("catalogName").ToString()); - Console.WriteLine(result.GetProperty("environmentDefinitionName").ToString()); - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_EnvironmentClientOperations_GetAllEnvironments_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - - foreach (DevCenterEnvironment item in client.GetAllEnvironments("")) - { - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_EnvironmentClientOperations_GetAllEnvironments_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - - await foreach (DevCenterEnvironment item in client.GetAllEnvironmentsAsync("")) - { - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_EnvironmentClientOperations_GetAllEnvironments_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - - foreach (BinaryData item in client.GetAllEnvironments("", null)) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("parameters").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("environmentType").ToString()); - Console.WriteLine(result.GetProperty("user").ToString()); - Console.WriteLine(result.GetProperty("provisioningState").ToString()); - Console.WriteLine(result.GetProperty("resourceGroupId").ToString()); - Console.WriteLine(result.GetProperty("catalogName").ToString()); - Console.WriteLine(result.GetProperty("environmentDefinitionName").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); - } } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_EnvironmentClientOperations_GetAllEnvironments_AllParameters_Async() + public void Example_EnvironmentDefinition_GetEnvironmentDefinition_GetAnEnvironmentDefinitionFromACatalog_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - await foreach (BinaryData item in client.GetAllEnvironmentsAsync("", null)) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("parameters").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("environmentType").ToString()); - Console.WriteLine(result.GetProperty("user").ToString()); - Console.WriteLine(result.GetProperty("provisioningState").ToString()); - Console.WriteLine(result.GetProperty("resourceGroupId").ToString()); - Console.WriteLine(result.GetProperty("catalogName").ToString()); - Console.WriteLine(result.GetProperty("environmentDefinitionName").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); - } + Response response = client.GetEnvironmentDefinition("myProject", "myCatalog", "foo"); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_EnvironmentClientOperations_GetAllEnvironments_AllParameters_Convenience() + public async Task Example_EnvironmentDefinition_GetEnvironmentDefinition_GetAnEnvironmentDefinitionFromACatalog_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - foreach (DevCenterEnvironment item in client.GetAllEnvironments("")) - { - } + Response response = await client.GetEnvironmentDefinitionAsync("myProject", "myCatalog", "foo"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_EnvironmentClientOperations_GetAllEnvironments_AllParameters_Convenience_Async() + public void Example_EnvironmentClientOperations_GetAllEnvironments_ListsTheEnvironmentsForAProject() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - await foreach (DevCenterEnvironment item in client.GetAllEnvironmentsAsync("")) - { - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_EnvironmentClientOperations_GetEnvironments_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - - foreach (BinaryData item in client.GetEnvironments("", "", null)) + foreach (BinaryData item in client.GetAllEnvironments("myProject", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); @@ -535,13 +197,13 @@ public void Example_EnvironmentClientOperations_GetEnvironments_ShortVersion() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_EnvironmentClientOperations_GetEnvironments_ShortVersion_Async() + public async Task Example_EnvironmentClientOperations_GetAllEnvironments_ListsTheEnvironmentsForAProject_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - await foreach (BinaryData item in client.GetEnvironmentsAsync("", "", null)) + await foreach (BinaryData item in client.GetAllEnvironmentsAsync("myProject", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); @@ -553,371 +215,157 @@ public async Task Example_EnvironmentClientOperations_GetEnvironments_ShortVersi [Test] [Ignore("Only validating compilation of examples")] - public void Example_EnvironmentClientOperations_GetEnvironments_ShortVersion_Convenience() + public void Example_EnvironmentClientOperations_GetAllEnvironments_ListsTheEnvironmentsForAProject_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - foreach (DevCenterEnvironment item in client.GetEnvironments("", "")) + foreach (DevCenterEnvironment item in client.GetAllEnvironments("myProject")) { } } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_EnvironmentClientOperations_GetEnvironments_ShortVersion_Convenience_Async() + public async Task Example_EnvironmentClientOperations_GetAllEnvironments_ListsTheEnvironmentsForAProject_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - await foreach (DevCenterEnvironment item in client.GetEnvironmentsAsync("", "")) + await foreach (DevCenterEnvironment item in client.GetAllEnvironmentsAsync("myProject")) { } } [Test] [Ignore("Only validating compilation of examples")] - public void Example_EnvironmentClientOperations_GetEnvironments_AllParameters() + public void Example_EnvironmentClientOperations_GetEnvironments_ListsTheEnvironmentsForAProjectAndUser() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - foreach (BinaryData item in client.GetEnvironments("", "", null)) + foreach (BinaryData item in client.GetEnvironments("myProject", "me", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("parameters").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("environmentType").ToString()); - Console.WriteLine(result.GetProperty("user").ToString()); - Console.WriteLine(result.GetProperty("provisioningState").ToString()); - Console.WriteLine(result.GetProperty("resourceGroupId").ToString()); Console.WriteLine(result.GetProperty("catalogName").ToString()); Console.WriteLine(result.GetProperty("environmentDefinitionName").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); } } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_EnvironmentClientOperations_GetEnvironments_AllParameters_Async() + public async Task Example_EnvironmentClientOperations_GetEnvironments_ListsTheEnvironmentsForAProjectAndUser_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - await foreach (BinaryData item in client.GetEnvironmentsAsync("", "", null)) + await foreach (BinaryData item in client.GetEnvironmentsAsync("myProject", "me", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("parameters").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("environmentType").ToString()); - Console.WriteLine(result.GetProperty("user").ToString()); - Console.WriteLine(result.GetProperty("provisioningState").ToString()); - Console.WriteLine(result.GetProperty("resourceGroupId").ToString()); Console.WriteLine(result.GetProperty("catalogName").ToString()); Console.WriteLine(result.GetProperty("environmentDefinitionName").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_EnvironmentClientOperations_GetEnvironments_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - - foreach (DevCenterEnvironment item in client.GetEnvironments("", "")) - { - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_EnvironmentClientOperations_GetEnvironments_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - - await foreach (DevCenterEnvironment item in client.GetEnvironmentsAsync("", "")) - { - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Catalog_GetCatalogs_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - - foreach (BinaryData item in client.GetCatalogs("", null)) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Catalog_GetCatalogs_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - - await foreach (BinaryData item in client.GetCatalogsAsync("", null)) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Catalog_GetCatalogs_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - - foreach (DevCenterCatalog item in client.GetCatalogs("")) - { - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Catalog_GetCatalogs_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - - await foreach (DevCenterCatalog item in client.GetCatalogsAsync("")) - { - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Catalog_GetCatalogs_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - - foreach (BinaryData item in client.GetCatalogs("", null)) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Catalog_GetCatalogs_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - - await foreach (BinaryData item in client.GetCatalogsAsync("", null)) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Catalog_GetCatalogs_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - - foreach (DevCenterCatalog item in client.GetCatalogs("")) - { - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Catalog_GetCatalogs_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - - await foreach (DevCenterCatalog item in client.GetCatalogsAsync("")) - { - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_EnvironmentClientOperations_GetEnvironmentDefinitions_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - - foreach (BinaryData item in client.GetEnvironmentDefinitions("", null)) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("catalogName").ToString()); - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_EnvironmentClientOperations_GetEnvironmentDefinitions_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - - await foreach (BinaryData item in client.GetEnvironmentDefinitionsAsync("", null)) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("catalogName").ToString()); } } [Test] [Ignore("Only validating compilation of examples")] - public void Example_EnvironmentClientOperations_GetEnvironmentDefinitions_ShortVersion_Convenience() + public void Example_EnvironmentClientOperations_GetEnvironments_ListsTheEnvironmentsForAProjectAndUser_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - foreach (EnvironmentDefinition item in client.GetEnvironmentDefinitions("")) + foreach (DevCenterEnvironment item in client.GetEnvironments("myProject", "me")) { } } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_EnvironmentClientOperations_GetEnvironmentDefinitions_ShortVersion_Convenience_Async() + public async Task Example_EnvironmentClientOperations_GetEnvironments_ListsTheEnvironmentsForAProjectAndUser_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - await foreach (EnvironmentDefinition item in client.GetEnvironmentDefinitionsAsync("")) + await foreach (DevCenterEnvironment item in client.GetEnvironmentsAsync("myProject", "me")) { } } [Test] [Ignore("Only validating compilation of examples")] - public void Example_EnvironmentClientOperations_GetEnvironmentDefinitions_AllParameters() + public void Example_Catalog_GetCatalogs_ListsAllOfTheCatalogsAvailableForAProject() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - foreach (BinaryData item in client.GetEnvironmentDefinitions("", null)) + foreach (BinaryData item in client.GetCatalogs("myProject", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("catalogName").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("default").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("readOnly").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("required").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("allowed")[0].ToString()); - Console.WriteLine(result.GetProperty("parametersSchema").ToString()); - Console.WriteLine(result.GetProperty("templatePath").ToString()); } } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_EnvironmentClientOperations_GetEnvironmentDefinitions_AllParameters_Async() + public async Task Example_Catalog_GetCatalogs_ListsAllOfTheCatalogsAvailableForAProject_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - await foreach (BinaryData item in client.GetEnvironmentDefinitionsAsync("", null)) + await foreach (BinaryData item in client.GetCatalogsAsync("myProject", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("catalogName").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("default").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("readOnly").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("required").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("allowed")[0].ToString()); - Console.WriteLine(result.GetProperty("parametersSchema").ToString()); - Console.WriteLine(result.GetProperty("templatePath").ToString()); } } [Test] [Ignore("Only validating compilation of examples")] - public void Example_EnvironmentClientOperations_GetEnvironmentDefinitions_AllParameters_Convenience() + public void Example_Catalog_GetCatalogs_ListsAllOfTheCatalogsAvailableForAProject_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - foreach (EnvironmentDefinition item in client.GetEnvironmentDefinitions("")) + foreach (DevCenterCatalog item in client.GetCatalogs("myProject")) { } } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_EnvironmentClientOperations_GetEnvironmentDefinitions_AllParameters_Convenience_Async() + public async Task Example_Catalog_GetCatalogs_ListsAllOfTheCatalogsAvailableForAProject_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - await foreach (EnvironmentDefinition item in client.GetEnvironmentDefinitionsAsync("")) + await foreach (DevCenterCatalog item in client.GetCatalogsAsync("myProject")) { } } [Test] [Ignore("Only validating compilation of examples")] - public void Example_EnvironmentClientOperations_GetEnvironmentDefinitionsByCatalog_ShortVersion() + public void Example_EnvironmentClientOperations_GetEnvironmentDefinitions_ListsAllEnvironmentDefinitionsAvailableForAProject() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - foreach (BinaryData item in client.GetEnvironmentDefinitionsByCatalog("", "", null)) + foreach (BinaryData item in client.GetEnvironmentDefinitions("myProject", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); @@ -928,13 +376,13 @@ public void Example_EnvironmentClientOperations_GetEnvironmentDefinitionsByCatal [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_EnvironmentClientOperations_GetEnvironmentDefinitionsByCatalog_ShortVersion_Async() + public async Task Example_EnvironmentClientOperations_GetEnvironmentDefinitions_ListsAllEnvironmentDefinitionsAvailableForAProject_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - await foreach (BinaryData item in client.GetEnvironmentDefinitionsByCatalogAsync("", "", null)) + await foreach (BinaryData item in client.GetEnvironmentDefinitionsAsync("myProject", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); @@ -945,181 +393,99 @@ public async Task Example_EnvironmentClientOperations_GetEnvironmentDefinitionsB [Test] [Ignore("Only validating compilation of examples")] - public void Example_EnvironmentClientOperations_GetEnvironmentDefinitionsByCatalog_ShortVersion_Convenience() + public void Example_EnvironmentClientOperations_GetEnvironmentDefinitions_ListsAllEnvironmentDefinitionsAvailableForAProject_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - foreach (EnvironmentDefinition item in client.GetEnvironmentDefinitionsByCatalog("", "")) + foreach (EnvironmentDefinition item in client.GetEnvironmentDefinitions("myProject")) { } } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_EnvironmentClientOperations_GetEnvironmentDefinitionsByCatalog_ShortVersion_Convenience_Async() + public async Task Example_EnvironmentClientOperations_GetEnvironmentDefinitions_ListsAllEnvironmentDefinitionsAvailableForAProject_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - await foreach (EnvironmentDefinition item in client.GetEnvironmentDefinitionsByCatalogAsync("", "")) + await foreach (EnvironmentDefinition item in client.GetEnvironmentDefinitionsAsync("myProject")) { } } [Test] [Ignore("Only validating compilation of examples")] - public void Example_EnvironmentClientOperations_GetEnvironmentDefinitionsByCatalog_AllParameters() + public void Example_EnvironmentClientOperations_GetEnvironmentDefinitionsByCatalog_ListsAllEnvironmentDefinitionsAvailableWithinACatalog() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - foreach (BinaryData item in client.GetEnvironmentDefinitionsByCatalog("", "", null)) + foreach (BinaryData item in client.GetEnvironmentDefinitionsByCatalog("myProject", "myCatalog", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("catalogName").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("default").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("readOnly").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("required").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("allowed")[0].ToString()); - Console.WriteLine(result.GetProperty("parametersSchema").ToString()); - Console.WriteLine(result.GetProperty("templatePath").ToString()); } } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_EnvironmentClientOperations_GetEnvironmentDefinitionsByCatalog_AllParameters_Async() + public async Task Example_EnvironmentClientOperations_GetEnvironmentDefinitionsByCatalog_ListsAllEnvironmentDefinitionsAvailableWithinACatalog_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - await foreach (BinaryData item in client.GetEnvironmentDefinitionsByCatalogAsync("", "", null)) + await foreach (BinaryData item in client.GetEnvironmentDefinitionsByCatalogAsync("myProject", "myCatalog", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("catalogName").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("default").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("readOnly").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("required").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("allowed")[0].ToString()); - Console.WriteLine(result.GetProperty("parametersSchema").ToString()); - Console.WriteLine(result.GetProperty("templatePath").ToString()); - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_EnvironmentClientOperations_GetEnvironmentDefinitionsByCatalog_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - - foreach (EnvironmentDefinition item in client.GetEnvironmentDefinitionsByCatalog("", "")) - { - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_EnvironmentClientOperations_GetEnvironmentDefinitionsByCatalog_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - - await foreach (EnvironmentDefinition item in client.GetEnvironmentDefinitionsByCatalogAsync("", "")) - { - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_EnvironmentClientOperations_GetEnvironmentTypes_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - - foreach (BinaryData item in client.GetEnvironmentTypes("", null)) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("deploymentTargetId").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_EnvironmentClientOperations_GetEnvironmentTypes_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - - await foreach (BinaryData item in client.GetEnvironmentTypesAsync("", null)) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("deploymentTargetId").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); } } [Test] [Ignore("Only validating compilation of examples")] - public void Example_EnvironmentClientOperations_GetEnvironmentTypes_ShortVersion_Convenience() + public void Example_EnvironmentClientOperations_GetEnvironmentDefinitionsByCatalog_ListsAllEnvironmentDefinitionsAvailableWithinACatalog_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - foreach (DevCenterEnvironmentType item in client.GetEnvironmentTypes("")) + foreach (EnvironmentDefinition item in client.GetEnvironmentDefinitionsByCatalog("myProject", "myCatalog")) { } } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_EnvironmentClientOperations_GetEnvironmentTypes_ShortVersion_Convenience_Async() + public async Task Example_EnvironmentClientOperations_GetEnvironmentDefinitionsByCatalog_ListsAllEnvironmentDefinitionsAvailableWithinACatalog_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - await foreach (DevCenterEnvironmentType item in client.GetEnvironmentTypesAsync("")) + await foreach (EnvironmentDefinition item in client.GetEnvironmentDefinitionsByCatalogAsync("myProject", "myCatalog")) { } } [Test] [Ignore("Only validating compilation of examples")] - public void Example_EnvironmentClientOperations_GetEnvironmentTypes_AllParameters() + public void Example_EnvironmentClientOperations_GetEnvironmentTypes_ListsAllEnvironmentTypesConfiguredForAProject() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - foreach (BinaryData item in client.GetEnvironmentTypes("", null)) + foreach (BinaryData item in client.GetEnvironmentTypes("myProject", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); @@ -1130,13 +496,13 @@ public void Example_EnvironmentClientOperations_GetEnvironmentTypes_AllParameter [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_EnvironmentClientOperations_GetEnvironmentTypes_AllParameters_Async() + public async Task Example_EnvironmentClientOperations_GetEnvironmentTypes_ListsAllEnvironmentTypesConfiguredForAProject_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - await foreach (BinaryData item in client.GetEnvironmentTypesAsync("", null)) + await foreach (BinaryData item in client.GetEnvironmentTypesAsync("myProject", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); @@ -1147,192 +513,108 @@ public async Task Example_EnvironmentClientOperations_GetEnvironmentTypes_AllPar [Test] [Ignore("Only validating compilation of examples")] - public void Example_EnvironmentClientOperations_GetEnvironmentTypes_AllParameters_Convenience() + public void Example_EnvironmentClientOperations_GetEnvironmentTypes_ListsAllEnvironmentTypesConfiguredForAProject_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - foreach (DevCenterEnvironmentType item in client.GetEnvironmentTypes("")) + foreach (DevCenterEnvironmentType item in client.GetEnvironmentTypes("myProject")) { } } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_EnvironmentClientOperations_GetEnvironmentTypes_AllParameters_Convenience_Async() + public async Task Example_EnvironmentClientOperations_GetEnvironmentTypes_ListsAllEnvironmentTypesConfiguredForAProject_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - await foreach (DevCenterEnvironmentType item in client.GetEnvironmentTypesAsync("")) + await foreach (DevCenterEnvironmentType item in client.GetEnvironmentTypesAsync("myProject")) { } } [Test] [Ignore("Only validating compilation of examples")] - public void Example_EnvironmentClientOperations_CreateOrUpdateEnvironment_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - environmentType = "", - catalogName = "", - environmentDefinitionName = "", - }); - Operation operation = client.CreateOrUpdateEnvironment(WaitUntil.Completed, "", "", "", content); - BinaryData responseData = operation.Value; - - JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("environmentType").ToString()); - Console.WriteLine(result.GetProperty("catalogName").ToString()); - Console.WriteLine(result.GetProperty("environmentDefinitionName").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_EnvironmentClientOperations_CreateOrUpdateEnvironment_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - environmentType = "", - catalogName = "", - environmentDefinitionName = "", - }); - Operation operation = await client.CreateOrUpdateEnvironmentAsync(WaitUntil.Completed, "", "", "", content); - BinaryData responseData = operation.Value; - - JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("environmentType").ToString()); - Console.WriteLine(result.GetProperty("catalogName").ToString()); - Console.WriteLine(result.GetProperty("environmentDefinitionName").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_EnvironmentClientOperations_CreateOrUpdateEnvironment_AllParameters() + public void Example_EnvironmentClientOperations_CreateOrUpdateEnvironment_CreatesOrUpdatesAnEnvironment() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { + environmentType = "DevTest", + catalogName = "main", + environmentDefinitionName = "helloworld", parameters = new { - key = new object(), + functionAppRuntime = "node", + storageAccountType = "Standard_LRS", }, - environmentType = "", - catalogName = "", - environmentDefinitionName = "", }); - Operation operation = client.CreateOrUpdateEnvironment(WaitUntil.Completed, "", "", "", content); + Operation operation = client.CreateOrUpdateEnvironment(WaitUntil.Completed, "myProject", "me", "mydevenv", content); BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("parameters").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("environmentType").ToString()); - Console.WriteLine(result.GetProperty("user").ToString()); - Console.WriteLine(result.GetProperty("provisioningState").ToString()); - Console.WriteLine(result.GetProperty("resourceGroupId").ToString()); Console.WriteLine(result.GetProperty("catalogName").ToString()); Console.WriteLine(result.GetProperty("environmentDefinitionName").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_EnvironmentClientOperations_CreateOrUpdateEnvironment_AllParameters_Async() + public async Task Example_EnvironmentClientOperations_CreateOrUpdateEnvironment_CreatesOrUpdatesAnEnvironment_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { + environmentType = "DevTest", + catalogName = "main", + environmentDefinitionName = "helloworld", parameters = new { - key = new object(), + functionAppRuntime = "node", + storageAccountType = "Standard_LRS", }, - environmentType = "", - catalogName = "", - environmentDefinitionName = "", }); - Operation operation = await client.CreateOrUpdateEnvironmentAsync(WaitUntil.Completed, "", "", "", content); + Operation operation = await client.CreateOrUpdateEnvironmentAsync(WaitUntil.Completed, "myProject", "me", "mydevenv", content); BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("parameters").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("environmentType").ToString()); - Console.WriteLine(result.GetProperty("user").ToString()); - Console.WriteLine(result.GetProperty("provisioningState").ToString()); - Console.WriteLine(result.GetProperty("resourceGroupId").ToString()); Console.WriteLine(result.GetProperty("catalogName").ToString()); Console.WriteLine(result.GetProperty("environmentDefinitionName").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_EnvironmentClientOperations_DeleteEnvironment_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - - Operation operation = client.DeleteEnvironment(WaitUntil.Completed, "", "", ""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_EnvironmentClientOperations_DeleteEnvironment_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - - Operation operation = await client.DeleteEnvironmentAsync(WaitUntil.Completed, "", "", ""); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_EnvironmentClientOperations_DeleteEnvironment_AllParameters() + public void Example_EnvironmentClientOperations_DeleteEnvironment_DeletesAnEnvironmentAndAllItsAssociatedResources() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - Operation operation = client.DeleteEnvironment(WaitUntil.Completed, "", "", ""); + Operation operation = client.DeleteEnvironment(WaitUntil.Completed, "myProject", "me", "mydevenv"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_EnvironmentClientOperations_DeleteEnvironment_AllParameters_Async() + public async Task Example_EnvironmentClientOperations_DeleteEnvironment_DeletesAnEnvironmentAndAllItsAssociatedResources_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - Operation operation = await client.DeleteEnvironmentAsync(WaitUntil.Completed, "", "", ""); + Operation operation = await client.DeleteEnvironmentAsync(WaitUntil.Completed, "myProject", "me", "mydevenv"); } } } diff --git a/sdk/devcenter/Azure.Developer.DevCenter/tests/Generated/Samples/Samples_DevBoxesClient.cs b/sdk/devcenter/Azure.Developer.DevCenter/tests/Generated/Samples/Samples_DevBoxesClient.cs index 01097d8085b6..227fde00f705 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/tests/Generated/Samples/Samples_DevBoxesClient.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/tests/Generated/Samples/Samples_DevBoxesClient.cs @@ -19,13 +19,13 @@ public partial class Samples_DevBoxesClient { [Test] [Ignore("Only validating compilation of examples")] - public void Example_Pool_GetPool_ShortVersion() + public void Example_Pool_GetPool_GetsAPool() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); - Response response = client.GetPool("", "", null); + Response response = client.GetPool("myProject", "DevPool", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); @@ -35,13 +35,13 @@ public void Example_Pool_GetPool_ShortVersion() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Pool_GetPool_ShortVersion_Async() + public async Task Example_Pool_GetPool_GetsAPool_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); - Response response = await client.GetPoolAsync("", "", null); + Response response = await client.GetPoolAsync("myProject", "DevPool", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); @@ -51,175 +51,35 @@ public async Task Example_Pool_GetPool_ShortVersion_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Pool_GetPool_ShortVersion_Convenience() + public void Example_Pool_GetPool_GetsAPool_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); - Response response = client.GetPool("", ""); + Response response = client.GetPool("myProject", "DevPool"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Pool_GetPool_ShortVersion_Convenience_Async() + public async Task Example_Pool_GetPool_GetsAPool_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); - Response response = await client.GetPoolAsync("", ""); + Response response = await client.GetPoolAsync("myProject", "DevPool"); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Pool_GetPool_AllParameters() + public void Example_Schedule_GetSchedule_GetsASchedule() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); - Response response = client.GetPool("", "", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("location").ToString()); - Console.WriteLine(result.GetProperty("osType").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("skuName").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("vCPUs").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("memoryGB").ToString()); - Console.WriteLine(result.GetProperty("hibernateSupport").ToString()); - Console.WriteLine(result.GetProperty("storageProfile").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("operatingSystem").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("osBuildNumber").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("publishedDate").ToString()); - Console.WriteLine(result.GetProperty("localAdministrator").ToString()); - Console.WriteLine(result.GetProperty("stopOnDisconnect").GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("stopOnDisconnect").GetProperty("gracePeriodMinutes").ToString()); - Console.WriteLine(result.GetProperty("healthStatus").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Pool_GetPool_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DevBoxesClient client = new DevBoxesClient(endpoint, credential); - - Response response = await client.GetPoolAsync("", "", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("location").ToString()); - Console.WriteLine(result.GetProperty("osType").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("skuName").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("vCPUs").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("memoryGB").ToString()); - Console.WriteLine(result.GetProperty("hibernateSupport").ToString()); - Console.WriteLine(result.GetProperty("storageProfile").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("operatingSystem").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("osBuildNumber").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("publishedDate").ToString()); - Console.WriteLine(result.GetProperty("localAdministrator").ToString()); - Console.WriteLine(result.GetProperty("stopOnDisconnect").GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("stopOnDisconnect").GetProperty("gracePeriodMinutes").ToString()); - Console.WriteLine(result.GetProperty("healthStatus").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Pool_GetPool_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DevBoxesClient client = new DevBoxesClient(endpoint, credential); - - Response response = client.GetPool("", ""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Pool_GetPool_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DevBoxesClient client = new DevBoxesClient(endpoint, credential); - - Response response = await client.GetPoolAsync("", ""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Schedule_GetSchedule_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DevBoxesClient client = new DevBoxesClient(endpoint, credential); - - Response response = client.GetSchedule("", "", "", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("frequency").ToString()); - Console.WriteLine(result.GetProperty("time").ToString()); - Console.WriteLine(result.GetProperty("timeZone").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Schedule_GetSchedule_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DevBoxesClient client = new DevBoxesClient(endpoint, credential); - - Response response = await client.GetScheduleAsync("", "", "", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("frequency").ToString()); - Console.WriteLine(result.GetProperty("time").ToString()); - Console.WriteLine(result.GetProperty("timeZone").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Schedule_GetSchedule_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DevBoxesClient client = new DevBoxesClient(endpoint, credential); - - Response response = client.GetSchedule("", "", ""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Schedule_GetSchedule_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DevBoxesClient client = new DevBoxesClient(endpoint, credential); - - Response response = await client.GetScheduleAsync("", "", ""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Schedule_GetSchedule_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DevBoxesClient client = new DevBoxesClient(endpoint, credential); - - Response response = client.GetSchedule("", "", "", null); + Response response = client.GetSchedule("myProject", "DevPool", "default", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); @@ -231,13 +91,13 @@ public void Example_Schedule_GetSchedule_AllParameters() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Schedule_GetSchedule_AllParameters_Async() + public async Task Example_Schedule_GetSchedule_GetsASchedule_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); - Response response = await client.GetScheduleAsync("", "", "", null); + Response response = await client.GetScheduleAsync("myProject", "DevPool", "default", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); @@ -249,1886 +109,804 @@ public async Task Example_Schedule_GetSchedule_AllParameters_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Schedule_GetSchedule_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DevBoxesClient client = new DevBoxesClient(endpoint, credential); - - Response response = client.GetSchedule("", "", ""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Schedule_GetSchedule_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DevBoxesClient client = new DevBoxesClient(endpoint, credential); - - Response response = await client.GetScheduleAsync("", "", ""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DevBox_GetDevBox_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DevBoxesClient client = new DevBoxesClient(endpoint, credential); - - Response response = client.GetDevBox("", "", "", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("poolName").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DevBox_GetDevBox_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DevBoxesClient client = new DevBoxesClient(endpoint, credential); - - Response response = await client.GetDevBoxAsync("", "", "", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("poolName").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DevBox_GetDevBox_ShortVersion_Convenience() + public void Example_Schedule_GetSchedule_GetsASchedule_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); - Response response = client.GetDevBox("", "", ""); + Response response = client.GetSchedule("myProject", "DevPool", "default"); } - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DevBox_GetDevBox_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DevBoxesClient client = new DevBoxesClient(endpoint, credential); - - Response response = await client.GetDevBoxAsync("", "", ""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DevBox_GetDevBox_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DevBoxesClient client = new DevBoxesClient(endpoint, credential); - - Response response = client.GetDevBox("", "", "", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("projectName").ToString()); - Console.WriteLine(result.GetProperty("poolName").ToString()); - Console.WriteLine(result.GetProperty("hibernateSupport").ToString()); - Console.WriteLine(result.GetProperty("provisioningState").ToString()); - Console.WriteLine(result.GetProperty("actionState").ToString()); - Console.WriteLine(result.GetProperty("powerState").ToString()); - Console.WriteLine(result.GetProperty("uniqueId").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("location").ToString()); - Console.WriteLine(result.GetProperty("osType").ToString()); - Console.WriteLine(result.GetProperty("user").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("skuName").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("vCPUs").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("memoryGB").ToString()); - Console.WriteLine(result.GetProperty("storageProfile").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("operatingSystem").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("osBuildNumber").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("publishedDate").ToString()); - Console.WriteLine(result.GetProperty("createdTime").ToString()); - Console.WriteLine(result.GetProperty("localAdministrator").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DevBox_GetDevBox_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DevBoxesClient client = new DevBoxesClient(endpoint, credential); - - Response response = await client.GetDevBoxAsync("", "", "", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("projectName").ToString()); - Console.WriteLine(result.GetProperty("poolName").ToString()); - Console.WriteLine(result.GetProperty("hibernateSupport").ToString()); - Console.WriteLine(result.GetProperty("provisioningState").ToString()); - Console.WriteLine(result.GetProperty("actionState").ToString()); - Console.WriteLine(result.GetProperty("powerState").ToString()); - Console.WriteLine(result.GetProperty("uniqueId").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("location").ToString()); - Console.WriteLine(result.GetProperty("osType").ToString()); - Console.WriteLine(result.GetProperty("user").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("skuName").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("vCPUs").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("memoryGB").ToString()); - Console.WriteLine(result.GetProperty("storageProfile").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("operatingSystem").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("osBuildNumber").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("publishedDate").ToString()); - Console.WriteLine(result.GetProperty("createdTime").ToString()); - Console.WriteLine(result.GetProperty("localAdministrator").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DevBox_GetDevBox_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DevBoxesClient client = new DevBoxesClient(endpoint, credential); - - Response response = client.GetDevBox("", "", ""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DevBox_GetDevBox_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DevBoxesClient client = new DevBoxesClient(endpoint, credential); - - Response response = await client.GetDevBoxAsync("", "", ""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DevBoxesClientOperations_GetRemoteConnection_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DevBoxesClient client = new DevBoxesClient(endpoint, credential); - - Response response = client.GetRemoteConnection("", "", "", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DevBoxesClientOperations_GetRemoteConnection_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DevBoxesClient client = new DevBoxesClient(endpoint, credential); - - Response response = await client.GetRemoteConnectionAsync("", "", "", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DevBoxesClientOperations_GetRemoteConnection_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DevBoxesClient client = new DevBoxesClient(endpoint, credential); - - Response response = client.GetRemoteConnection("", "", ""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DevBoxesClientOperations_GetRemoteConnection_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DevBoxesClient client = new DevBoxesClient(endpoint, credential); - - Response response = await client.GetRemoteConnectionAsync("", "", ""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DevBoxesClientOperations_GetRemoteConnection_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DevBoxesClient client = new DevBoxesClient(endpoint, credential); - - Response response = client.GetRemoteConnection("", "", "", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("webUrl").ToString()); - Console.WriteLine(result.GetProperty("rdpConnectionUrl").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DevBoxesClientOperations_GetRemoteConnection_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DevBoxesClient client = new DevBoxesClient(endpoint, credential); - - Response response = await client.GetRemoteConnectionAsync("", "", "", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("webUrl").ToString()); - Console.WriteLine(result.GetProperty("rdpConnectionUrl").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DevBoxesClientOperations_GetRemoteConnection_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DevBoxesClient client = new DevBoxesClient(endpoint, credential); - - Response response = client.GetRemoteConnection("", "", ""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DevBoxesClientOperations_GetRemoteConnection_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DevBoxesClient client = new DevBoxesClient(endpoint, credential); - - Response response = await client.GetRemoteConnectionAsync("", "", ""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DevBoxAction_GetDevBoxAction_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DevBoxesClient client = new DevBoxesClient(endpoint, credential); - - Response response = client.GetDevBoxAction("", "", "", "", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("actionType").ToString()); - Console.WriteLine(result.GetProperty("sourceId").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DevBoxAction_GetDevBoxAction_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DevBoxesClient client = new DevBoxesClient(endpoint, credential); - - Response response = await client.GetDevBoxActionAsync("", "", "", "", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("actionType").ToString()); - Console.WriteLine(result.GetProperty("sourceId").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DevBoxAction_GetDevBoxAction_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DevBoxesClient client = new DevBoxesClient(endpoint, credential); - - Response response = client.GetDevBoxAction("", "", "", ""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DevBoxAction_GetDevBoxAction_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DevBoxesClient client = new DevBoxesClient(endpoint, credential); - - Response response = await client.GetDevBoxActionAsync("", "", "", ""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DevBoxAction_GetDevBoxAction_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DevBoxesClient client = new DevBoxesClient(endpoint, credential); - - Response response = client.GetDevBoxAction("", "", "", "", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("actionType").ToString()); - Console.WriteLine(result.GetProperty("sourceId").ToString()); - Console.WriteLine(result.GetProperty("suspendedUntil").ToString()); - Console.WriteLine(result.GetProperty("next").GetProperty("scheduledTime").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DevBoxAction_GetDevBoxAction_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DevBoxesClient client = new DevBoxesClient(endpoint, credential); - - Response response = await client.GetDevBoxActionAsync("", "", "", "", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("actionType").ToString()); - Console.WriteLine(result.GetProperty("sourceId").ToString()); - Console.WriteLine(result.GetProperty("suspendedUntil").ToString()); - Console.WriteLine(result.GetProperty("next").GetProperty("scheduledTime").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DevBoxAction_GetDevBoxAction_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DevBoxesClient client = new DevBoxesClient(endpoint, credential); - - Response response = client.GetDevBoxAction("", "", "", ""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DevBoxAction_GetDevBoxAction_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DevBoxesClient client = new DevBoxesClient(endpoint, credential); - - Response response = await client.GetDevBoxActionAsync("", "", "", ""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DevBoxesClientOperations_SkipAction_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DevBoxesClient client = new DevBoxesClient(endpoint, credential); - - Response response = client.SkipAction("", "", "", ""); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DevBoxesClientOperations_SkipAction_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DevBoxesClient client = new DevBoxesClient(endpoint, credential); - - Response response = await client.SkipActionAsync("", "", "", ""); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DevBoxesClientOperations_SkipAction_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DevBoxesClient client = new DevBoxesClient(endpoint, credential); - - Response response = client.SkipAction("", "", "", ""); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DevBoxesClientOperations_SkipAction_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DevBoxesClient client = new DevBoxesClient(endpoint, credential); - - Response response = await client.SkipActionAsync("", "", "", ""); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DevBoxesClientOperations_DelayAction_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DevBoxesClient client = new DevBoxesClient(endpoint, credential); - - Response response = client.DelayAction("", "", "", "", 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("actionType").ToString()); - Console.WriteLine(result.GetProperty("sourceId").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DevBoxesClientOperations_DelayAction_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DevBoxesClient client = new DevBoxesClient(endpoint, credential); - - Response response = await client.DelayActionAsync("", "", "", "", 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("actionType").ToString()); - Console.WriteLine(result.GetProperty("sourceId").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DevBoxesClientOperations_DelayAction_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DevBoxesClient client = new DevBoxesClient(endpoint, credential); - - Response response = client.DelayAction("", "", "", "", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DevBoxesClientOperations_DelayAction_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DevBoxesClient client = new DevBoxesClient(endpoint, credential); - - Response response = await client.DelayActionAsync("", "", "", "", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DevBoxesClientOperations_DelayAction_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DevBoxesClient client = new DevBoxesClient(endpoint, credential); - - Response response = client.DelayAction("", "", "", "", 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("actionType").ToString()); - Console.WriteLine(result.GetProperty("sourceId").ToString()); - Console.WriteLine(result.GetProperty("suspendedUntil").ToString()); - Console.WriteLine(result.GetProperty("next").GetProperty("scheduledTime").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DevBoxesClientOperations_DelayAction_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DevBoxesClient client = new DevBoxesClient(endpoint, credential); - - Response response = await client.DelayActionAsync("", "", "", "", 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("actionType").ToString()); - Console.WriteLine(result.GetProperty("sourceId").ToString()); - Console.WriteLine(result.GetProperty("suspendedUntil").ToString()); - Console.WriteLine(result.GetProperty("next").GetProperty("scheduledTime").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DevBoxesClientOperations_DelayAction_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DevBoxesClient client = new DevBoxesClient(endpoint, credential); - - Response response = client.DelayAction("", "", "", "", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DevBoxesClientOperations_DelayAction_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DevBoxesClient client = new DevBoxesClient(endpoint, credential); - - Response response = await client.DelayActionAsync("", "", "", "", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Pool_GetPools_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DevBoxesClient client = new DevBoxesClient(endpoint, credential); - - foreach (BinaryData item in client.GetPools("", null)) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("location").ToString()); - Console.WriteLine(result.GetProperty("healthStatus").ToString()); - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Pool_GetPools_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DevBoxesClient client = new DevBoxesClient(endpoint, credential); - - await foreach (BinaryData item in client.GetPoolsAsync("", null)) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("location").ToString()); - Console.WriteLine(result.GetProperty("healthStatus").ToString()); - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Pool_GetPools_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DevBoxesClient client = new DevBoxesClient(endpoint, credential); - - foreach (DevBoxPool item in client.GetPools("")) - { - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Pool_GetPools_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DevBoxesClient client = new DevBoxesClient(endpoint, credential); - - await foreach (DevBoxPool item in client.GetPoolsAsync("")) - { - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Pool_GetPools_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DevBoxesClient client = new DevBoxesClient(endpoint, credential); - - foreach (BinaryData item in client.GetPools("", null)) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("location").ToString()); - Console.WriteLine(result.GetProperty("osType").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("skuName").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("vCPUs").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("memoryGB").ToString()); - Console.WriteLine(result.GetProperty("hibernateSupport").ToString()); - Console.WriteLine(result.GetProperty("storageProfile").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("operatingSystem").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("osBuildNumber").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("publishedDate").ToString()); - Console.WriteLine(result.GetProperty("localAdministrator").ToString()); - Console.WriteLine(result.GetProperty("stopOnDisconnect").GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("stopOnDisconnect").GetProperty("gracePeriodMinutes").ToString()); - Console.WriteLine(result.GetProperty("healthStatus").ToString()); - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Pool_GetPools_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DevBoxesClient client = new DevBoxesClient(endpoint, credential); - - await foreach (BinaryData item in client.GetPoolsAsync("", null)) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("location").ToString()); - Console.WriteLine(result.GetProperty("osType").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("skuName").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("vCPUs").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("memoryGB").ToString()); - Console.WriteLine(result.GetProperty("hibernateSupport").ToString()); - Console.WriteLine(result.GetProperty("storageProfile").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("operatingSystem").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("osBuildNumber").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("publishedDate").ToString()); - Console.WriteLine(result.GetProperty("localAdministrator").ToString()); - Console.WriteLine(result.GetProperty("stopOnDisconnect").GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("stopOnDisconnect").GetProperty("gracePeriodMinutes").ToString()); - Console.WriteLine(result.GetProperty("healthStatus").ToString()); - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Pool_GetPools_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DevBoxesClient client = new DevBoxesClient(endpoint, credential); - - foreach (DevBoxPool item in client.GetPools("")) - { - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Pool_GetPools_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DevBoxesClient client = new DevBoxesClient(endpoint, credential); - - await foreach (DevBoxPool item in client.GetPoolsAsync("")) - { - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Schedule_GetSchedules_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DevBoxesClient client = new DevBoxesClient(endpoint, credential); - - foreach (BinaryData item in client.GetSchedules("", "", null)) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("frequency").ToString()); - Console.WriteLine(result.GetProperty("time").ToString()); - Console.WriteLine(result.GetProperty("timeZone").ToString()); - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Schedule_GetSchedules_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DevBoxesClient client = new DevBoxesClient(endpoint, credential); - - await foreach (BinaryData item in client.GetSchedulesAsync("", "", null)) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("frequency").ToString()); - Console.WriteLine(result.GetProperty("time").ToString()); - Console.WriteLine(result.GetProperty("timeZone").ToString()); - } + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Schedule_GetSchedule_GetsASchedule_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DevBoxesClient client = new DevBoxesClient(endpoint, credential); + + Response response = await client.GetScheduleAsync("myProject", "DevPool", "default"); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Schedule_GetSchedules_ShortVersion_Convenience() + public void Example_DevBox_GetDevBox_GetsADevBox() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); - foreach (DevBoxSchedule item in client.GetSchedules("", "")) - { - } + Response response = client.GetDevBox("myProject", "me", "MyDevBox", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("poolName").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Schedule_GetSchedules_ShortVersion_Convenience_Async() + public async Task Example_DevBox_GetDevBox_GetsADevBox_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); - await foreach (DevBoxSchedule item in client.GetSchedulesAsync("", "")) - { - } + Response response = await client.GetDevBoxAsync("myProject", "me", "MyDevBox", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("poolName").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Schedule_GetSchedules_AllParameters() + public void Example_DevBox_GetDevBox_GetsADevBox_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); - foreach (BinaryData item in client.GetSchedules("", "", null)) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("frequency").ToString()); - Console.WriteLine(result.GetProperty("time").ToString()); - Console.WriteLine(result.GetProperty("timeZone").ToString()); - } + Response response = client.GetDevBox("myProject", "me", "MyDevBox"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Schedule_GetSchedules_AllParameters_Async() + public async Task Example_DevBox_GetDevBox_GetsADevBox_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); - await foreach (BinaryData item in client.GetSchedulesAsync("", "", null)) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("frequency").ToString()); - Console.WriteLine(result.GetProperty("time").ToString()); - Console.WriteLine(result.GetProperty("timeZone").ToString()); - } + Response response = await client.GetDevBoxAsync("myProject", "me", "MyDevBox"); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Schedule_GetSchedules_AllParameters_Convenience() + public void Example_DevBoxesClientOperations_GetRemoteConnection_GetsRDPConnectionInfo() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); - foreach (DevBoxSchedule item in client.GetSchedules("", "")) - { - } + Response response = client.GetRemoteConnection("myProject", "me", "MyDevBox", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Schedule_GetSchedules_AllParameters_Convenience_Async() + public async Task Example_DevBoxesClientOperations_GetRemoteConnection_GetsRDPConnectionInfo_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); - await foreach (DevBoxSchedule item in client.GetSchedulesAsync("", "")) - { - } + Response response = await client.GetRemoteConnectionAsync("myProject", "me", "MyDevBox", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DevBoxesClientOperations_GetAllDevBoxes_ShortVersion() + public void Example_DevBoxesClientOperations_GetRemoteConnection_GetsRDPConnectionInfo_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); - foreach (BinaryData item in client.GetAllDevBoxes(null)) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("poolName").ToString()); - } + Response response = client.GetRemoteConnection("myProject", "me", "MyDevBox"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DevBoxesClientOperations_GetAllDevBoxes_ShortVersion_Async() + public async Task Example_DevBoxesClientOperations_GetRemoteConnection_GetsRDPConnectionInfo_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); - await foreach (BinaryData item in client.GetAllDevBoxesAsync(null)) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("poolName").ToString()); - } + Response response = await client.GetRemoteConnectionAsync("myProject", "me", "MyDevBox"); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DevBoxesClientOperations_GetAllDevBoxes_ShortVersion_Convenience() + public void Example_DevBoxAction_GetDevBoxAction_GetsAnAction() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); - foreach (DevBox item in client.GetAllDevBoxes()) - { - } + Response response = client.GetDevBoxAction("myProject", "me", "myDevBox", "schedule-default", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("actionType").ToString()); + Console.WriteLine(result.GetProperty("sourceId").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DevBoxesClientOperations_GetAllDevBoxes_ShortVersion_Convenience_Async() + public async Task Example_DevBoxAction_GetDevBoxAction_GetsAnAction_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); - await foreach (DevBox item in client.GetAllDevBoxesAsync()) - { - } + Response response = await client.GetDevBoxActionAsync("myProject", "me", "myDevBox", "schedule-default", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("actionType").ToString()); + Console.WriteLine(result.GetProperty("sourceId").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DevBoxesClientOperations_GetAllDevBoxes_AllParameters() + public void Example_DevBoxAction_GetDevBoxAction_GetsAnAction_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); - foreach (BinaryData item in client.GetAllDevBoxes(null)) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("projectName").ToString()); - Console.WriteLine(result.GetProperty("poolName").ToString()); - Console.WriteLine(result.GetProperty("hibernateSupport").ToString()); - Console.WriteLine(result.GetProperty("provisioningState").ToString()); - Console.WriteLine(result.GetProperty("actionState").ToString()); - Console.WriteLine(result.GetProperty("powerState").ToString()); - Console.WriteLine(result.GetProperty("uniqueId").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("location").ToString()); - Console.WriteLine(result.GetProperty("osType").ToString()); - Console.WriteLine(result.GetProperty("user").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("skuName").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("vCPUs").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("memoryGB").ToString()); - Console.WriteLine(result.GetProperty("storageProfile").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("operatingSystem").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("osBuildNumber").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("publishedDate").ToString()); - Console.WriteLine(result.GetProperty("createdTime").ToString()); - Console.WriteLine(result.GetProperty("localAdministrator").ToString()); - } + Response response = client.GetDevBoxAction("myProject", "me", "myDevBox", "schedule-default"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DevBoxesClientOperations_GetAllDevBoxes_AllParameters_Async() + public async Task Example_DevBoxAction_GetDevBoxAction_GetsAnAction_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); - await foreach (BinaryData item in client.GetAllDevBoxesAsync(null)) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("projectName").ToString()); - Console.WriteLine(result.GetProperty("poolName").ToString()); - Console.WriteLine(result.GetProperty("hibernateSupport").ToString()); - Console.WriteLine(result.GetProperty("provisioningState").ToString()); - Console.WriteLine(result.GetProperty("actionState").ToString()); - Console.WriteLine(result.GetProperty("powerState").ToString()); - Console.WriteLine(result.GetProperty("uniqueId").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("location").ToString()); - Console.WriteLine(result.GetProperty("osType").ToString()); - Console.WriteLine(result.GetProperty("user").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("skuName").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("vCPUs").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("memoryGB").ToString()); - Console.WriteLine(result.GetProperty("storageProfile").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("operatingSystem").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("osBuildNumber").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("publishedDate").ToString()); - Console.WriteLine(result.GetProperty("createdTime").ToString()); - Console.WriteLine(result.GetProperty("localAdministrator").ToString()); - } + Response response = await client.GetDevBoxActionAsync("myProject", "me", "myDevBox", "schedule-default"); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DevBoxesClientOperations_GetAllDevBoxes_AllParameters_Convenience() + public void Example_DevBoxesClientOperations_SkipAction_SkipsAnOccurrenceOfAnAction() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); - foreach (DevBox item in client.GetAllDevBoxes()) - { - } + Response response = client.SkipAction("myProject", "me", "myDevBox", "schedule-default"); + + Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DevBoxesClientOperations_GetAllDevBoxes_AllParameters_Convenience_Async() + public async Task Example_DevBoxesClientOperations_SkipAction_SkipsAnOccurrenceOfAnAction_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); - await foreach (DevBox item in client.GetAllDevBoxesAsync()) - { - } + Response response = await client.SkipActionAsync("myProject", "me", "myDevBox", "schedule-default"); + + Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DevBoxesClientOperations_GetAllDevBoxesByUser_ShortVersion() + public void Example_DevBoxesClientOperations_DelayAction_DelaysTheOccurrenceOfAnAction() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); - foreach (BinaryData item in client.GetAllDevBoxesByUser("", null)) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("poolName").ToString()); - } + Response response = client.DelayAction("myProject", "me", "myDevBox", "schedule-default", DateTimeOffset.Parse("2022-09-30T17:00:00Z"), null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("actionType").ToString()); + Console.WriteLine(result.GetProperty("sourceId").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DevBoxesClientOperations_GetAllDevBoxesByUser_ShortVersion_Async() + public async Task Example_DevBoxesClientOperations_DelayAction_DelaysTheOccurrenceOfAnAction_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); - await foreach (BinaryData item in client.GetAllDevBoxesByUserAsync("", null)) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("poolName").ToString()); - } + Response response = await client.DelayActionAsync("myProject", "me", "myDevBox", "schedule-default", DateTimeOffset.Parse("2022-09-30T17:00:00Z"), null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("actionType").ToString()); + Console.WriteLine(result.GetProperty("sourceId").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DevBoxesClientOperations_GetAllDevBoxesByUser_ShortVersion_Convenience() + public void Example_DevBoxesClientOperations_DelayAction_DelaysTheOccurrenceOfAnAction_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); - foreach (DevBox item in client.GetAllDevBoxesByUser("")) - { - } + Response response = client.DelayAction("myProject", "me", "myDevBox", "schedule-default", DateTimeOffset.Parse("2022-09-30T17:00:00Z")); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DevBoxesClientOperations_GetAllDevBoxesByUser_ShortVersion_Convenience_Async() + public async Task Example_DevBoxesClientOperations_DelayAction_DelaysTheOccurrenceOfAnAction_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); - await foreach (DevBox item in client.GetAllDevBoxesByUserAsync("")) - { - } + Response response = await client.DelayActionAsync("myProject", "me", "myDevBox", "schedule-default", DateTimeOffset.Parse("2022-09-30T17:00:00Z")); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DevBoxesClientOperations_GetAllDevBoxesByUser_AllParameters() + public void Example_Pool_GetPools_ListsAvailablePools() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); - foreach (BinaryData item in client.GetAllDevBoxesByUser("", null)) + foreach (BinaryData item in client.GetPools("myProject", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("projectName").ToString()); - Console.WriteLine(result.GetProperty("poolName").ToString()); - Console.WriteLine(result.GetProperty("hibernateSupport").ToString()); - Console.WriteLine(result.GetProperty("provisioningState").ToString()); - Console.WriteLine(result.GetProperty("actionState").ToString()); - Console.WriteLine(result.GetProperty("powerState").ToString()); - Console.WriteLine(result.GetProperty("uniqueId").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("location").ToString()); - Console.WriteLine(result.GetProperty("osType").ToString()); - Console.WriteLine(result.GetProperty("user").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("skuName").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("vCPUs").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("memoryGB").ToString()); - Console.WriteLine(result.GetProperty("storageProfile").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("operatingSystem").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("osBuildNumber").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("publishedDate").ToString()); - Console.WriteLine(result.GetProperty("createdTime").ToString()); - Console.WriteLine(result.GetProperty("localAdministrator").ToString()); + Console.WriteLine(result.GetProperty("healthStatus").ToString()); } } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DevBoxesClientOperations_GetAllDevBoxesByUser_AllParameters_Async() + public async Task Example_Pool_GetPools_ListsAvailablePools_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); - await foreach (BinaryData item in client.GetAllDevBoxesByUserAsync("", null)) + await foreach (BinaryData item in client.GetPoolsAsync("myProject", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("projectName").ToString()); - Console.WriteLine(result.GetProperty("poolName").ToString()); - Console.WriteLine(result.GetProperty("hibernateSupport").ToString()); - Console.WriteLine(result.GetProperty("provisioningState").ToString()); - Console.WriteLine(result.GetProperty("actionState").ToString()); - Console.WriteLine(result.GetProperty("powerState").ToString()); - Console.WriteLine(result.GetProperty("uniqueId").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("location").ToString()); - Console.WriteLine(result.GetProperty("osType").ToString()); - Console.WriteLine(result.GetProperty("user").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("skuName").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("vCPUs").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("memoryGB").ToString()); - Console.WriteLine(result.GetProperty("storageProfile").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("operatingSystem").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("osBuildNumber").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("publishedDate").ToString()); - Console.WriteLine(result.GetProperty("createdTime").ToString()); - Console.WriteLine(result.GetProperty("localAdministrator").ToString()); + Console.WriteLine(result.GetProperty("healthStatus").ToString()); } } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DevBoxesClientOperations_GetAllDevBoxesByUser_AllParameters_Convenience() + public void Example_Pool_GetPools_ListsAvailablePools_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); - foreach (DevBox item in client.GetAllDevBoxesByUser("")) + foreach (DevBoxPool item in client.GetPools("myProject")) { } } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DevBoxesClientOperations_GetAllDevBoxesByUser_AllParameters_Convenience_Async() + public async Task Example_Pool_GetPools_ListsAvailablePools_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); - await foreach (DevBox item in client.GetAllDevBoxesByUserAsync("")) + await foreach (DevBoxPool item in client.GetPoolsAsync("myProject")) { } } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DevBoxesClientOperations_GetDevBoxes_ShortVersion() + public void Example_Schedule_GetSchedules_ListsAvailableSchedulesForAPool() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); - foreach (BinaryData item in client.GetDevBoxes("", "", null)) + foreach (BinaryData item in client.GetSchedules("myProject", "DevPool", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("poolName").ToString()); + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("frequency").ToString()); + Console.WriteLine(result.GetProperty("time").ToString()); + Console.WriteLine(result.GetProperty("timeZone").ToString()); } } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DevBoxesClientOperations_GetDevBoxes_ShortVersion_Async() + public async Task Example_Schedule_GetSchedules_ListsAvailableSchedulesForAPool_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); - await foreach (BinaryData item in client.GetDevBoxesAsync("", "", null)) + await foreach (BinaryData item in client.GetSchedulesAsync("myProject", "DevPool", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("poolName").ToString()); + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("frequency").ToString()); + Console.WriteLine(result.GetProperty("time").ToString()); + Console.WriteLine(result.GetProperty("timeZone").ToString()); } } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DevBoxesClientOperations_GetDevBoxes_ShortVersion_Convenience() + public void Example_Schedule_GetSchedules_ListsAvailableSchedulesForAPool_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); - foreach (DevBox item in client.GetDevBoxes("", "")) + foreach (DevBoxSchedule item in client.GetSchedules("myProject", "DevPool")) { } } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DevBoxesClientOperations_GetDevBoxes_ShortVersion_Convenience_Async() + public async Task Example_Schedule_GetSchedules_ListsAvailableSchedulesForAPool_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); - await foreach (DevBox item in client.GetDevBoxesAsync("", "")) + await foreach (DevBoxSchedule item in client.GetSchedulesAsync("myProject", "DevPool")) { } } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DevBoxesClientOperations_GetDevBoxes_AllParameters() + public void Example_DevBoxesClientOperations_GetAllDevBoxes_ListsDevBoxesThatTheCallerHasAccessToInTheDevCenter() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); - foreach (BinaryData item in client.GetDevBoxes("", "", null)) + foreach (BinaryData item in client.GetAllDevBoxes(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("projectName").ToString()); Console.WriteLine(result.GetProperty("poolName").ToString()); - Console.WriteLine(result.GetProperty("hibernateSupport").ToString()); - Console.WriteLine(result.GetProperty("provisioningState").ToString()); - Console.WriteLine(result.GetProperty("actionState").ToString()); - Console.WriteLine(result.GetProperty("powerState").ToString()); - Console.WriteLine(result.GetProperty("uniqueId").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("location").ToString()); - Console.WriteLine(result.GetProperty("osType").ToString()); - Console.WriteLine(result.GetProperty("user").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("skuName").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("vCPUs").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("memoryGB").ToString()); - Console.WriteLine(result.GetProperty("storageProfile").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("operatingSystem").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("osBuildNumber").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("publishedDate").ToString()); - Console.WriteLine(result.GetProperty("createdTime").ToString()); - Console.WriteLine(result.GetProperty("localAdministrator").ToString()); } } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DevBoxesClientOperations_GetDevBoxes_AllParameters_Async() + public async Task Example_DevBoxesClientOperations_GetAllDevBoxes_ListsDevBoxesThatTheCallerHasAccessToInTheDevCenter_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); - await foreach (BinaryData item in client.GetDevBoxesAsync("", "", null)) + await foreach (BinaryData item in client.GetAllDevBoxesAsync(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("projectName").ToString()); Console.WriteLine(result.GetProperty("poolName").ToString()); - Console.WriteLine(result.GetProperty("hibernateSupport").ToString()); - Console.WriteLine(result.GetProperty("provisioningState").ToString()); - Console.WriteLine(result.GetProperty("actionState").ToString()); - Console.WriteLine(result.GetProperty("powerState").ToString()); - Console.WriteLine(result.GetProperty("uniqueId").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("location").ToString()); - Console.WriteLine(result.GetProperty("osType").ToString()); - Console.WriteLine(result.GetProperty("user").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("skuName").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("vCPUs").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("memoryGB").ToString()); - Console.WriteLine(result.GetProperty("storageProfile").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("operatingSystem").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("osBuildNumber").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("publishedDate").ToString()); - Console.WriteLine(result.GetProperty("createdTime").ToString()); - Console.WriteLine(result.GetProperty("localAdministrator").ToString()); } } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DevBoxesClientOperations_GetDevBoxes_AllParameters_Convenience() + public void Example_DevBoxesClientOperations_GetAllDevBoxes_ListsDevBoxesThatTheCallerHasAccessToInTheDevCenter_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); - foreach (DevBox item in client.GetDevBoxes("", "")) + foreach (DevBox item in client.GetAllDevBoxes()) { } } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DevBoxesClientOperations_GetDevBoxes_AllParameters_Convenience_Async() + public async Task Example_DevBoxesClientOperations_GetAllDevBoxes_ListsDevBoxesThatTheCallerHasAccessToInTheDevCenter_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); - await foreach (DevBox item in client.GetDevBoxesAsync("", "")) + await foreach (DevBox item in client.GetAllDevBoxesAsync()) { } } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DevBoxAction_GetDevBoxActions_ShortVersion() + public void Example_DevBoxesClientOperations_GetAllDevBoxesByUser_ListsDevBoxesInTheDevCenterForAParticularUser() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); - foreach (BinaryData item in client.GetDevBoxActions("", "", "", null)) + foreach (BinaryData item in client.GetAllDevBoxesByUser("me", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("actionType").ToString()); - Console.WriteLine(result.GetProperty("sourceId").ToString()); + Console.WriteLine(result.GetProperty("poolName").ToString()); } } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DevBoxAction_GetDevBoxActions_ShortVersion_Async() + public async Task Example_DevBoxesClientOperations_GetAllDevBoxesByUser_ListsDevBoxesInTheDevCenterForAParticularUser_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); - await foreach (BinaryData item in client.GetDevBoxActionsAsync("", "", "", null)) + await foreach (BinaryData item in client.GetAllDevBoxesByUserAsync("me", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("actionType").ToString()); - Console.WriteLine(result.GetProperty("sourceId").ToString()); + Console.WriteLine(result.GetProperty("poolName").ToString()); } } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DevBoxAction_GetDevBoxActions_ShortVersion_Convenience() + public void Example_DevBoxesClientOperations_GetAllDevBoxesByUser_ListsDevBoxesInTheDevCenterForAParticularUser_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); - foreach (DevBoxAction item in client.GetDevBoxActions("", "", "")) + foreach (DevBox item in client.GetAllDevBoxesByUser("me")) { } } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DevBoxAction_GetDevBoxActions_ShortVersion_Convenience_Async() + public async Task Example_DevBoxesClientOperations_GetAllDevBoxesByUser_ListsDevBoxesInTheDevCenterForAParticularUser_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); - await foreach (DevBoxAction item in client.GetDevBoxActionsAsync("", "", "")) + await foreach (DevBox item in client.GetAllDevBoxesByUserAsync("me")) { } } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DevBoxAction_GetDevBoxActions_AllParameters() + public void Example_DevBoxesClientOperations_GetDevBoxes_ListsDevBoxesInTheProjectForAParticularUser() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); - foreach (BinaryData item in client.GetDevBoxActions("", "", "", null)) + foreach (BinaryData item in client.GetDevBoxes("myProject", "me", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("actionType").ToString()); - Console.WriteLine(result.GetProperty("sourceId").ToString()); - Console.WriteLine(result.GetProperty("suspendedUntil").ToString()); - Console.WriteLine(result.GetProperty("next").GetProperty("scheduledTime").ToString()); + Console.WriteLine(result.GetProperty("poolName").ToString()); } } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DevBoxAction_GetDevBoxActions_AllParameters_Async() + public async Task Example_DevBoxesClientOperations_GetDevBoxes_ListsDevBoxesInTheProjectForAParticularUser_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); - await foreach (BinaryData item in client.GetDevBoxActionsAsync("", "", "", null)) + await foreach (BinaryData item in client.GetDevBoxesAsync("myProject", "me", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("actionType").ToString()); - Console.WriteLine(result.GetProperty("sourceId").ToString()); - Console.WriteLine(result.GetProperty("suspendedUntil").ToString()); - Console.WriteLine(result.GetProperty("next").GetProperty("scheduledTime").ToString()); + Console.WriteLine(result.GetProperty("poolName").ToString()); } } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DevBoxAction_GetDevBoxActions_AllParameters_Convenience() + public void Example_DevBoxesClientOperations_GetDevBoxes_ListsDevBoxesInTheProjectForAParticularUser_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); - foreach (DevBoxAction item in client.GetDevBoxActions("", "", "")) + foreach (DevBox item in client.GetDevBoxes("myProject", "me")) { } } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DevBoxAction_GetDevBoxActions_AllParameters_Convenience_Async() + public async Task Example_DevBoxesClientOperations_GetDevBoxes_ListsDevBoxesInTheProjectForAParticularUser_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); - await foreach (DevBoxAction item in client.GetDevBoxActionsAsync("", "", "")) + await foreach (DevBox item in client.GetDevBoxesAsync("myProject", "me")) { } } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DevBoxesClientOperations_DelayAllActions_ShortVersion() + public void Example_DevBoxAction_GetDevBoxActions_ListsActionsOnADevBox() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); - foreach (BinaryData item in client.DelayAllActions("", "", "", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), null)) + foreach (BinaryData item in client.GetDevBoxActions("myProject", "me", "myDevBox", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("result").ToString()); + Console.WriteLine(result.GetProperty("actionType").ToString()); + Console.WriteLine(result.GetProperty("sourceId").ToString()); } } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DevBoxesClientOperations_DelayAllActions_ShortVersion_Async() + public async Task Example_DevBoxAction_GetDevBoxActions_ListsActionsOnADevBox_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); - await foreach (BinaryData item in client.DelayAllActionsAsync("", "", "", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), null)) + await foreach (BinaryData item in client.GetDevBoxActionsAsync("myProject", "me", "myDevBox", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("result").ToString()); + Console.WriteLine(result.GetProperty("actionType").ToString()); + Console.WriteLine(result.GetProperty("sourceId").ToString()); } } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DevBoxesClientOperations_DelayAllActions_ShortVersion_Convenience() + public void Example_DevBoxAction_GetDevBoxActions_ListsActionsOnADevBox_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); - foreach (DevBoxActionDelayResult item in client.DelayAllActions("", "", "", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"))) + foreach (DevBoxAction item in client.GetDevBoxActions("myProject", "me", "myDevBox")) { } } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DevBoxesClientOperations_DelayAllActions_ShortVersion_Convenience_Async() + public async Task Example_DevBoxAction_GetDevBoxActions_ListsActionsOnADevBox_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); - await foreach (DevBoxActionDelayResult item in client.DelayAllActionsAsync("", "", "", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"))) + await foreach (DevBoxAction item in client.GetDevBoxActionsAsync("myProject", "me", "myDevBox")) { } } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DevBoxesClientOperations_DelayAllActions_AllParameters() + public void Example_DevBoxesClientOperations_DelayAllActions_DelaysAllActions() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); - foreach (BinaryData item in client.DelayAllActions("", "", "", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), null)) + foreach (BinaryData item in client.DelayAllActions("myProject", "me", "myDevBox", DateTimeOffset.Parse("2022-09-30T17:00:00Z"), null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("result").ToString()); - Console.WriteLine(result.GetProperty("action").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("action").GetProperty("actionType").ToString()); - Console.WriteLine(result.GetProperty("action").GetProperty("sourceId").ToString()); - Console.WriteLine(result.GetProperty("action").GetProperty("suspendedUntil").ToString()); - Console.WriteLine(result.GetProperty("action").GetProperty("next").GetProperty("scheduledTime").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); } } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DevBoxesClientOperations_DelayAllActions_AllParameters_Async() + public async Task Example_DevBoxesClientOperations_DelayAllActions_DelaysAllActions_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); - await foreach (BinaryData item in client.DelayAllActionsAsync("", "", "", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), null)) + await foreach (BinaryData item in client.DelayAllActionsAsync("myProject", "me", "myDevBox", DateTimeOffset.Parse("2022-09-30T17:00:00Z"), null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("result").ToString()); - Console.WriteLine(result.GetProperty("action").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("action").GetProperty("actionType").ToString()); - Console.WriteLine(result.GetProperty("action").GetProperty("sourceId").ToString()); - Console.WriteLine(result.GetProperty("action").GetProperty("suspendedUntil").ToString()); - Console.WriteLine(result.GetProperty("action").GetProperty("next").GetProperty("scheduledTime").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); } } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DevBoxesClientOperations_DelayAllActions_AllParameters_Convenience() + public void Example_DevBoxesClientOperations_DelayAllActions_DelaysAllActions_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); - foreach (DevBoxActionDelayResult item in client.DelayAllActions("", "", "", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"))) + foreach (DevBoxActionDelayResult item in client.DelayAllActions("myProject", "me", "myDevBox", DateTimeOffset.Parse("2022-09-30T17:00:00Z"))) { } } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DevBoxesClientOperations_DelayAllActions_AllParameters_Convenience_Async() + public async Task Example_DevBoxesClientOperations_DelayAllActions_DelaysAllActions_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); - await foreach (DevBoxActionDelayResult item in client.DelayAllActionsAsync("", "", "", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"))) + await foreach (DevBoxActionDelayResult item in client.DelayAllActionsAsync("myProject", "me", "myDevBox", DateTimeOffset.Parse("2022-09-30T17:00:00Z"))) { } } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DevBoxesClientOperations_CreateDevBox_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DevBoxesClient client = new DevBoxesClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - poolName = "", - }); - Operation operation = client.CreateDevBox(WaitUntil.Completed, "", "", "", content); - BinaryData responseData = operation.Value; - - JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("poolName").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DevBoxesClientOperations_CreateDevBox_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DevBoxesClient client = new DevBoxesClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - poolName = "", - }); - Operation operation = await client.CreateDevBoxAsync(WaitUntil.Completed, "", "", "", content); - BinaryData responseData = operation.Value; - - JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("poolName").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DevBoxesClientOperations_CreateDevBox_AllParameters() + public void Example_DevBoxesClientOperations_CreateDevBox_CreatesOrReplacesADevBox() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - poolName = "", - localAdministrator = "Enabled", + poolName = "LargeDevWorkStationPool", }); - Operation operation = client.CreateDevBox(WaitUntil.Completed, "", "", "", content); + Operation operation = client.CreateDevBox(WaitUntil.Completed, "myProject", "me", "MyDevBox", content); BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("projectName").ToString()); Console.WriteLine(result.GetProperty("poolName").ToString()); - Console.WriteLine(result.GetProperty("hibernateSupport").ToString()); - Console.WriteLine(result.GetProperty("provisioningState").ToString()); - Console.WriteLine(result.GetProperty("actionState").ToString()); - Console.WriteLine(result.GetProperty("powerState").ToString()); - Console.WriteLine(result.GetProperty("uniqueId").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("location").ToString()); - Console.WriteLine(result.GetProperty("osType").ToString()); - Console.WriteLine(result.GetProperty("user").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("skuName").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("vCPUs").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("memoryGB").ToString()); - Console.WriteLine(result.GetProperty("storageProfile").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("operatingSystem").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("osBuildNumber").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("publishedDate").ToString()); - Console.WriteLine(result.GetProperty("createdTime").ToString()); - Console.WriteLine(result.GetProperty("localAdministrator").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DevBoxesClientOperations_CreateDevBox_AllParameters_Async() + public async Task Example_DevBoxesClientOperations_CreateDevBox_CreatesOrReplacesADevBox_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - poolName = "", - localAdministrator = "Enabled", + poolName = "LargeDevWorkStationPool", }); - Operation operation = await client.CreateDevBoxAsync(WaitUntil.Completed, "", "", "", content); + Operation operation = await client.CreateDevBoxAsync(WaitUntil.Completed, "myProject", "me", "MyDevBox", content); BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("projectName").ToString()); Console.WriteLine(result.GetProperty("poolName").ToString()); - Console.WriteLine(result.GetProperty("hibernateSupport").ToString()); - Console.WriteLine(result.GetProperty("provisioningState").ToString()); - Console.WriteLine(result.GetProperty("actionState").ToString()); - Console.WriteLine(result.GetProperty("powerState").ToString()); - Console.WriteLine(result.GetProperty("uniqueId").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("location").ToString()); - Console.WriteLine(result.GetProperty("osType").ToString()); - Console.WriteLine(result.GetProperty("user").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("skuName").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("vCPUs").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("memoryGB").ToString()); - Console.WriteLine(result.GetProperty("storageProfile").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("operatingSystem").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("osBuildNumber").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("publishedDate").ToString()); - Console.WriteLine(result.GetProperty("createdTime").ToString()); - Console.WriteLine(result.GetProperty("localAdministrator").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DevBoxesClientOperations_DeleteDevBox_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DevBoxesClient client = new DevBoxesClient(endpoint, credential); - - Operation operation = client.DeleteDevBox(WaitUntil.Completed, "", "", ""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DevBoxesClientOperations_DeleteDevBox_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DevBoxesClient client = new DevBoxesClient(endpoint, credential); - - Operation operation = await client.DeleteDevBoxAsync(WaitUntil.Completed, "", "", ""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DevBoxesClientOperations_DeleteDevBox_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DevBoxesClient client = new DevBoxesClient(endpoint, credential); - - Operation operation = client.DeleteDevBox(WaitUntil.Completed, "", "", ""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DevBoxesClientOperations_DeleteDevBox_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DevBoxesClient client = new DevBoxesClient(endpoint, credential); - - Operation operation = await client.DeleteDevBoxAsync(WaitUntil.Completed, "", "", ""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DevBoxesClientOperations_StartDevBox_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DevBoxesClient client = new DevBoxesClient(endpoint, credential); - - Operation operation = client.StartDevBox(WaitUntil.Completed, "", "", ""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DevBoxesClientOperations_StartDevBox_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DevBoxesClient client = new DevBoxesClient(endpoint, credential); - - Operation operation = await client.StartDevBoxAsync(WaitUntil.Completed, "", "", ""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DevBoxesClientOperations_StartDevBox_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DevBoxesClient client = new DevBoxesClient(endpoint, credential); - - Operation operation = client.StartDevBox(WaitUntil.Completed, "", "", ""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DevBoxesClientOperations_StartDevBox_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DevBoxesClient client = new DevBoxesClient(endpoint, credential); - - Operation operation = await client.StartDevBoxAsync(WaitUntil.Completed, "", "", ""); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DevBoxesClientOperations_StopDevBox_ShortVersion() + public void Example_DevBoxesClientOperations_DeleteDevBox_DeletesADevBox() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); - Operation operation = client.StopDevBox(WaitUntil.Completed, "", "", ""); + Operation operation = client.DeleteDevBox(WaitUntil.Completed, "myProject", "me", "MyDevBox"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DevBoxesClientOperations_StopDevBox_ShortVersion_Async() + public async Task Example_DevBoxesClientOperations_DeleteDevBox_DeletesADevBox_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); - Operation operation = await client.StopDevBoxAsync(WaitUntil.Completed, "", "", ""); + Operation operation = await client.DeleteDevBoxAsync(WaitUntil.Completed, "myProject", "me", "MyDevBox"); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DevBoxesClientOperations_StopDevBox_AllParameters() + public void Example_DevBoxesClientOperations_StartDevBox_StartsADevBox() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); - Operation operation = client.StopDevBox(WaitUntil.Completed, "", "", "", hibernate: true); + Operation operation = client.StartDevBox(WaitUntil.Completed, "myProject", "me", "MyDevBox"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DevBoxesClientOperations_StopDevBox_AllParameters_Async() + public async Task Example_DevBoxesClientOperations_StartDevBox_StartsADevBox_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); - Operation operation = await client.StopDevBoxAsync(WaitUntil.Completed, "", "", "", hibernate: true); + Operation operation = await client.StartDevBoxAsync(WaitUntil.Completed, "myProject", "me", "MyDevBox"); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DevBoxesClientOperations_RestartDevBox_ShortVersion() + public void Example_DevBoxesClientOperations_StopDevBox_StopsADevBox() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); - Operation operation = client.RestartDevBox(WaitUntil.Completed, "", "", ""); + Operation operation = client.StopDevBox(WaitUntil.Completed, "myProject", "me", "MyDevBox"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DevBoxesClientOperations_RestartDevBox_ShortVersion_Async() + public async Task Example_DevBoxesClientOperations_StopDevBox_StopsADevBox_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); - Operation operation = await client.RestartDevBoxAsync(WaitUntil.Completed, "", "", ""); + Operation operation = await client.StopDevBoxAsync(WaitUntil.Completed, "myProject", "me", "MyDevBox"); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DevBoxesClientOperations_RestartDevBox_AllParameters() + public void Example_DevBoxesClientOperations_RestartDevBox_RestartsADevBox() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); - Operation operation = client.RestartDevBox(WaitUntil.Completed, "", "", ""); + Operation operation = client.RestartDevBox(WaitUntil.Completed, "myProject", "me", "MyDevBox"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DevBoxesClientOperations_RestartDevBox_AllParameters_Async() + public async Task Example_DevBoxesClientOperations_RestartDevBox_RestartsADevBox_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); - Operation operation = await client.RestartDevBoxAsync(WaitUntil.Completed, "", "", ""); + Operation operation = await client.RestartDevBoxAsync(WaitUntil.Completed, "myProject", "me", "MyDevBox"); } } } diff --git a/sdk/devcenter/Azure.Developer.DevCenter/tests/Generated/Samples/Samples_DevCenterClient.cs b/sdk/devcenter/Azure.Developer.DevCenter/tests/Generated/Samples/Samples_DevCenterClient.cs index aeff4fca9a00..7ee1be01714a 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/tests/Generated/Samples/Samples_DevCenterClient.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/tests/Generated/Samples/Samples_DevCenterClient.cs @@ -19,13 +19,13 @@ public partial class Samples_DevCenterClient { [Test] [Ignore("Only validating compilation of examples")] - public void Example_Project_GetProject_ShortVersion() + public void Example_Project_GetProject_GetsAProject() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevCenterClient client = new DevCenterClient(endpoint, credential); - Response response = client.GetProject("", null); + Response response = client.GetProject("myProject", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); @@ -33,13 +33,13 @@ public void Example_Project_GetProject_ShortVersion() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Project_GetProject_ShortVersion_Async() + public async Task Example_Project_GetProject_GetsAProject_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevCenterClient client = new DevCenterClient(endpoint, credential); - Response response = await client.GetProjectAsync("", null); + Response response = await client.GetProjectAsync("myProject", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); @@ -47,141 +47,31 @@ public async Task Example_Project_GetProject_ShortVersion_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Project_GetProject_ShortVersion_Convenience() + public void Example_Project_GetProject_GetsAProject_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevCenterClient client = new DevCenterClient(endpoint, credential); - Response response = client.GetProject(""); + Response response = client.GetProject("myProject"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Project_GetProject_ShortVersion_Convenience_Async() + public async Task Example_Project_GetProject_GetsAProject_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevCenterClient client = new DevCenterClient(endpoint, credential); - Response response = await client.GetProjectAsync(""); + Response response = await client.GetProjectAsync("myProject"); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Project_GetProject_AllParameters() + public void Example_Project_GetProjects_ListsAllProjects() { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DevCenterClient client = new DevCenterClient(endpoint, credential); - - Response response = client.GetProject("", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("maxDevBoxesPerUser").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Project_GetProject_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DevCenterClient client = new DevCenterClient(endpoint, credential); - - Response response = await client.GetProjectAsync("", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("maxDevBoxesPerUser").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Project_GetProject_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DevCenterClient client = new DevCenterClient(endpoint, credential); - - Response response = client.GetProject(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Project_GetProject_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DevCenterClient client = new DevCenterClient(endpoint, credential); - - Response response = await client.GetProjectAsync(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Project_GetProjects_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DevCenterClient client = new DevCenterClient(endpoint, credential); - - foreach (BinaryData item in client.GetProjects(null)) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Project_GetProjects_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DevCenterClient client = new DevCenterClient(endpoint, credential); - - await foreach (BinaryData item in client.GetProjectsAsync(null)) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Project_GetProjects_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DevCenterClient client = new DevCenterClient(endpoint, credential); - - foreach (DevCenterProject item in client.GetProjects()) - { - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Project_GetProjects_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DevCenterClient client = new DevCenterClient(endpoint, credential); - - await foreach (DevCenterProject item in client.GetProjectsAsync()) - { - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Project_GetProjects_AllParameters() - { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevCenterClient client = new DevCenterClient(endpoint, credential); @@ -189,16 +79,14 @@ public void Example_Project_GetProjects_AllParameters() { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("maxDevBoxesPerUser").ToString()); } } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Project_GetProjects_AllParameters_Async() + public async Task Example_Project_GetProjects_ListsAllProjects_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevCenterClient client = new DevCenterClient(endpoint, credential); @@ -206,16 +94,14 @@ public async Task Example_Project_GetProjects_AllParameters_Async() { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("maxDevBoxesPerUser").ToString()); } } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Project_GetProjects_AllParameters_Convenience() + public void Example_Project_GetProjects_ListsAllProjects_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevCenterClient client = new DevCenterClient(endpoint, credential); @@ -226,9 +112,9 @@ public void Example_Project_GetProjects_AllParameters_Convenience() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Project_GetProjects_AllParameters_Convenience_Async() + public async Task Example_Project_GetProjects_ListsAllProjects_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevCenterClient client = new DevCenterClient(endpoint, credential); diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/samples/Generated/Samples/Sample_DevOpsPoolCollection.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/samples/Generated/Samples/Sample_DevOpsPoolCollection.cs index b0fe7701b359..e6528a67834c 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/samples/Generated/Samples/Sample_DevOpsPoolCollection.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/samples/Generated/Samples/Sample_DevOpsPoolCollection.cs @@ -16,48 +16,12 @@ namespace Azure.ResourceManager.DevOpsInfrastructure.Samples { public partial class Sample_DevOpsPoolCollection { - // Pools_ListByResourceGroup - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetAll_PoolsListByResourceGroup() - { - // Generated from example definition: specification/devopsinfrastructure/resource-manager/Microsoft.DevOpsInfrastructure/preview/2024-04-04-preview/examples/ListPoolsBySubscriptionAndResourceGroup.json - // this example is just showing the usage of "Pools_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "a2e95d27-c161-4b61-bda4-11512c14c2c2"; - string resourceGroupName = "rg"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this DevOpsPoolResource - DevOpsPoolCollection collection = resourceGroupResource.GetDevOpsPools(); - - // invoke the operation and iterate over the result - await foreach (DevOpsPoolResource item in collection.GetAllAsync()) - { - // the variable item is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DevOpsPoolData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - Console.WriteLine($"Succeeded"); - } - // Pools_Get [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_PoolsGet() { - // Generated from example definition: specification/devopsinfrastructure/resource-manager/Microsoft.DevOpsInfrastructure/preview/2024-04-04-preview/examples/GetPool.json + // Generated from example definition: 2024-04-04-preview/GetPool.json // this example is just showing the usage of "Pools_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -91,7 +55,7 @@ public async Task Get_PoolsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_PoolsGet() { - // Generated from example definition: specification/devopsinfrastructure/resource-manager/Microsoft.DevOpsInfrastructure/preview/2024-04-04-preview/examples/GetPool.json + // Generated from example definition: 2024-04-04-preview/GetPool.json // this example is just showing the usage of "Pools_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -121,7 +85,7 @@ public async Task Exists_PoolsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_PoolsGet() { - // Generated from example definition: specification/devopsinfrastructure/resource-manager/Microsoft.DevOpsInfrastructure/preview/2024-04-04-preview/examples/GetPool.json + // Generated from example definition: 2024-04-04-preview/GetPool.json // this example is just showing the usage of "Pools_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -163,7 +127,7 @@ public async Task GetIfExists_PoolsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_PoolsCreateOrUpdate() { - // Generated from example definition: specification/devopsinfrastructure/resource-manager/Microsoft.DevOpsInfrastructure/preview/2024-04-04-preview/examples/CreateOrUpdatePool.json + // Generated from example definition: 2024-04-04-preview/CreateOrUpdatePool.json // this example is just showing the usage of "Pools_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -208,5 +172,41 @@ public async Task CreateOrUpdate_PoolsCreateOrUpdate() // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } + + // Pools_ListByResourceGroup + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_PoolsListByResourceGroup() + { + // Generated from example definition: 2024-04-04-preview/ListPoolsBySubscriptionAndResourceGroup.json + // this example is just showing the usage of "Pool_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "a2e95d27-c161-4b61-bda4-11512c14c2c2"; + string resourceGroupName = "rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this DevOpsPoolResource + DevOpsPoolCollection collection = resourceGroupResource.GetDevOpsPools(); + + // invoke the operation and iterate over the result + await foreach (DevOpsPoolResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DevOpsPoolData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } } } diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/samples/Generated/Samples/Sample_DevOpsPoolResource.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/samples/Generated/Samples/Sample_DevOpsPoolResource.cs index 76f58d5aa603..2cee55b0d0df 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/samples/Generated/Samples/Sample_DevOpsPoolResource.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/samples/Generated/Samples/Sample_DevOpsPoolResource.cs @@ -16,44 +16,12 @@ namespace Azure.ResourceManager.DevOpsInfrastructure.Samples { public partial class Sample_DevOpsPoolResource { - // Pools_ListBySubscription - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetDevOpsPools_PoolsListBySubscription() - { - // Generated from example definition: specification/devopsinfrastructure/resource-manager/Microsoft.DevOpsInfrastructure/preview/2024-04-04-preview/examples/ListPoolsBySubscription.json - // this example is just showing the usage of "Pools_ListBySubscription" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this SubscriptionResource created on azure - // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "a2e95d27-c161-4b61-bda4-11512c14c2c2"; - ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); - SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); - - // invoke the operation and iterate over the result - await foreach (DevOpsPoolResource item in subscriptionResource.GetDevOpsPoolsAsync()) - { - // the variable item is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DevOpsPoolData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - Console.WriteLine($"Succeeded"); - } - // Pools_Get [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_PoolsGet() { - // Generated from example definition: specification/devopsinfrastructure/resource-manager/Microsoft.DevOpsInfrastructure/preview/2024-04-04-preview/examples/GetPool.json + // Generated from example definition: 2024-04-04-preview/GetPool.json // this example is just showing the usage of "Pools_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -84,7 +52,7 @@ public async Task Get_PoolsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_PoolsUpdate() { - // Generated from example definition: specification/devopsinfrastructure/resource-manager/Microsoft.DevOpsInfrastructure/preview/2024-04-04-preview/examples/UpdatePool.json + // Generated from example definition: 2024-04-04-preview/UpdatePool.json // this example is just showing the usage of "Pools_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -117,7 +85,7 @@ public async Task Update_PoolsUpdate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_PoolsDelete() { - // Generated from example definition: specification/devopsinfrastructure/resource-manager/Microsoft.DevOpsInfrastructure/preview/2024-04-04-preview/examples/DeletePool.json + // Generated from example definition: 2024-04-04-preview/DeletePool.json // this example is just showing the usage of "Pools_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -139,13 +107,45 @@ public async Task Delete_PoolsDelete() Console.WriteLine($"Succeeded"); } + // Pools_ListBySubscription + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetDevOpsPools_PoolsListBySubscription() + { + // Generated from example definition: 2024-04-04-preview/ListPoolsBySubscription.json + // this example is just showing the usage of "Pool_ListBySubscription" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "a2e95d27-c161-4b61-bda4-11512c14c2c2"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + await foreach (DevOpsPoolResource item in subscriptionResource.GetDevOpsPoolsAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DevOpsPoolData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + // ResourceDetails_ListByPool [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetResourceDetails_ResourceDetailsListByPool() { - // Generated from example definition: specification/devopsinfrastructure/resource-manager/Microsoft.DevOpsInfrastructure/preview/2024-04-04-preview/examples/ResourceDetails_ListByPool.json - // this example is just showing the usage of "ResourceDetails_ListByPool" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-04-04-preview/ResourceDetails_ListByPool.json + // this example is just showing the usage of "ResourceDetailsObject_ListByPool" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs index 9bac33676f35..7a4cdecbf4d6 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs @@ -21,8 +21,8 @@ public partial class Sample_ResourceGroupResourceExtensions [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetImageVersionsByImage_ImageVersionsListByImage() { - // Generated from example definition: specification/devopsinfrastructure/resource-manager/Microsoft.DevOpsInfrastructure/preview/2024-04-04-preview/examples/ImageVersions_ListByImage.json - // this example is just showing the usage of "ImageVersions_ListByImage" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-04-04-preview/ImageVersions_ListByImage.json + // this example is just showing the usage of "ImageVersion_ListByImage" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs index 1825275f40df..5955df25941c 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -21,8 +21,8 @@ public partial class Sample_SubscriptionResourceExtensions [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetSkusByLocation_SkuListByLocation() { - // Generated from example definition: specification/devopsinfrastructure/resource-manager/Microsoft.DevOpsInfrastructure/preview/2024-04-04-preview/examples/Sku_ListByLocation.json - // this example is just showing the usage of "Sku_ListByLocation" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-04-04-preview/Sku_ListByLocation.json + // this example is just showing the usage of "ResourceSku_ListByLocation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -44,34 +44,5 @@ public async Task GetSkusByLocation_SkuListByLocation() Console.WriteLine($"Succeeded"); } - - // SubscriptionUsages_Usages - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetUsages_SubscriptionUsagesUsages() - { - // Generated from example definition: specification/devopsinfrastructure/resource-manager/Microsoft.DevOpsInfrastructure/preview/2024-04-04-preview/examples/SubscriptionUsages_Usages.json - // this example is just showing the usage of "SubscriptionUsages_Usages" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this SubscriptionResource created on azure - // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "a2e95d27-c161-4b61-bda4-11512c14c2c2"; - ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); - SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); - - // invoke the operation and iterate over the result - AzureLocation location = new AzureLocation("eastus"); - await foreach (DevOpsResourceQuota item in subscriptionResource.GetUsagesAsync(location)) - { - Console.WriteLine($"Succeeded: {item}"); - } - - Console.WriteLine($"Succeeded"); - } } } diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/Docs/DocumentIntelligenceAdministrationClient.xml b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/Docs/DocumentIntelligenceAdministrationClient.xml index f9a704e36688..99c79f304856 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/Docs/DocumentIntelligenceAdministrationClient.xml +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/Docs/DocumentIntelligenceAdministrationClient.xml @@ -5,26 +5,13 @@ This sample shows how to call AuthorizeModelCopyAsync. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); -AuthorizeCopyContent authorizeCopyRequest = new AuthorizeCopyContent(""); -Response response = await client.AuthorizeModelCopyAsync(authorizeCopyRequest); -]]> -This sample shows how to call AuthorizeModelCopyAsync with all parameters. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - -AuthorizeCopyContent authorizeCopyRequest = new AuthorizeCopyContent("") +AuthorizeCopyContent authorizeCopyRequest = new AuthorizeCopyContent("targetModel") { - Description = "", - Tags = - { - ["key"] = "" - }, + Description = "Target model description", }; Response response = await client.AuthorizeModelCopyAsync(authorizeCopyRequest); ]]> @@ -33,26 +20,13 @@ Response response = await client.AuthorizeModelCopyAsync(auth This sample shows how to call AuthorizeModelCopy. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - -AuthorizeCopyContent authorizeCopyRequest = new AuthorizeCopyContent(""); -Response response = client.AuthorizeModelCopy(authorizeCopyRequest); -]]> -This sample shows how to call AuthorizeModelCopy with all parameters. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); -AuthorizeCopyContent authorizeCopyRequest = new AuthorizeCopyContent("") +AuthorizeCopyContent authorizeCopyRequest = new AuthorizeCopyContent("targetModel") { - Description = "", - Tags = - { - ["key"] = "" - }, + Description = "Target model description", }; Response response = client.AuthorizeModelCopy(authorizeCopyRequest); ]]> @@ -61,38 +35,14 @@ Response response = client.AuthorizeModelCopy(authorizeCopyRe This sample shows how to call AuthorizeModelCopyAsync and parse the result. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - modelId = "", -}); -Response response = await client.AuthorizeModelCopyAsync(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("targetResourceId").ToString()); -Console.WriteLine(result.GetProperty("targetResourceRegion").ToString()); -Console.WriteLine(result.GetProperty("targetModelId").ToString()); -Console.WriteLine(result.GetProperty("targetModelLocation").ToString()); -Console.WriteLine(result.GetProperty("accessToken").ToString()); -Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); -]]> -This sample shows how to call AuthorizeModelCopyAsync with all request content and parse the result. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - modelId = "", - description = "", - tags = new - { - key = "", - }, + modelId = "targetModel", + description = "Target model description", }); Response response = await client.AuthorizeModelCopyAsync(content); @@ -109,38 +59,14 @@ Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); This sample shows how to call AuthorizeModelCopy and parse the result. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - modelId = "", -}); -Response response = client.AuthorizeModelCopy(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("targetResourceId").ToString()); -Console.WriteLine(result.GetProperty("targetResourceRegion").ToString()); -Console.WriteLine(result.GetProperty("targetModelId").ToString()); -Console.WriteLine(result.GetProperty("targetModelLocation").ToString()); -Console.WriteLine(result.GetProperty("accessToken").ToString()); -Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); -]]> -This sample shows how to call AuthorizeModelCopy with all request content and parse the result. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - modelId = "", - description = "", - tags = new - { - key = "", - }, + modelId = "targetModel", + description = "Target model description", }); Response response = client.AuthorizeModelCopy(content); @@ -157,183 +83,103 @@ Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); This sample shows how to call GetModelAsync. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); -Response response = await client.GetModelAsync(""); +Response response = await client.GetModelAsync("myCustomModel"); ]]> -This sample shows how to call GetModelAsync with all parameters. +This sample shows how to call GetModelAsync. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); -Response response = await client.GetModelAsync(""); +Response response = await client.GetModelAsync("prebuilt-invoice"); ]]> This sample shows how to call GetModel. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); -Response response = client.GetModel(""); +Response response = client.GetModel("myCustomModel"); ]]> -This sample shows how to call GetModel with all parameters. +This sample shows how to call GetModel. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); -Response response = client.GetModel(""); +Response response = client.GetModel("prebuilt-invoice"); ]]> This sample shows how to call GetModelAsync and parse the result. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); -Response response = await client.GetModelAsync("", null); +Response response = await client.GetModelAsync("myCustomModel", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("modelId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); ]]> -This sample shows how to call GetModelAsync with all parameters and parse the result. +This sample shows how to call GetModelAsync and parse the result. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); -Response response = await client.GetModelAsync("", null); +Response response = await client.GetModelAsync("prebuilt-invoice", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("modelId").ToString()); -Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); -Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); -Console.WriteLine(result.GetProperty("apiVersion").ToString()); -Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("buildMode").ToString()); -Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); -Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("prefix").ToString()); -Console.WriteLine(result.GetProperty("azureBlobFileListSource").GetProperty("containerUrl").ToString()); -Console.WriteLine(result.GetProperty("azureBlobFileListSource").GetProperty("fileList").ToString()); -Console.WriteLine(result.GetProperty("classifierId").ToString()); -Console.WriteLine(result.GetProperty("split").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("buildMode").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("example").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("example").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("example").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("items").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("items").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("items").GetProperty("example").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldConfidence").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("modelId").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("confidenceThreshold").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("features")[0].ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("queryFields")[0].ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("maxDocumentsToAnalyze").ToString()); -Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); -Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("target").ToString()); -Console.WriteLine(result.GetProperty("trainingHours").ToString()); ]]> This sample shows how to call GetModel and parse the result. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); -Response response = client.GetModel("", null); +Response response = client.GetModel("myCustomModel", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("modelId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); ]]> -This sample shows how to call GetModel with all parameters and parse the result. +This sample shows how to call GetModel and parse the result. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); -Response response = client.GetModel("", null); +Response response = client.GetModel("prebuilt-invoice", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("modelId").ToString()); -Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); -Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); -Console.WriteLine(result.GetProperty("apiVersion").ToString()); -Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("buildMode").ToString()); -Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); -Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("prefix").ToString()); -Console.WriteLine(result.GetProperty("azureBlobFileListSource").GetProperty("containerUrl").ToString()); -Console.WriteLine(result.GetProperty("azureBlobFileListSource").GetProperty("fileList").ToString()); -Console.WriteLine(result.GetProperty("classifierId").ToString()); -Console.WriteLine(result.GetProperty("split").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("buildMode").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("example").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("example").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("example").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("items").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("items").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("items").GetProperty("example").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldConfidence").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("modelId").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("confidenceThreshold").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("features")[0].ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("queryFields")[0].ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("maxDocumentsToAnalyze").ToString()); -Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); -Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("target").ToString()); -Console.WriteLine(result.GetProperty("trainingHours").ToString()); ]]> This sample shows how to call DeleteModelAsync. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - -Response response = await client.DeleteModelAsync(""); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call DeleteModelAsync with all parameters. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); -Response response = await client.DeleteModelAsync(""); +Response response = await client.DeleteModelAsync("myCustomModel"); Console.WriteLine(response.Status); ]]> @@ -342,21 +188,11 @@ Console.WriteLine(response.Status); This sample shows how to call DeleteModel. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - -Response response = client.DeleteModel(""); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call DeleteModel with all parameters. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); -Response response = client.DeleteModel(""); +Response response = client.DeleteModel("myCustomModel"); Console.WriteLine(response.Status); ]]> @@ -365,15 +201,7 @@ Console.WriteLine(response.Status); This sample shows how to call GetResourceInfoAsync. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - -Response response = await client.GetResourceInfoAsync(); -]]> -This sample shows how to call GetResourceInfoAsync with all parameters. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); @@ -384,15 +212,7 @@ Response response = await client.GetResourceInfoAsync(); This sample shows how to call GetResourceInfo. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - -Response response = client.GetResourceInfo(); -]]> -This sample shows how to call GetResourceInfo with all parameters. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); @@ -403,19 +223,7 @@ Response response = client.GetResourceInfo(); This sample shows how to call GetResourceInfoAsync and parse the result. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - -Response response = await client.GetResourceInfoAsync(null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("customDocumentModels").GetProperty("count").ToString()); -Console.WriteLine(result.GetProperty("customDocumentModels").GetProperty("limit").ToString()); -]]> -This sample shows how to call GetResourceInfoAsync with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); @@ -430,19 +238,7 @@ Console.WriteLine(result.GetProperty("customDocumentModels").GetProperty("limit" This sample shows how to call GetResourceInfo and parse the result. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - -Response response = client.GetResourceInfo(null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("customDocumentModels").GetProperty("count").ToString()); -Console.WriteLine(result.GetProperty("customDocumentModels").GetProperty("limit").ToString()); -]]> -This sample shows how to call GetResourceInfo with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); @@ -457,150 +253,73 @@ Console.WriteLine(result.GetProperty("customDocumentModels").GetProperty("limit" This sample shows how to call GetOperationAsync. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - -Response response = await client.GetOperationAsync(""); -]]> -This sample shows how to call GetOperationAsync with all parameters. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); -Response response = await client.GetOperationAsync(""); +Response response = await client.GetOperationAsync("b704bb00-d130-4f3f-a1d8-ca96de3eabb4"); ]]> This sample shows how to call GetOperation. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - -Response response = client.GetOperation(""); -]]> -This sample shows how to call GetOperation with all parameters. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); -Response response = client.GetOperation(""); +Response response = client.GetOperation("b704bb00-d130-4f3f-a1d8-ca96de3eabb4"); ]]> This sample shows how to call GetOperationAsync and parse the result. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - -Response response = await client.GetOperationAsync("", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("operationId").ToString()); -Console.WriteLine(result.GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("createdDateTime").ToString()); -Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); -Console.WriteLine(result.GetProperty("kind").ToString()); -Console.WriteLine(result.GetProperty("resourceLocation").ToString()); -]]> -This sample shows how to call GetOperationAsync with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); -Response response = await client.GetOperationAsync("", null); +Response response = await client.GetOperationAsync("b704bb00-d130-4f3f-a1d8-ca96de3eabb4", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("operationId").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("percentCompleted").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); Console.WriteLine(result.GetProperty("kind").ToString()); Console.WriteLine(result.GetProperty("resourceLocation").ToString()); -Console.WriteLine(result.GetProperty("apiVersion").ToString()); -Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("message").ToString()); ]]> This sample shows how to call GetOperation and parse the result. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - -Response response = client.GetOperation("", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("operationId").ToString()); -Console.WriteLine(result.GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("createdDateTime").ToString()); -Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); -Console.WriteLine(result.GetProperty("kind").ToString()); -Console.WriteLine(result.GetProperty("resourceLocation").ToString()); -]]> -This sample shows how to call GetOperation with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); -Response response = client.GetOperation("", null); +Response response = client.GetOperation("b704bb00-d130-4f3f-a1d8-ca96de3eabb4", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("operationId").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("percentCompleted").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); Console.WriteLine(result.GetProperty("kind").ToString()); Console.WriteLine(result.GetProperty("resourceLocation").ToString()); -Console.WriteLine(result.GetProperty("apiVersion").ToString()); -Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("message").ToString()); ]]> This sample shows how to call AuthorizeClassifierCopyAsync. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); -AuthorizeClassifierCopyContent authorizeCopyRequest = new AuthorizeClassifierCopyContent(""); -Response response = await client.AuthorizeClassifierCopyAsync(authorizeCopyRequest); -]]> -This sample shows how to call AuthorizeClassifierCopyAsync with all parameters. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - -AuthorizeClassifierCopyContent authorizeCopyRequest = new AuthorizeClassifierCopyContent("") +AuthorizeClassifierCopyContent authorizeCopyRequest = new AuthorizeClassifierCopyContent("targetClassifier") { - Description = "", - Tags = - { - ["key"] = "" - }, + Description = "Target classifier description", }; Response response = await client.AuthorizeClassifierCopyAsync(authorizeCopyRequest); ]]> @@ -609,26 +328,13 @@ Response response = await client.AuthorizeClassifie This sample shows how to call AuthorizeClassifierCopy. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - -AuthorizeClassifierCopyContent authorizeCopyRequest = new AuthorizeClassifierCopyContent(""); -Response response = client.AuthorizeClassifierCopy(authorizeCopyRequest); -]]> -This sample shows how to call AuthorizeClassifierCopy with all parameters. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); -AuthorizeClassifierCopyContent authorizeCopyRequest = new AuthorizeClassifierCopyContent("") +AuthorizeClassifierCopyContent authorizeCopyRequest = new AuthorizeClassifierCopyContent("targetClassifier") { - Description = "", - Tags = - { - ["key"] = "" - }, + Description = "Target classifier description", }; Response response = client.AuthorizeClassifierCopy(authorizeCopyRequest); ]]> @@ -637,38 +343,14 @@ Response response = client.AuthorizeClassifierCopy( This sample shows how to call AuthorizeClassifierCopyAsync and parse the result. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - classifierId = "", -}); -Response response = await client.AuthorizeClassifierCopyAsync(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("targetResourceId").ToString()); -Console.WriteLine(result.GetProperty("targetResourceRegion").ToString()); -Console.WriteLine(result.GetProperty("targetClassifierId").ToString()); -Console.WriteLine(result.GetProperty("targetClassifierLocation").ToString()); -Console.WriteLine(result.GetProperty("accessToken").ToString()); -Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); -]]> -This sample shows how to call AuthorizeClassifierCopyAsync with all request content and parse the result. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - classifierId = "", - description = "", - tags = new - { - key = "", - }, + classifierId = "targetClassifier", + description = "Target classifier description", }); Response response = await client.AuthorizeClassifierCopyAsync(content); @@ -685,38 +367,14 @@ Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); This sample shows how to call AuthorizeClassifierCopy and parse the result. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - classifierId = "", -}); -Response response = client.AuthorizeClassifierCopy(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("targetResourceId").ToString()); -Console.WriteLine(result.GetProperty("targetResourceRegion").ToString()); -Console.WriteLine(result.GetProperty("targetClassifierId").ToString()); -Console.WriteLine(result.GetProperty("targetClassifierLocation").ToString()); -Console.WriteLine(result.GetProperty("accessToken").ToString()); -Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); -]]> -This sample shows how to call AuthorizeClassifierCopy with all request content and parse the result. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - classifierId = "", - description = "", - tags = new - { - key = "", - }, + classifierId = "targetClassifier", + description = "Target classifier description", }); Response response = client.AuthorizeClassifierCopy(content); @@ -733,141 +391,67 @@ Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); This sample shows how to call GetClassifierAsync. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - -Response response = await client.GetClassifierAsync(""); -]]> -This sample shows how to call GetClassifierAsync with all parameters. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); -Response response = await client.GetClassifierAsync(""); +Response response = await client.GetClassifierAsync("myClassifier"); ]]> This sample shows how to call GetClassifier. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - -Response response = client.GetClassifier(""); -]]> -This sample shows how to call GetClassifier with all parameters. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); -Response response = client.GetClassifier(""); +Response response = client.GetClassifier("myClassifier"); ]]> This sample shows how to call GetClassifierAsync and parse the result. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); -Response response = await client.GetClassifierAsync("", null); +Response response = await client.GetClassifierAsync("myClassifier", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("classifierId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("apiVersion").ToString()); Console.WriteLine(result.GetProperty("docTypes").GetProperty("").ToString()); -]]> -This sample shows how to call GetClassifierAsync with all parameters and parse the result. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - -Response response = await client.GetClassifierAsync("", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("classifierId").ToString()); -Console.WriteLine(result.GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("createdDateTime").ToString()); -Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); -Console.WriteLine(result.GetProperty("apiVersion").ToString()); -Console.WriteLine(result.GetProperty("baseClassifierId").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("sourceKind").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobSource").GetProperty("prefix").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobFileListSource").GetProperty("containerUrl").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobFileListSource").GetProperty("fileList").ToString()); -Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); -Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("target").ToString()); ]]> This sample shows how to call GetClassifier and parse the result. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); -Response response = client.GetClassifier("", null); +Response response = client.GetClassifier("myClassifier", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("classifierId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("apiVersion").ToString()); Console.WriteLine(result.GetProperty("docTypes").GetProperty("").ToString()); -]]> -This sample shows how to call GetClassifier with all parameters and parse the result. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - -Response response = client.GetClassifier("", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("classifierId").ToString()); -Console.WriteLine(result.GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("createdDateTime").ToString()); -Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); -Console.WriteLine(result.GetProperty("apiVersion").ToString()); -Console.WriteLine(result.GetProperty("baseClassifierId").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("sourceKind").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobSource").GetProperty("prefix").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobFileListSource").GetProperty("containerUrl").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobFileListSource").GetProperty("fileList").ToString()); -Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); -Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("target").ToString()); ]]> This sample shows how to call DeleteClassifierAsync. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - -Response response = await client.DeleteClassifierAsync(""); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call DeleteClassifierAsync with all parameters. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); -Response response = await client.DeleteClassifierAsync(""); +Response response = await client.DeleteClassifierAsync("myClassifier"); Console.WriteLine(response.Status); ]]> @@ -876,21 +460,11 @@ Console.WriteLine(response.Status); This sample shows how to call DeleteClassifier. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - -Response response = client.DeleteClassifier(""); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call DeleteClassifier with all parameters. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); -Response response = client.DeleteClassifier(""); +Response response = client.DeleteClassifier("myClassifier"); Console.WriteLine(response.Status); ]]> @@ -899,17 +473,7 @@ Console.WriteLine(response.Status); This sample shows how to call GetModelsAsync. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - -await foreach (DocumentModelDetails item in client.GetModelsAsync()) -{ -} -]]> -This sample shows how to call GetModelsAsync with all parameters. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); @@ -922,17 +486,7 @@ await foreach (DocumentModelDetails item in client.GetModelsAsync()) This sample shows how to call GetModels. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - -foreach (DocumentModelDetails item in client.GetModels()) -{ -} -]]> -This sample shows how to call GetModels with all parameters. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); @@ -945,20 +499,7 @@ foreach (DocumentModelDetails item in client.GetModels()) This sample shows how to call GetModelsAsync and parse the result. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - -await foreach (BinaryData item in client.GetModelsAsync(null)) -{ - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("modelId").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); -} -]]> -This sample shows how to call GetModelsAsync with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); @@ -966,42 +507,7 @@ await foreach (BinaryData item in client.GetModelsAsync(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("modelId").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); - Console.WriteLine(result.GetProperty("apiVersion").ToString()); - Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("buildMode").ToString()); - Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); - Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("prefix").ToString()); - Console.WriteLine(result.GetProperty("azureBlobFileListSource").GetProperty("containerUrl").ToString()); - Console.WriteLine(result.GetProperty("azureBlobFileListSource").GetProperty("fileList").ToString()); - Console.WriteLine(result.GetProperty("classifierId").ToString()); - Console.WriteLine(result.GetProperty("split").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("buildMode").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("example").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("example").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("example").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("items").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("items").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("items").GetProperty("example").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldConfidence").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("modelId").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("confidenceThreshold").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("features")[0].ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("queryFields")[0].ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("maxDocumentsToAnalyze").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("trainingHours").ToString()); } ]]> @@ -1009,20 +515,7 @@ await foreach (BinaryData item in client.GetModelsAsync(null)) This sample shows how to call GetModels and parse the result. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - -foreach (BinaryData item in client.GetModels(null)) -{ - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("modelId").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); -} -]]> -This sample shows how to call GetModels with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); @@ -1030,42 +523,7 @@ foreach (BinaryData item in client.GetModels(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("modelId").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); - Console.WriteLine(result.GetProperty("apiVersion").ToString()); - Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("buildMode").ToString()); - Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); - Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("prefix").ToString()); - Console.WriteLine(result.GetProperty("azureBlobFileListSource").GetProperty("containerUrl").ToString()); - Console.WriteLine(result.GetProperty("azureBlobFileListSource").GetProperty("fileList").ToString()); - Console.WriteLine(result.GetProperty("classifierId").ToString()); - Console.WriteLine(result.GetProperty("split").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("buildMode").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("example").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("example").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("example").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("items").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("items").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("items").GetProperty("example").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldConfidence").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("modelId").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("confidenceThreshold").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("features")[0].ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("queryFields")[0].ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("maxDocumentsToAnalyze").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("trainingHours").ToString()); } ]]> @@ -1073,17 +531,7 @@ foreach (BinaryData item in client.GetModels(null)) This sample shows how to call GetOperationsAsync. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - -await foreach (OperationDetails item in client.GetOperationsAsync()) -{ -} -]]> -This sample shows how to call GetOperationsAsync with all parameters. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); @@ -1096,17 +544,7 @@ await foreach (OperationDetails item in client.GetOperationsAsync()) This sample shows how to call GetOperations. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - -foreach (OperationDetails item in client.GetOperations()) -{ -} -]]> -This sample shows how to call GetOperations with all parameters. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); @@ -1119,24 +557,7 @@ foreach (OperationDetails item in client.GetOperations()) This sample shows how to call GetOperationsAsync and parse the result. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - -await foreach (BinaryData item in client.GetOperationsAsync(null)) -{ - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("operationId").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); - Console.WriteLine(result.GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("resourceLocation").ToString()); -} -]]> -This sample shows how to call GetOperationsAsync with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); @@ -1145,18 +566,10 @@ await foreach (BinaryData item in client.GetOperationsAsync(null)) JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("operationId").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("percentCompleted").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); Console.WriteLine(result.GetProperty("kind").ToString()); Console.WriteLine(result.GetProperty("resourceLocation").ToString()); - Console.WriteLine(result.GetProperty("apiVersion").ToString()); - Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("message").ToString()); } ]]> @@ -1164,24 +577,7 @@ await foreach (BinaryData item in client.GetOperationsAsync(null)) This sample shows how to call GetOperations and parse the result. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - -foreach (BinaryData item in client.GetOperations(null)) -{ - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("operationId").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); - Console.WriteLine(result.GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("resourceLocation").ToString()); -} -]]> -This sample shows how to call GetOperations with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); @@ -1190,18 +586,10 @@ foreach (BinaryData item in client.GetOperations(null)) JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("operationId").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("percentCompleted").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); Console.WriteLine(result.GetProperty("kind").ToString()); Console.WriteLine(result.GetProperty("resourceLocation").ToString()); - Console.WriteLine(result.GetProperty("apiVersion").ToString()); - Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("message").ToString()); } ]]> @@ -1209,17 +597,7 @@ foreach (BinaryData item in client.GetOperations(null)) This sample shows how to call GetClassifiersAsync. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - -await foreach (DocumentClassifierDetails item in client.GetClassifiersAsync()) -{ -} -]]> -This sample shows how to call GetClassifiersAsync with all parameters. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); @@ -1232,17 +610,7 @@ await foreach (DocumentClassifierDetails item in client.GetClassifiersAsync()) This sample shows how to call GetClassifiers. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - -foreach (DocumentClassifierDetails item in client.GetClassifiers()) -{ -} -]]> -This sample shows how to call GetClassifiers with all parameters. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); @@ -1255,7 +623,7 @@ foreach (DocumentClassifierDetails item in client.GetClassifiers()) This sample shows how to call GetClassifiersAsync and parse the result. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); @@ -1267,38 +635,13 @@ await foreach (BinaryData item in client.GetClassifiersAsync(null)) Console.WriteLine(result.GetProperty("apiVersion").ToString()); Console.WriteLine(result.GetProperty("docTypes").GetProperty("").ToString()); } -]]> -This sample shows how to call GetClassifiersAsync with all parameters and parse the result. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - -await foreach (BinaryData item in client.GetClassifiersAsync(null)) -{ - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("classifierId").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); - Console.WriteLine(result.GetProperty("apiVersion").ToString()); - Console.WriteLine(result.GetProperty("baseClassifierId").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("sourceKind").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobSource").GetProperty("prefix").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobFileListSource").GetProperty("containerUrl").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobFileListSource").GetProperty("fileList").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("target").ToString()); -} ]]> This sample shows how to call GetClassifiers and parse the result. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); @@ -1310,65 +653,27 @@ foreach (BinaryData item in client.GetClassifiers(null)) Console.WriteLine(result.GetProperty("apiVersion").ToString()); Console.WriteLine(result.GetProperty("docTypes").GetProperty("").ToString()); } -]]> -This sample shows how to call GetClassifiers with all parameters and parse the result. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - -foreach (BinaryData item in client.GetClassifiers(null)) -{ - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("classifierId").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); - Console.WriteLine(result.GetProperty("apiVersion").ToString()); - Console.WriteLine(result.GetProperty("baseClassifierId").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("sourceKind").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobSource").GetProperty("prefix").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobFileListSource").GetProperty("containerUrl").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobFileListSource").GetProperty("fileList").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("target").ToString()); -} ]]> This sample shows how to call BuildDocumentModelAsync. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - -BuildDocumentModelContent buildRequest = new BuildDocumentModelContent("", DocumentBuildMode.Template); -Operation operation = await client.BuildDocumentModelAsync(WaitUntil.Completed, buildRequest); -DocumentModelDetails responseData = operation.Value; -]]> -This sample shows how to call BuildDocumentModelAsync with all parameters. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); -BuildDocumentModelContent buildRequest = new BuildDocumentModelContent("", DocumentBuildMode.Template) +BuildDocumentModelContent buildRequest = new BuildDocumentModelContent("myCustomModel", DocumentBuildMode.Template) { - Description = "", - AzureBlobSource = new AzureBlobContentSource(new Uri("http://localhost:3000")) + Description = "Custom model description", + AzureBlobSource = new AzureBlobContentSource(new Uri("https://myStorageAccount.blob.core.windows.net/myContainer?mySasToken")) { - Prefix = "", + Prefix = "trainingDocs/", }, - AzureBlobFileListSource = new AzureBlobFileListContentSource(new Uri("http://localhost:3000"), ""), Tags = { - ["key"] = "" + ["createdBy"] = "myUserId" }, - MaxTrainingHours = 123.45F, - AllowOverwrite = true, }; Operation operation = await client.BuildDocumentModelAsync(WaitUntil.Completed, buildRequest); DocumentModelDetails responseData = operation.Value; @@ -1378,34 +683,21 @@ DocumentModelDetails responseData = operation.Value; This sample shows how to call BuildDocumentModel. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - -BuildDocumentModelContent buildRequest = new BuildDocumentModelContent("", DocumentBuildMode.Template); -Operation operation = client.BuildDocumentModel(WaitUntil.Completed, buildRequest); -DocumentModelDetails responseData = operation.Value; -]]> -This sample shows how to call BuildDocumentModel with all parameters. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); -BuildDocumentModelContent buildRequest = new BuildDocumentModelContent("", DocumentBuildMode.Template) +BuildDocumentModelContent buildRequest = new BuildDocumentModelContent("myCustomModel", DocumentBuildMode.Template) { - Description = "", - AzureBlobSource = new AzureBlobContentSource(new Uri("http://localhost:3000")) + Description = "Custom model description", + AzureBlobSource = new AzureBlobContentSource(new Uri("https://myStorageAccount.blob.core.windows.net/myContainer?mySasToken")) { - Prefix = "", + Prefix = "trainingDocs/", }, - AzureBlobFileListSource = new AzureBlobFileListContentSource(new Uri("http://localhost:3000"), ""), Tags = { - ["key"] = "" + ["createdBy"] = "myUserId" }, - MaxTrainingHours = 123.45F, - AllowOverwrite = true, }; Operation operation = client.BuildDocumentModel(WaitUntil.Completed, buildRequest); DocumentModelDetails responseData = operation.Value; @@ -1415,242 +707,85 @@ DocumentModelDetails responseData = operation.Value; This sample shows how to call BuildDocumentModelAsync and parse the result. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - modelId = "", - buildMode = "template", -}); -Operation operation = await client.BuildDocumentModelAsync(WaitUntil.Completed, content); -BinaryData responseData = operation.Value; - -JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; -Console.WriteLine(result.GetProperty("modelId").ToString()); -Console.WriteLine(result.GetProperty("createdDateTime").ToString()); -]]> -This sample shows how to call BuildDocumentModelAsync with all parameters and request content and parse the result. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - modelId = "", - description = "", + modelId = "myCustomModel", + description = "Custom model description", buildMode = "template", azureBlobSource = new { - containerUrl = "http://localhost:3000", - prefix = "", - }, - azureBlobFileListSource = new - { - containerUrl = "http://localhost:3000", - fileList = "", + containerUrl = "https://myStorageAccount.blob.core.windows.net/myContainer?mySasToken", + prefix = "trainingDocs/", }, tags = new { - key = "", + createdBy = "myUserId", }, - maxTrainingHours = 123.45F, - allowOverwrite = true, }); Operation operation = await client.BuildDocumentModelAsync(WaitUntil.Completed, content); BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("modelId").ToString()); -Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); -Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); -Console.WriteLine(result.GetProperty("apiVersion").ToString()); -Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("buildMode").ToString()); -Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); -Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("prefix").ToString()); -Console.WriteLine(result.GetProperty("azureBlobFileListSource").GetProperty("containerUrl").ToString()); -Console.WriteLine(result.GetProperty("azureBlobFileListSource").GetProperty("fileList").ToString()); -Console.WriteLine(result.GetProperty("classifierId").ToString()); -Console.WriteLine(result.GetProperty("split").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("buildMode").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("example").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("example").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("example").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("items").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("items").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("items").GetProperty("example").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldConfidence").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("modelId").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("confidenceThreshold").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("features")[0].ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("queryFields")[0].ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("maxDocumentsToAnalyze").ToString()); -Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); -Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("target").ToString()); -Console.WriteLine(result.GetProperty("trainingHours").ToString()); ]]> This sample shows how to call BuildDocumentModel and parse the result. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - modelId = "", - buildMode = "template", -}); -Operation operation = client.BuildDocumentModel(WaitUntil.Completed, content); -BinaryData responseData = operation.Value; - -JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; -Console.WriteLine(result.GetProperty("modelId").ToString()); -Console.WriteLine(result.GetProperty("createdDateTime").ToString()); -]]> -This sample shows how to call BuildDocumentModel with all parameters and request content and parse the result. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - modelId = "", - description = "", + modelId = "myCustomModel", + description = "Custom model description", buildMode = "template", azureBlobSource = new { - containerUrl = "http://localhost:3000", - prefix = "", - }, - azureBlobFileListSource = new - { - containerUrl = "http://localhost:3000", - fileList = "", + containerUrl = "https://myStorageAccount.blob.core.windows.net/myContainer?mySasToken", + prefix = "trainingDocs/", }, tags = new { - key = "", + createdBy = "myUserId", }, - maxTrainingHours = 123.45F, - allowOverwrite = true, }); Operation operation = client.BuildDocumentModel(WaitUntil.Completed, content); BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("modelId").ToString()); -Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); -Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); -Console.WriteLine(result.GetProperty("apiVersion").ToString()); -Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("buildMode").ToString()); -Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); -Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("prefix").ToString()); -Console.WriteLine(result.GetProperty("azureBlobFileListSource").GetProperty("containerUrl").ToString()); -Console.WriteLine(result.GetProperty("azureBlobFileListSource").GetProperty("fileList").ToString()); -Console.WriteLine(result.GetProperty("classifierId").ToString()); -Console.WriteLine(result.GetProperty("split").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("buildMode").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("example").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("example").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("example").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("items").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("items").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("items").GetProperty("example").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldConfidence").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("modelId").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("confidenceThreshold").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("features")[0].ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("queryFields")[0].ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("maxDocumentsToAnalyze").ToString()); -Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); -Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("target").ToString()); -Console.WriteLine(result.GetProperty("trainingHours").ToString()); ]]> This sample shows how to call ComposeModelAsync. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - -ComposeDocumentModelContent composeRequest = new ComposeDocumentModelContent("", "", new Dictionary -{ - ["key"] = new DocumentTypeDetails() -}); -Operation operation = await client.ComposeModelAsync(WaitUntil.Completed, composeRequest); -DocumentModelDetails responseData = operation.Value; -]]> -This sample shows how to call ComposeModelAsync with all parameters. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); -ComposeDocumentModelContent composeRequest = new ComposeDocumentModelContent("", "", new Dictionary +ComposeDocumentModelContent composeRequest = new ComposeDocumentModelContent("composedModel", "customClassifier", new Dictionary { - ["key"] = new DocumentTypeDetails + ["formA"] = new DocumentTypeDetails { - Description = "", - BuildMode = DocumentBuildMode.Template, - FieldSchema = - { - ["key"] = new DocumentFieldSchema(DocumentFieldType.String) - { - Description = "", - Example = "", - Items = default, - Properties = - { - ["key"] = default - }, - } - }, - FieldConfidence = - { - ["key"] = 123.45F - }, - ModelId = "", - ConfidenceThreshold = 123.45F, - Features = { DocumentAnalysisFeature.OcrHighResolution }, - QueryFields = { "" }, - MaxDocumentsToAnalyze = 1234, + ModelId = "model1", + }, + ["formB"] = new DocumentTypeDetails + { + ModelId = "model2", } }) { - Description = "", - Split = SplitMode.Auto, - Tags = - { - ["key"] = "" - }, + Description = "Composed model description", }; Operation operation = await client.ComposeModelAsync(WaitUntil.Completed, composeRequest); DocumentModelDetails responseData = operation.Value; @@ -1660,60 +795,23 @@ DocumentModelDetails responseData = operation.Value; This sample shows how to call ComposeModel. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); -ComposeDocumentModelContent composeRequest = new ComposeDocumentModelContent("", "", new Dictionary +ComposeDocumentModelContent composeRequest = new ComposeDocumentModelContent("composedModel", "customClassifier", new Dictionary { - ["key"] = new DocumentTypeDetails() -}); -Operation operation = client.ComposeModel(WaitUntil.Completed, composeRequest); -DocumentModelDetails responseData = operation.Value; -]]> -This sample shows how to call ComposeModel with all parameters. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - -ComposeDocumentModelContent composeRequest = new ComposeDocumentModelContent("", "", new Dictionary -{ - ["key"] = new DocumentTypeDetails + ["formA"] = new DocumentTypeDetails { - Description = "", - BuildMode = DocumentBuildMode.Template, - FieldSchema = - { - ["key"] = new DocumentFieldSchema(DocumentFieldType.String) - { - Description = "", - Example = "", - Items = default, - Properties = - { - ["key"] = default - }, - } - }, - FieldConfidence = - { - ["key"] = 123.45F - }, - ModelId = "", - ConfidenceThreshold = 123.45F, - Features = { DocumentAnalysisFeature.OcrHighResolution }, - QueryFields = { "" }, - MaxDocumentsToAnalyze = 1234, + ModelId = "model1", + }, + ["formB"] = new DocumentTypeDetails + { + ModelId = "model2", } }) { - Description = "", - Split = SplitMode.Auto, - Tags = - { - ["key"] = "" - }, + Description = "Composed model description", }; Operation operation = client.ComposeModel(WaitUntil.Completed, composeRequest); DocumentModelDetails responseData = operation.Value; @@ -1723,74 +821,25 @@ DocumentModelDetails responseData = operation.Value; This sample shows how to call ComposeModelAsync and parse the result. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - modelId = "", - classifierId = "", - docTypes = new - { - key = new object(), - }, -}); -Operation operation = await client.ComposeModelAsync(WaitUntil.Completed, content); -BinaryData responseData = operation.Value; - -JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; -Console.WriteLine(result.GetProperty("modelId").ToString()); -Console.WriteLine(result.GetProperty("createdDateTime").ToString()); -]]> -This sample shows how to call ComposeModelAsync with all parameters and request content and parse the result. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - modelId = "", - description = "", - classifierId = "", - split = "auto", + modelId = "composedModel", + description = "Composed model description", + classifierId = "customClassifier", docTypes = new { - key = new + formA = new { - description = "", - buildMode = "template", - fieldSchema = new - { - key = new - { - type = "string", - description = "", - example = "", - properties = new { }, - }, - }, - fieldConfidence = new - { - key = 123.45F, - }, - modelId = "", - confidenceThreshold = 123.45F, - features = new object[] - { - "ocrHighResolution" - }, - queryFields = new object[] - { - "" - }, - maxDocumentsToAnalyze = 1234, + modelId = "model1", + }, + formB = new + { + modelId = "model2", }, - }, - tags = new - { - key = "", }, }); Operation operation = await client.ComposeModelAsync(WaitUntil.Completed, content); @@ -1798,116 +847,32 @@ BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("modelId").ToString()); -Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); -Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); -Console.WriteLine(result.GetProperty("apiVersion").ToString()); -Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("buildMode").ToString()); -Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); -Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("prefix").ToString()); -Console.WriteLine(result.GetProperty("azureBlobFileListSource").GetProperty("containerUrl").ToString()); -Console.WriteLine(result.GetProperty("azureBlobFileListSource").GetProperty("fileList").ToString()); -Console.WriteLine(result.GetProperty("classifierId").ToString()); -Console.WriteLine(result.GetProperty("split").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("buildMode").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("example").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("example").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("example").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("items").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("items").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("items").GetProperty("example").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldConfidence").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("modelId").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("confidenceThreshold").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("features")[0].ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("queryFields")[0].ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("maxDocumentsToAnalyze").ToString()); -Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); -Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("target").ToString()); -Console.WriteLine(result.GetProperty("trainingHours").ToString()); ]]> This sample shows how to call ComposeModel and parse the result. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - modelId = "", - classifierId = "", - docTypes = new - { - key = new object(), - }, -}); -Operation operation = client.ComposeModel(WaitUntil.Completed, content); -BinaryData responseData = operation.Value; - -JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; -Console.WriteLine(result.GetProperty("modelId").ToString()); -Console.WriteLine(result.GetProperty("createdDateTime").ToString()); -]]> -This sample shows how to call ComposeModel with all parameters and request content and parse the result. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - modelId = "", - description = "", - classifierId = "", - split = "auto", + modelId = "composedModel", + description = "Composed model description", + classifierId = "customClassifier", docTypes = new { - key = new + formA = new { - description = "", - buildMode = "template", - fieldSchema = new - { - key = new - { - type = "string", - description = "", - example = "", - properties = new { }, - }, - }, - fieldConfidence = new - { - key = 123.45F, - }, - modelId = "", - confidenceThreshold = 123.45F, - features = new object[] - { - "ocrHighResolution" - }, - queryFields = new object[] - { - "" - }, - maxDocumentsToAnalyze = 1234, + modelId = "model1", + }, + formB = new + { + modelId = "model2", }, - }, - tags = new - { - key = "", }, }); Operation operation = client.ComposeModel(WaitUntil.Completed, content); @@ -1915,76 +880,25 @@ BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("modelId").ToString()); -Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); -Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); -Console.WriteLine(result.GetProperty("apiVersion").ToString()); -Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("buildMode").ToString()); -Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); -Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("prefix").ToString()); -Console.WriteLine(result.GetProperty("azureBlobFileListSource").GetProperty("containerUrl").ToString()); -Console.WriteLine(result.GetProperty("azureBlobFileListSource").GetProperty("fileList").ToString()); -Console.WriteLine(result.GetProperty("classifierId").ToString()); -Console.WriteLine(result.GetProperty("split").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("buildMode").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("example").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("example").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("example").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("items").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("items").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("items").GetProperty("example").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldConfidence").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("modelId").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("confidenceThreshold").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("features")[0].ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("queryFields")[0].ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("maxDocumentsToAnalyze").ToString()); -Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); -Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("target").ToString()); -Console.WriteLine(result.GetProperty("trainingHours").ToString()); ]]> This sample shows how to call CopyModelToAsync. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - -CopyAuthorization copyToRequest = new CopyAuthorization( -"", -"", -"", -new Uri("http://localhost:3000"), -"", -DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); -Operation operation = await client.CopyModelToAsync(WaitUntil.Completed, "", copyToRequest); -DocumentModelDetails responseData = operation.Value; -]]> -This sample shows how to call CopyModelToAsync with all parameters. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); CopyAuthorization copyToRequest = new CopyAuthorization( -"", -"", -"", -new Uri("http://localhost:3000"), -"", -DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); -Operation operation = await client.CopyModelToAsync(WaitUntil.Completed, "", copyToRequest); +"/subscriptions/targetSub/resourceGroups/targetRG/providers/Microsoft.CognitiveServices/accounts/targetService", +"targetResourceRegion", +"targetModel", +new Uri("https://targetEndpoint.cognitiveservices.azure.com/documentintelligence/documentModels/targetModel"), +"accessToken", +DateTimeOffset.Parse("2021-09-23T09:12:54.552Z")); +Operation operation = await client.CopyModelToAsync(WaitUntil.Completed, "sourceModel", copyToRequest); DocumentModelDetails responseData = operation.Value; ]]> @@ -1992,34 +906,18 @@ DocumentModelDetails responseData = operation.Value; This sample shows how to call CopyModelTo. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - -CopyAuthorization copyToRequest = new CopyAuthorization( -"", -"", -"", -new Uri("http://localhost:3000"), -"", -DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); -Operation operation = client.CopyModelTo(WaitUntil.Completed, "", copyToRequest); -DocumentModelDetails responseData = operation.Value; -]]> -This sample shows how to call CopyModelTo with all parameters. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); CopyAuthorization copyToRequest = new CopyAuthorization( -"", -"", -"", -new Uri("http://localhost:3000"), -"", -DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); -Operation operation = client.CopyModelTo(WaitUntil.Completed, "", copyToRequest); +"/subscriptions/targetSub/resourceGroups/targetRG/providers/Microsoft.CognitiveServices/accounts/targetService", +"targetResourceRegion", +"targetModel", +new Uri("https://targetEndpoint.cognitiveservices.azure.com/documentintelligence/documentModels/targetModel"), +"accessToken", +DateTimeOffset.Parse("2021-09-23T09:12:54.552Z")); +Operation operation = client.CopyModelTo(WaitUntil.Completed, "sourceModel", copyToRequest); DocumentModelDetails responseData = operation.Value; ]]> @@ -2027,203 +925,76 @@ DocumentModelDetails responseData = operation.Value; This sample shows how to call CopyModelToAsync and parse the result. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - targetResourceId = "", - targetResourceRegion = "", - targetModelId = "", - targetModelLocation = "http://localhost:3000", - accessToken = "", - expirationDateTime = "2022-05-10T18:57:31.2311892Z", -}); -Operation operation = await client.CopyModelToAsync(WaitUntil.Completed, "", content); -BinaryData responseData = operation.Value; - -JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; -Console.WriteLine(result.GetProperty("modelId").ToString()); -Console.WriteLine(result.GetProperty("createdDateTime").ToString()); -]]> -This sample shows how to call CopyModelToAsync with all parameters and request content and parse the result. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - targetResourceId = "", - targetResourceRegion = "", - targetModelId = "", - targetModelLocation = "http://localhost:3000", - accessToken = "", - expirationDateTime = "2022-05-10T18:57:31.2311892Z", + targetResourceId = "/subscriptions/targetSub/resourceGroups/targetRG/providers/Microsoft.CognitiveServices/accounts/targetService", + targetResourceRegion = "targetResourceRegion", + targetModelId = "targetModel", + targetModelLocation = "https://targetEndpoint.cognitiveservices.azure.com/documentintelligence/documentModels/targetModel", + accessToken = "accessToken", + expirationDateTime = "2021-09-23T09:12:54.552Z", }); -Operation operation = await client.CopyModelToAsync(WaitUntil.Completed, "", content); +Operation operation = await client.CopyModelToAsync(WaitUntil.Completed, "sourceModel", content); BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("modelId").ToString()); -Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); -Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); -Console.WriteLine(result.GetProperty("apiVersion").ToString()); -Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("buildMode").ToString()); -Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); -Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("prefix").ToString()); -Console.WriteLine(result.GetProperty("azureBlobFileListSource").GetProperty("containerUrl").ToString()); -Console.WriteLine(result.GetProperty("azureBlobFileListSource").GetProperty("fileList").ToString()); -Console.WriteLine(result.GetProperty("classifierId").ToString()); -Console.WriteLine(result.GetProperty("split").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("buildMode").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("example").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("example").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("example").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("items").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("items").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("items").GetProperty("example").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldConfidence").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("modelId").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("confidenceThreshold").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("features")[0].ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("queryFields")[0].ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("maxDocumentsToAnalyze").ToString()); -Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); -Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("target").ToString()); -Console.WriteLine(result.GetProperty("trainingHours").ToString()); ]]> This sample shows how to call CopyModelTo and parse the result. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - targetResourceId = "", - targetResourceRegion = "", - targetModelId = "", - targetModelLocation = "http://localhost:3000", - accessToken = "", - expirationDateTime = "2022-05-10T18:57:31.2311892Z", -}); -Operation operation = client.CopyModelTo(WaitUntil.Completed, "", content); -BinaryData responseData = operation.Value; - -JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; -Console.WriteLine(result.GetProperty("modelId").ToString()); -Console.WriteLine(result.GetProperty("createdDateTime").ToString()); -]]> -This sample shows how to call CopyModelTo with all parameters and request content and parse the result. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - targetResourceId = "", - targetResourceRegion = "", - targetModelId = "", - targetModelLocation = "http://localhost:3000", - accessToken = "", - expirationDateTime = "2022-05-10T18:57:31.2311892Z", + targetResourceId = "/subscriptions/targetSub/resourceGroups/targetRG/providers/Microsoft.CognitiveServices/accounts/targetService", + targetResourceRegion = "targetResourceRegion", + targetModelId = "targetModel", + targetModelLocation = "https://targetEndpoint.cognitiveservices.azure.com/documentintelligence/documentModels/targetModel", + accessToken = "accessToken", + expirationDateTime = "2021-09-23T09:12:54.552Z", }); -Operation operation = client.CopyModelTo(WaitUntil.Completed, "", content); +Operation operation = client.CopyModelTo(WaitUntil.Completed, "sourceModel", content); BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("modelId").ToString()); -Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); -Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); -Console.WriteLine(result.GetProperty("apiVersion").ToString()); -Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("buildMode").ToString()); -Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); -Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("prefix").ToString()); -Console.WriteLine(result.GetProperty("azureBlobFileListSource").GetProperty("containerUrl").ToString()); -Console.WriteLine(result.GetProperty("azureBlobFileListSource").GetProperty("fileList").ToString()); -Console.WriteLine(result.GetProperty("classifierId").ToString()); -Console.WriteLine(result.GetProperty("split").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("buildMode").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("example").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("example").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("example").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("items").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("items").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("items").GetProperty("example").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldConfidence").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("modelId").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("confidenceThreshold").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("features")[0].ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("queryFields")[0].ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("maxDocumentsToAnalyze").ToString()); -Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); -Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("target").ToString()); -Console.WriteLine(result.GetProperty("trainingHours").ToString()); ]]> This sample shows how to call BuildClassifierAsync. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); -BuildDocumentClassifierContent buildRequest = new BuildDocumentClassifierContent("", new Dictionary +BuildDocumentClassifierContent buildRequest = new BuildDocumentClassifierContent("myClassifier", new Dictionary { - ["key"] = new ClassifierDocumentTypeDetails() -}); -Operation operation = await client.BuildClassifierAsync(WaitUntil.Completed, buildRequest); -DocumentClassifierDetails responseData = operation.Value; -]]> -This sample shows how to call BuildClassifierAsync with all parameters. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - -BuildDocumentClassifierContent buildRequest = new BuildDocumentClassifierContent("", new Dictionary -{ - ["key"] = new ClassifierDocumentTypeDetails + ["formA"] = new ClassifierDocumentTypeDetails { - SourceKind = ContentSourceKind.Url, - AzureBlobSource = new AzureBlobContentSource(new Uri("http://localhost:3000")) + AzureBlobSource = new AzureBlobContentSource(new Uri("https://myStorageAccount.blob.core.windows.net/myContainer?mySasToken")) { - Prefix = "", + Prefix = "formADocs/", }, - AzureBlobFileListSource = new AzureBlobFileListContentSource(new Uri("http://localhost:3000"), ""), + }, + ["formB"] = new ClassifierDocumentTypeDetails + { + AzureBlobFileListSource = new AzureBlobFileListContentSource(new Uri("https://myStorageAccount.blob.core.windows.net/myContainer?mySasToken"), "formB.jsonl"), } }) { - Description = "", - BaseClassifierId = "", - AllowOverwrite = true, + Description = "Classifier description", }; Operation operation = await client.BuildClassifierAsync(WaitUntil.Completed, buildRequest); DocumentClassifierDetails responseData = operation.Value; @@ -2233,39 +1004,26 @@ DocumentClassifierDetails responseData = operation.Value; This sample shows how to call BuildClassifier. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - -BuildDocumentClassifierContent buildRequest = new BuildDocumentClassifierContent("", new Dictionary -{ - ["key"] = new ClassifierDocumentTypeDetails() -}); -Operation operation = client.BuildClassifier(WaitUntil.Completed, buildRequest); -DocumentClassifierDetails responseData = operation.Value; -]]> -This sample shows how to call BuildClassifier with all parameters. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); -BuildDocumentClassifierContent buildRequest = new BuildDocumentClassifierContent("", new Dictionary +BuildDocumentClassifierContent buildRequest = new BuildDocumentClassifierContent("myClassifier", new Dictionary { - ["key"] = new ClassifierDocumentTypeDetails + ["formA"] = new ClassifierDocumentTypeDetails { - SourceKind = ContentSourceKind.Url, - AzureBlobSource = new AzureBlobContentSource(new Uri("http://localhost:3000")) + AzureBlobSource = new AzureBlobContentSource(new Uri("https://myStorageAccount.blob.core.windows.net/myContainer?mySasToken")) { - Prefix = "", + Prefix = "formADocs/", }, - AzureBlobFileListSource = new AzureBlobFileListContentSource(new Uri("http://localhost:3000"), ""), + }, + ["formB"] = new ClassifierDocumentTypeDetails + { + AzureBlobFileListSource = new AzureBlobFileListContentSource(new Uri("https://myStorageAccount.blob.core.windows.net/myContainer?mySasToken"), "formB.jsonl"), } }) { - Description = "", - BaseClassifierId = "", - AllowOverwrite = true, + Description = "Classifier description", }; Operation operation = client.BuildClassifier(WaitUntil.Completed, buildRequest); DocumentClassifierDetails responseData = operation.Value; @@ -2275,184 +1033,102 @@ DocumentClassifierDetails responseData = operation.Value; This sample shows how to call BuildClassifierAsync and parse the result. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - classifierId = "", - docTypes = new - { - key = new object(), - }, -}); -Operation operation = await client.BuildClassifierAsync(WaitUntil.Completed, content); -BinaryData responseData = operation.Value; - -JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; -Console.WriteLine(result.GetProperty("classifierId").ToString()); -Console.WriteLine(result.GetProperty("createdDateTime").ToString()); -Console.WriteLine(result.GetProperty("apiVersion").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").ToString()); -]]> -This sample shows how to call BuildClassifierAsync with all parameters and request content and parse the result. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - classifierId = "", - description = "", - baseClassifierId = "", + classifierId = "myClassifier", + description = "Classifier description", docTypes = new { - key = new + formA = new { - sourceKind = "url", azureBlobSource = new { - containerUrl = "http://localhost:3000", - prefix = "", + containerUrl = "https://myStorageAccount.blob.core.windows.net/myContainer?mySasToken", + prefix = "formADocs/", }, + }, + formB = new + { azureBlobFileListSource = new { - containerUrl = "http://localhost:3000", - fileList = "", + containerUrl = "https://myStorageAccount.blob.core.windows.net/myContainer?mySasToken", + fileList = "formB.jsonl", }, }, }, - allowOverwrite = true, }); Operation operation = await client.BuildClassifierAsync(WaitUntil.Completed, content); BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("classifierId").ToString()); -Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); -Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); Console.WriteLine(result.GetProperty("apiVersion").ToString()); -Console.WriteLine(result.GetProperty("baseClassifierId").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("sourceKind").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobSource").GetProperty("prefix").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobFileListSource").GetProperty("containerUrl").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobFileListSource").GetProperty("fileList").ToString()); -Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); -Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").ToString()); ]]> This sample shows how to call BuildClassifier and parse the result. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - classifierId = "", + classifierId = "myClassifier", + description = "Classifier description", docTypes = new { - key = new object(), - }, -}); -Operation operation = client.BuildClassifier(WaitUntil.Completed, content); -BinaryData responseData = operation.Value; - -JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; -Console.WriteLine(result.GetProperty("classifierId").ToString()); -Console.WriteLine(result.GetProperty("createdDateTime").ToString()); -Console.WriteLine(result.GetProperty("apiVersion").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").ToString()); -]]> -This sample shows how to call BuildClassifier with all parameters and request content and parse the result. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - classifierId = "", - description = "", - baseClassifierId = "", - docTypes = new - { - key = new + formA = new { - sourceKind = "url", azureBlobSource = new { - containerUrl = "http://localhost:3000", - prefix = "", + containerUrl = "https://myStorageAccount.blob.core.windows.net/myContainer?mySasToken", + prefix = "formADocs/", }, + }, + formB = new + { azureBlobFileListSource = new { - containerUrl = "http://localhost:3000", - fileList = "", + containerUrl = "https://myStorageAccount.blob.core.windows.net/myContainer?mySasToken", + fileList = "formB.jsonl", }, }, }, - allowOverwrite = true, }); Operation operation = client.BuildClassifier(WaitUntil.Completed, content); BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("classifierId").ToString()); -Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); -Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); Console.WriteLine(result.GetProperty("apiVersion").ToString()); -Console.WriteLine(result.GetProperty("baseClassifierId").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("sourceKind").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobSource").GetProperty("prefix").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobFileListSource").GetProperty("containerUrl").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobFileListSource").GetProperty("fileList").ToString()); -Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); -Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").ToString()); ]]> This sample shows how to call CopyClassifierToAsync. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - -ClassifierCopyAuthorization copyToRequest = new ClassifierCopyAuthorization( -"", -"", -"", -new Uri("http://localhost:3000"), -"", -DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); -Operation operation = await client.CopyClassifierToAsync(WaitUntil.Completed, "", copyToRequest); -DocumentClassifierDetails responseData = operation.Value; -]]> -This sample shows how to call CopyClassifierToAsync with all parameters. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); ClassifierCopyAuthorization copyToRequest = new ClassifierCopyAuthorization( -"", -"", -"", -new Uri("http://localhost:3000"), -"", -DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); -Operation operation = await client.CopyClassifierToAsync(WaitUntil.Completed, "", copyToRequest); +"/subscriptions/targetSub/resourceGroups/targetRG/providers/Microsoft.CognitiveServices/accounts/targetService", +"targetResourceRegion", +"targetClassifier", +new Uri("https://targetEndpoint.cognitiveservices.azure.com/documentintelligence/documentClassifiers/targetClassifier"), +"accessToken", +DateTimeOffset.Parse("2021-09-23T09:12:54.552Z")); +Operation operation = await client.CopyClassifierToAsync(WaitUntil.Completed, "sourceClassifier", copyToRequest); DocumentClassifierDetails responseData = operation.Value; ]]> @@ -2460,34 +1136,18 @@ DocumentClassifierDetails responseData = operation.Value; This sample shows how to call CopyClassifierTo. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - -ClassifierCopyAuthorization copyToRequest = new ClassifierCopyAuthorization( -"", -"", -"", -new Uri("http://localhost:3000"), -"", -DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); -Operation operation = client.CopyClassifierTo(WaitUntil.Completed, "", copyToRequest); -DocumentClassifierDetails responseData = operation.Value; -]]> -This sample shows how to call CopyClassifierTo with all parameters. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); ClassifierCopyAuthorization copyToRequest = new ClassifierCopyAuthorization( -"", -"", -"", -new Uri("http://localhost:3000"), -"", -DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); -Operation operation = client.CopyClassifierTo(WaitUntil.Completed, "", copyToRequest); +"/subscriptions/targetSub/resourceGroups/targetRG/providers/Microsoft.CognitiveServices/accounts/targetService", +"targetResourceRegion", +"targetClassifier", +new Uri("https://targetEndpoint.cognitiveservices.azure.com/documentintelligence/documentClassifiers/targetClassifier"), +"accessToken", +DateTimeOffset.Parse("2021-09-23T09:12:54.552Z")); +Operation operation = client.CopyClassifierTo(WaitUntil.Completed, "sourceClassifier", copyToRequest); DocumentClassifierDetails responseData = operation.Value; ]]> @@ -2495,20 +1155,20 @@ DocumentClassifierDetails responseData = operation.Value; This sample shows how to call CopyClassifierToAsync and parse the result. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - targetResourceId = "", - targetResourceRegion = "", - targetClassifierId = "", - targetClassifierLocation = "http://localhost:3000", - accessToken = "", - expirationDateTime = "2022-05-10T18:57:31.2311892Z", + targetResourceId = "/subscriptions/targetSub/resourceGroups/targetRG/providers/Microsoft.CognitiveServices/accounts/targetService", + targetResourceRegion = "targetResourceRegion", + targetClassifierId = "targetClassifier", + targetClassifierLocation = "https://targetEndpoint.cognitiveservices.azure.com/documentintelligence/documentClassifiers/targetClassifier", + accessToken = "accessToken", + expirationDateTime = "2021-09-23T09:12:54.552Z", }); -Operation operation = await client.CopyClassifierToAsync(WaitUntil.Completed, "", content); +Operation operation = await client.CopyClassifierToAsync(WaitUntil.Completed, "sourceClassifier", content); BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; @@ -2516,60 +1176,26 @@ Console.WriteLine(result.GetProperty("classifierId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("apiVersion").ToString()); Console.WriteLine(result.GetProperty("docTypes").GetProperty("").ToString()); -]]> -This sample shows how to call CopyClassifierToAsync with all parameters and request content and parse the result. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - targetResourceId = "", - targetResourceRegion = "", - targetClassifierId = "", - targetClassifierLocation = "http://localhost:3000", - accessToken = "", - expirationDateTime = "2022-05-10T18:57:31.2311892Z", -}); -Operation operation = await client.CopyClassifierToAsync(WaitUntil.Completed, "", content); -BinaryData responseData = operation.Value; - -JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; -Console.WriteLine(result.GetProperty("classifierId").ToString()); -Console.WriteLine(result.GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("createdDateTime").ToString()); -Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); -Console.WriteLine(result.GetProperty("apiVersion").ToString()); -Console.WriteLine(result.GetProperty("baseClassifierId").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("sourceKind").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobSource").GetProperty("prefix").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobFileListSource").GetProperty("containerUrl").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobFileListSource").GetProperty("fileList").ToString()); -Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); -Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("target").ToString()); ]]> This sample shows how to call CopyClassifierTo and parse the result. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - targetResourceId = "", - targetResourceRegion = "", - targetClassifierId = "", - targetClassifierLocation = "http://localhost:3000", - accessToken = "", - expirationDateTime = "2022-05-10T18:57:31.2311892Z", + targetResourceId = "/subscriptions/targetSub/resourceGroups/targetRG/providers/Microsoft.CognitiveServices/accounts/targetService", + targetResourceRegion = "targetResourceRegion", + targetClassifierId = "targetClassifier", + targetClassifierLocation = "https://targetEndpoint.cognitiveservices.azure.com/documentintelligence/documentClassifiers/targetClassifier", + accessToken = "accessToken", + expirationDateTime = "2021-09-23T09:12:54.552Z", }); -Operation operation = client.CopyClassifierTo(WaitUntil.Completed, "", content); +Operation operation = client.CopyClassifierTo(WaitUntil.Completed, "sourceClassifier", content); BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; @@ -2577,40 +1203,6 @@ Console.WriteLine(result.GetProperty("classifierId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("apiVersion").ToString()); Console.WriteLine(result.GetProperty("docTypes").GetProperty("").ToString()); -]]> -This sample shows how to call CopyClassifierTo with all parameters and request content and parse the result. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - targetResourceId = "", - targetResourceRegion = "", - targetClassifierId = "", - targetClassifierLocation = "http://localhost:3000", - accessToken = "", - expirationDateTime = "2022-05-10T18:57:31.2311892Z", -}); -Operation operation = client.CopyClassifierTo(WaitUntil.Completed, "", content); -BinaryData responseData = operation.Value; - -JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; -Console.WriteLine(result.GetProperty("classifierId").ToString()); -Console.WriteLine(result.GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("createdDateTime").ToString()); -Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); -Console.WriteLine(result.GetProperty("apiVersion").ToString()); -Console.WriteLine(result.GetProperty("baseClassifierId").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("sourceKind").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobSource").GetProperty("prefix").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobFileListSource").GetProperty("containerUrl").ToString()); -Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobFileListSource").GetProperty("fileList").ToString()); -Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); -Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("target").ToString()); ]]> diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/Docs/DocumentIntelligenceClient.xml b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/Docs/DocumentIntelligenceClient.xml index 65e188f27397..baec167febd7 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/Docs/DocumentIntelligenceClient.xml +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/Docs/DocumentIntelligenceClient.xml @@ -5,60 +5,33 @@ This sample shows how to call GetAnalyzeResultPdfAsync. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); -Response response = await client.GetAnalyzeResultPdfAsync("", Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); -]]> -This sample shows how to call GetAnalyzeResultPdfAsync with all parameters. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); - -Response response = await client.GetAnalyzeResultPdfAsync("", Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); +Response response = await client.GetAnalyzeResultPdfAsync("prebuilt-invoice", Guid.Parse("3b31320d-8bab-4f88-b19c-2322a7f11034")); ]]> This sample shows how to call GetAnalyzeResultPdf. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); - -Response response = client.GetAnalyzeResultPdf("", Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); -]]> -This sample shows how to call GetAnalyzeResultPdf with all parameters. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); -Response response = client.GetAnalyzeResultPdf("", Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); +Response response = client.GetAnalyzeResultPdf("prebuilt-invoice", Guid.Parse("3b31320d-8bab-4f88-b19c-2322a7f11034")); ]]> This sample shows how to call GetAnalyzeResultPdfAsync and parse the result. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); -Response response = await client.GetAnalyzeResultPdfAsync("", Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetAnalyzeResultPdfAsync with all parameters and parse the result. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); - -Response response = await client.GetAnalyzeResultPdfAsync("", Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), null); +Response response = await client.GetAnalyzeResultPdfAsync("prebuilt-invoice", Guid.Parse("3b31320d-8bab-4f88-b19c-2322a7f11034"), null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -68,22 +41,11 @@ Console.WriteLine(result.ToString()); This sample shows how to call GetAnalyzeResultPdf and parse the result. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); - -Response response = client.GetAnalyzeResultPdf("", Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetAnalyzeResultPdf with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); -Response response = client.GetAnalyzeResultPdf("", Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), null); +Response response = client.GetAnalyzeResultPdf("prebuilt-invoice", Guid.Parse("3b31320d-8bab-4f88-b19c-2322a7f11034"), null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -93,60 +55,33 @@ Console.WriteLine(result.ToString()); This sample shows how to call GetAnalyzeResultFigureAsync. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); - -Response response = await client.GetAnalyzeResultFigureAsync("", Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), ""); -]]> -This sample shows how to call GetAnalyzeResultFigureAsync with all parameters. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); -Response response = await client.GetAnalyzeResultFigureAsync("", Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), ""); +Response response = await client.GetAnalyzeResultFigureAsync("prebuilt-invoice", Guid.Parse("3b31320d-8bab-4f88-b19c-2322a7f11034"), "1.0"); ]]> This sample shows how to call GetAnalyzeResultFigure. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); - -Response response = client.GetAnalyzeResultFigure("", Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), ""); -]]> -This sample shows how to call GetAnalyzeResultFigure with all parameters. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); -Response response = client.GetAnalyzeResultFigure("", Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), ""); +Response response = client.GetAnalyzeResultFigure("prebuilt-invoice", Guid.Parse("3b31320d-8bab-4f88-b19c-2322a7f11034"), "1.0"); ]]> This sample shows how to call GetAnalyzeResultFigureAsync and parse the result. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); -Response response = await client.GetAnalyzeResultFigureAsync("", Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), "", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetAnalyzeResultFigureAsync with all parameters and parse the result. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); - -Response response = await client.GetAnalyzeResultFigureAsync("", Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), "", null); +Response response = await client.GetAnalyzeResultFigureAsync("prebuilt-invoice", Guid.Parse("3b31320d-8bab-4f88-b19c-2322a7f11034"), "1.0", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -156,22 +91,11 @@ Console.WriteLine(result.ToString()); This sample shows how to call GetAnalyzeResultFigure and parse the result. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); - -Response response = client.GetAnalyzeResultFigure("", Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), "", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetAnalyzeResultFigure with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); -Response response = client.GetAnalyzeResultFigure("", Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), "", null); +Response response = client.GetAnalyzeResultFigure("prebuilt-invoice", Guid.Parse("3b31320d-8bab-4f88-b19c-2322a7f11034"), "1.0", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -181,25 +105,20 @@ Console.WriteLine(result.ToString()); This sample shows how to call AnalyzeDocumentAsync. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); -Operation operation = await client.AnalyzeDocumentAsync(WaitUntil.Completed, ""); +Operation operation = await client.AnalyzeDocumentAsync(WaitUntil.Completed, "prebuilt-layout"); AnalyzeResult responseData = operation.Value; ]]> -This sample shows how to call AnalyzeDocumentAsync with all parameters. +This sample shows how to call AnalyzeDocumentAsync. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); -AnalyzeDocumentContent analyzeRequest = new AnalyzeDocumentContent -{ - UrlSource = new Uri("http://localhost:3000"), - Base64Source = BinaryData.FromObjectAsJson(new object()), -}; -Operation operation = await client.AnalyzeDocumentAsync(WaitUntil.Completed, "", analyzeRequest: analyzeRequest, pages: "", locale: "", stringIndexType: StringIndexType.TextElements, features: new DocumentAnalysisFeature[] { DocumentAnalysisFeature.OcrHighResolution }, queryFields: new string[] { "" }, outputContentFormat: ContentFormat.Text, output: new AnalyzeOutputOption[] { AnalyzeOutputOption.Pdf }); +Operation operation = await client.AnalyzeDocumentAsync(WaitUntil.Completed, "customModel"); AnalyzeResult responseData = operation.Value; ]]> @@ -207,25 +126,20 @@ AnalyzeResult responseData = operation.Value; This sample shows how to call AnalyzeDocument. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); -Operation operation = client.AnalyzeDocument(WaitUntil.Completed, ""); +Operation operation = client.AnalyzeDocument(WaitUntil.Completed, "prebuilt-layout"); AnalyzeResult responseData = operation.Value; ]]> -This sample shows how to call AnalyzeDocument with all parameters. +This sample shows how to call AnalyzeDocument. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); -AnalyzeDocumentContent analyzeRequest = new AnalyzeDocumentContent -{ - UrlSource = new Uri("http://localhost:3000"), - Base64Source = BinaryData.FromObjectAsJson(new object()), -}; -Operation operation = client.AnalyzeDocument(WaitUntil.Completed, "", analyzeRequest: analyzeRequest, pages: "", locale: "", stringIndexType: StringIndexType.TextElements, features: new DocumentAnalysisFeature[] { DocumentAnalysisFeature.OcrHighResolution }, queryFields: new string[] { "" }, outputContentFormat: ContentFormat.Text, output: new AnalyzeOutputOption[] { AnalyzeOutputOption.Pdf }); +Operation operation = client.AnalyzeDocument(WaitUntil.Completed, "customModel"); AnalyzeResult responseData = operation.Value; ]]> @@ -233,12 +147,15 @@ AnalyzeResult responseData = operation.Value; This sample shows how to call AnalyzeDocumentAsync and parse the result. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); -using RequestContent content = null; -Operation operation = await client.AnalyzeDocumentAsync(WaitUntil.Completed, "", content); +using RequestContent content = RequestContent.Create(new +{ + base64Source = "e2Jhc2U2NEVuY29kZWRQZGZ9", +}); +Operation operation = await client.AnalyzeDocumentAsync(WaitUntil.Completed, "prebuilt-layout", content); BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; @@ -250,335 +167,42 @@ Console.WriteLine(result.GetProperty("pages")[0].GetProperty("pageNumber").ToStr Console.WriteLine(result.GetProperty("pages")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); Console.WriteLine(result.GetProperty("pages")[0].GetProperty("spans")[0].GetProperty("length").ToString()); ]]> -This sample shows how to call AnalyzeDocumentAsync with all parameters and request content and parse the result. +This sample shows how to call AnalyzeDocumentAsync and parse the result. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - urlSource = "http://localhost:3000", - base64Source = new object(), + urlSource = "http://host.com/doc.pdf", }); -Operation operation = await client.AnalyzeDocumentAsync(WaitUntil.Completed, "", content, pages: "", locale: "", stringIndexType: "textElements", features: new DocumentAnalysisFeature[] { DocumentAnalysisFeature.OcrHighResolution }, queryFields: new string[] { "" }, outputContentFormat: "text", output: new AnalyzeOutputOption[] { AnalyzeOutputOption.Pdf }); +Operation operation = await client.AnalyzeDocumentAsync(WaitUntil.Completed, "customModel", content); BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("apiVersion").ToString()); Console.WriteLine(result.GetProperty("modelId").ToString()); Console.WriteLine(result.GetProperty("stringIndexType").ToString()); -Console.WriteLine(result.GetProperty("contentFormat").ToString()); Console.WriteLine(result.GetProperty("content").ToString()); Console.WriteLine(result.GetProperty("pages")[0].GetProperty("pageNumber").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("angle").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("width").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("height").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("unit").ToString()); Console.WriteLine(result.GetProperty("pages")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); Console.WriteLine(result.GetProperty("pages")[0].GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("content").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("span").GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("span").GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("state").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("span").GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("span").GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("lines")[0].GetProperty("content").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("lines")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("lines")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("lines")[0].GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("kind").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("span").GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("span").GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("kind").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("span").GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("span").GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("role").ToString()); -Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("content").ToString()); -Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); -Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("rowCount").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("columnCount").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("kind").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("rowIndex").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("columnIndex").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("rowSpan").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("columnSpan").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("content").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("elements")[0].ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("content").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("elements")[0].ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("content").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("elements")[0].ToString()); -Console.WriteLine(result.GetProperty("figures")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); -Console.WriteLine(result.GetProperty("figures")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("figures")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("figures")[0].GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("figures")[0].GetProperty("elements")[0].ToString()); -Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("content").ToString()); -Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); -Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("elements")[0].ToString()); -Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("content").ToString()); -Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); -Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("elements")[0].ToString()); -Console.WriteLine(result.GetProperty("figures")[0].GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("sections")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("sections")[0].GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("sections")[0].GetProperty("elements")[0].ToString()); -Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("content").ToString()); -Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); -Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("content").ToString()); -Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); -Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("styles")[0].GetProperty("isHandwritten").ToString()); -Console.WriteLine(result.GetProperty("styles")[0].GetProperty("similarFontFamily").ToString()); -Console.WriteLine(result.GetProperty("styles")[0].GetProperty("fontStyle").ToString()); -Console.WriteLine(result.GetProperty("styles")[0].GetProperty("fontWeight").ToString()); -Console.WriteLine(result.GetProperty("styles")[0].GetProperty("color").ToString()); -Console.WriteLine(result.GetProperty("styles")[0].GetProperty("backgroundColor").ToString()); -Console.WriteLine(result.GetProperty("styles")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("styles")[0].GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("styles")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("languages")[0].GetProperty("locale").ToString()); -Console.WriteLine(result.GetProperty("languages")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("languages")[0].GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("languages")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("docType").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueString").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueDate").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueTime").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valuePhoneNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueInteger").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueSelectionMark").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueSignature").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueCountryRegion").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueString").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueDate").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueTime").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valuePhoneNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueInteger").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueSelectionMark").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueSignature").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCountryRegion").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueString").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueDate").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueTime").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valuePhoneNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueInteger").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueSelectionMark").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueSignature").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueCountryRegion").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueCurrency").GetProperty("amount").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueCurrency").GetProperty("currencySymbol").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueCurrency").GetProperty("currencyCode").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("houseNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("poBox").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("road").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("city").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("state").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("postalCode").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("countryRegion").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("streetAddress").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("unit").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("cityDistrict").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("stateDistrict").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("suburb").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("house").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("level").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueBoolean").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueSelectionGroup")[0].ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("content").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCurrency").GetProperty("amount").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCurrency").GetProperty("currencySymbol").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCurrency").GetProperty("currencyCode").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("houseNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("poBox").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("road").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("city").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("state").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("postalCode").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("countryRegion").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("streetAddress").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("unit").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("cityDistrict").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("stateDistrict").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("suburb").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("house").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("level").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueBoolean").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueSelectionGroup")[0].ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("content").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueString").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueDate").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueTime").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valuePhoneNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueInteger").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueSelectionMark").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueSignature").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueCountryRegion").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueString").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueDate").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueTime").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valuePhoneNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueInteger").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueSelectionMark").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueSignature").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCountryRegion").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCurrency").GetProperty("amount").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCurrency").GetProperty("currencySymbol").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCurrency").GetProperty("currencyCode").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("houseNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("poBox").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("road").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("city").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("state").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("postalCode").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("countryRegion").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("streetAddress").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("unit").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("cityDistrict").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("stateDistrict").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("suburb").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("house").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("level").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueBoolean").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueSelectionGroup")[0].ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("content").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueCurrency").GetProperty("amount").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueCurrency").GetProperty("currencySymbol").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueCurrency").GetProperty("currencyCode").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("houseNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("poBox").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("road").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("city").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("state").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("postalCode").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("countryRegion").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("streetAddress").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("unit").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("cityDistrict").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("stateDistrict").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("suburb").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("house").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("level").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueBoolean").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueSelectionGroup")[0].ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("content").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueCurrency").GetProperty("amount").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueCurrency").GetProperty("currencySymbol").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueCurrency").GetProperty("currencyCode").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("houseNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("poBox").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("road").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("city").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("state").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("postalCode").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("countryRegion").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("streetAddress").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("unit").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("cityDistrict").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("stateDistrict").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("suburb").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("house").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("level").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueBoolean").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueSelectionGroup")[0].ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("content").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); -Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("target").ToString()); ]]> This sample shows how to call AnalyzeDocument and parse the result. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); -using RequestContent content = null; -Operation operation = client.AnalyzeDocument(WaitUntil.Completed, "", content); +using RequestContent content = RequestContent.Create(new +{ + base64Source = "e2Jhc2U2NEVuY29kZWRQZGZ9", +}); +Operation operation = client.AnalyzeDocument(WaitUntil.Completed, "prebuilt-layout", content); BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; @@ -590,353 +214,38 @@ Console.WriteLine(result.GetProperty("pages")[0].GetProperty("pageNumber").ToStr Console.WriteLine(result.GetProperty("pages")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); Console.WriteLine(result.GetProperty("pages")[0].GetProperty("spans")[0].GetProperty("length").ToString()); ]]> -This sample shows how to call AnalyzeDocument with all parameters and request content and parse the result. +This sample shows how to call AnalyzeDocument and parse the result. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - urlSource = "http://localhost:3000", - base64Source = new object(), + urlSource = "http://host.com/doc.pdf", }); -Operation operation = client.AnalyzeDocument(WaitUntil.Completed, "", content, pages: "", locale: "", stringIndexType: "textElements", features: new DocumentAnalysisFeature[] { DocumentAnalysisFeature.OcrHighResolution }, queryFields: new string[] { "" }, outputContentFormat: "text", output: new AnalyzeOutputOption[] { AnalyzeOutputOption.Pdf }); +Operation operation = client.AnalyzeDocument(WaitUntil.Completed, "customModel", content); BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("apiVersion").ToString()); Console.WriteLine(result.GetProperty("modelId").ToString()); Console.WriteLine(result.GetProperty("stringIndexType").ToString()); -Console.WriteLine(result.GetProperty("contentFormat").ToString()); Console.WriteLine(result.GetProperty("content").ToString()); Console.WriteLine(result.GetProperty("pages")[0].GetProperty("pageNumber").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("angle").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("width").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("height").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("unit").ToString()); Console.WriteLine(result.GetProperty("pages")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); Console.WriteLine(result.GetProperty("pages")[0].GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("content").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("span").GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("span").GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("state").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("span").GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("span").GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("lines")[0].GetProperty("content").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("lines")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("lines")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("lines")[0].GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("kind").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("span").GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("span").GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("kind").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("span").GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("span").GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("role").ToString()); -Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("content").ToString()); -Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); -Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("rowCount").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("columnCount").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("kind").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("rowIndex").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("columnIndex").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("rowSpan").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("columnSpan").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("content").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("elements")[0].ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("content").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("elements")[0].ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("content").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("elements")[0].ToString()); -Console.WriteLine(result.GetProperty("figures")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); -Console.WriteLine(result.GetProperty("figures")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("figures")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("figures")[0].GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("figures")[0].GetProperty("elements")[0].ToString()); -Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("content").ToString()); -Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); -Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("elements")[0].ToString()); -Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("content").ToString()); -Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); -Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("elements")[0].ToString()); -Console.WriteLine(result.GetProperty("figures")[0].GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("sections")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("sections")[0].GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("sections")[0].GetProperty("elements")[0].ToString()); -Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("content").ToString()); -Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); -Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("content").ToString()); -Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); -Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("styles")[0].GetProperty("isHandwritten").ToString()); -Console.WriteLine(result.GetProperty("styles")[0].GetProperty("similarFontFamily").ToString()); -Console.WriteLine(result.GetProperty("styles")[0].GetProperty("fontStyle").ToString()); -Console.WriteLine(result.GetProperty("styles")[0].GetProperty("fontWeight").ToString()); -Console.WriteLine(result.GetProperty("styles")[0].GetProperty("color").ToString()); -Console.WriteLine(result.GetProperty("styles")[0].GetProperty("backgroundColor").ToString()); -Console.WriteLine(result.GetProperty("styles")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("styles")[0].GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("styles")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("languages")[0].GetProperty("locale").ToString()); -Console.WriteLine(result.GetProperty("languages")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("languages")[0].GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("languages")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("docType").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueString").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueDate").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueTime").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valuePhoneNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueInteger").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueSelectionMark").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueSignature").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueCountryRegion").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueString").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueDate").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueTime").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valuePhoneNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueInteger").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueSelectionMark").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueSignature").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCountryRegion").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueString").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueDate").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueTime").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valuePhoneNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueInteger").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueSelectionMark").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueSignature").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueCountryRegion").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueCurrency").GetProperty("amount").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueCurrency").GetProperty("currencySymbol").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueCurrency").GetProperty("currencyCode").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("houseNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("poBox").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("road").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("city").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("state").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("postalCode").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("countryRegion").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("streetAddress").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("unit").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("cityDistrict").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("stateDistrict").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("suburb").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("house").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("level").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueBoolean").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueSelectionGroup")[0].ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("content").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCurrency").GetProperty("amount").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCurrency").GetProperty("currencySymbol").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCurrency").GetProperty("currencyCode").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("houseNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("poBox").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("road").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("city").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("state").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("postalCode").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("countryRegion").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("streetAddress").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("unit").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("cityDistrict").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("stateDistrict").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("suburb").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("house").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("level").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueBoolean").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueSelectionGroup")[0].ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("content").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueString").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueDate").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueTime").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valuePhoneNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueInteger").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueSelectionMark").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueSignature").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueCountryRegion").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueString").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueDate").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueTime").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valuePhoneNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueInteger").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueSelectionMark").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueSignature").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCountryRegion").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCurrency").GetProperty("amount").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCurrency").GetProperty("currencySymbol").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCurrency").GetProperty("currencyCode").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("houseNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("poBox").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("road").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("city").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("state").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("postalCode").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("countryRegion").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("streetAddress").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("unit").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("cityDistrict").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("stateDistrict").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("suburb").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("house").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("level").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueBoolean").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueSelectionGroup")[0].ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("content").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueCurrency").GetProperty("amount").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueCurrency").GetProperty("currencySymbol").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueCurrency").GetProperty("currencyCode").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("houseNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("poBox").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("road").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("city").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("state").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("postalCode").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("countryRegion").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("streetAddress").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("unit").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("cityDistrict").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("stateDistrict").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("suburb").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("house").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("level").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueBoolean").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueSelectionGroup")[0].ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("content").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueCurrency").GetProperty("amount").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueCurrency").GetProperty("currencySymbol").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueCurrency").GetProperty("currencyCode").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("houseNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("poBox").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("road").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("city").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("state").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("postalCode").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("countryRegion").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("streetAddress").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("unit").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("cityDistrict").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("stateDistrict").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("suburb").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("house").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("level").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueBoolean").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueSelectionGroup")[0].ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("content").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); -Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("target").ToString()); ]]> This sample shows how to call AnalyzeBatchDocumentsAsync. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); -Operation operation = await client.AnalyzeBatchDocumentsAsync(WaitUntil.Completed, ""); -AnalyzeBatchResult responseData = operation.Value; -]]> -This sample shows how to call AnalyzeBatchDocumentsAsync with all parameters. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); - -AnalyzeBatchDocumentsContent analyzeBatchRequest = new AnalyzeBatchDocumentsContent(new Uri("http://localhost:3000")) -{ - AzureBlobSource = new AzureBlobContentSource(new Uri("http://localhost:3000")) - { - Prefix = "", - }, - AzureBlobFileListSource = new AzureBlobFileListContentSource(new Uri("http://localhost:3000"), ""), - ResultPrefix = "", - OverwriteExisting = true, -}; -Operation operation = await client.AnalyzeBatchDocumentsAsync(WaitUntil.Completed, "", analyzeBatchRequest: analyzeBatchRequest, pages: "", locale: "", stringIndexType: StringIndexType.TextElements, features: new DocumentAnalysisFeature[] { DocumentAnalysisFeature.OcrHighResolution }, queryFields: new string[] { "" }, outputContentFormat: ContentFormat.Text, output: new AnalyzeOutputOption[] { AnalyzeOutputOption.Pdf }); +Operation operation = await client.AnalyzeBatchDocumentsAsync(WaitUntil.Completed, "customModel"); AnalyzeBatchResult responseData = operation.Value; ]]> @@ -944,30 +253,11 @@ AnalyzeBatchResult responseData = operation.Value; This sample shows how to call AnalyzeBatchDocuments. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); - -Operation operation = client.AnalyzeBatchDocuments(WaitUntil.Completed, ""); -AnalyzeBatchResult responseData = operation.Value; -]]> -This sample shows how to call AnalyzeBatchDocuments with all parameters. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); -AnalyzeBatchDocumentsContent analyzeBatchRequest = new AnalyzeBatchDocumentsContent(new Uri("http://localhost:3000")) -{ - AzureBlobSource = new AzureBlobContentSource(new Uri("http://localhost:3000")) - { - Prefix = "", - }, - AzureBlobFileListSource = new AzureBlobFileListContentSource(new Uri("http://localhost:3000"), ""), - ResultPrefix = "", - OverwriteExisting = true, -}; -Operation operation = client.AnalyzeBatchDocuments(WaitUntil.Completed, "", analyzeBatchRequest: analyzeBatchRequest, pages: "", locale: "", stringIndexType: StringIndexType.TextElements, features: new DocumentAnalysisFeature[] { DocumentAnalysisFeature.OcrHighResolution }, queryFields: new string[] { "" }, outputContentFormat: ContentFormat.Text, output: new AnalyzeOutputOption[] { AnalyzeOutputOption.Pdf }); +Operation operation = client.AnalyzeBatchDocuments(WaitUntil.Completed, "customModel"); AnalyzeBatchResult responseData = operation.Value; ]]> @@ -975,24 +265,7 @@ AnalyzeBatchResult responseData = operation.Value; This sample shows how to call AnalyzeBatchDocumentsAsync and parse the result. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); - -using RequestContent content = null; -Operation operation = await client.AnalyzeBatchDocumentsAsync(WaitUntil.Completed, "", content); -BinaryData responseData = operation.Value; - -JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; -Console.WriteLine(result.GetProperty("succeededCount").ToString()); -Console.WriteLine(result.GetProperty("failedCount").ToString()); -Console.WriteLine(result.GetProperty("skippedCount").ToString()); -Console.WriteLine(result.GetProperty("details")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("details")[0].GetProperty("sourceUrl").ToString()); -]]> -This sample shows how to call AnalyzeBatchDocumentsAsync with all parameters and request content and parse the result. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); @@ -1000,19 +273,14 @@ using RequestContent content = RequestContent.Create(new { azureBlobSource = new { - containerUrl = "http://localhost:3000", - prefix = "", + containerUrl = "https://myStorageAccount.blob.core.windows.net/myContainer?mySasToken", + prefix = "trainingDocs/", }, - azureBlobFileListSource = new - { - containerUrl = "http://localhost:3000", - fileList = "", - }, - resultContainerUrl = "http://localhost:3000", - resultPrefix = "", + resultContainerUrl = "https://myStorageAccount.blob.core.windows.net/myOutputContainer?mySasToken", + resultPrefix = "trainingDocsResult/", overwriteExisting = true, }); -Operation operation = await client.AnalyzeBatchDocumentsAsync(WaitUntil.Completed, "", content, pages: "", locale: "", stringIndexType: "textElements", features: new DocumentAnalysisFeature[] { DocumentAnalysisFeature.OcrHighResolution }, queryFields: new string[] { "" }, outputContentFormat: "text", output: new AnalyzeOutputOption[] { AnalyzeOutputOption.Pdf }); +Operation operation = await client.AnalyzeBatchDocumentsAsync(WaitUntil.Completed, "customModel", content); BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; @@ -1021,36 +289,13 @@ Console.WriteLine(result.GetProperty("failedCount").ToString()); Console.WriteLine(result.GetProperty("skippedCount").ToString()); Console.WriteLine(result.GetProperty("details")[0].GetProperty("status").ToString()); Console.WriteLine(result.GetProperty("details")[0].GetProperty("sourceUrl").ToString()); -Console.WriteLine(result.GetProperty("details")[0].GetProperty("resultUrl").ToString()); -Console.WriteLine(result.GetProperty("details")[0].GetProperty("error").GetProperty("code").ToString()); -Console.WriteLine(result.GetProperty("details")[0].GetProperty("error").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("details")[0].GetProperty("error").GetProperty("target").ToString()); -Console.WriteLine(result.GetProperty("details")[0].GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); -Console.WriteLine(result.GetProperty("details")[0].GetProperty("error").GetProperty("innererror").GetProperty("message").ToString()); ]]> This sample shows how to call AnalyzeBatchDocuments and parse the result. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); - -using RequestContent content = null; -Operation operation = client.AnalyzeBatchDocuments(WaitUntil.Completed, "", content); -BinaryData responseData = operation.Value; - -JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; -Console.WriteLine(result.GetProperty("succeededCount").ToString()); -Console.WriteLine(result.GetProperty("failedCount").ToString()); -Console.WriteLine(result.GetProperty("skippedCount").ToString()); -Console.WriteLine(result.GetProperty("details")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("details")[0].GetProperty("sourceUrl").ToString()); -]]> -This sample shows how to call AnalyzeBatchDocuments with all parameters and request content and parse the result. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); @@ -1058,19 +303,14 @@ using RequestContent content = RequestContent.Create(new { azureBlobSource = new { - containerUrl = "http://localhost:3000", - prefix = "", + containerUrl = "https://myStorageAccount.blob.core.windows.net/myContainer?mySasToken", + prefix = "trainingDocs/", }, - azureBlobFileListSource = new - { - containerUrl = "http://localhost:3000", - fileList = "", - }, - resultContainerUrl = "http://localhost:3000", - resultPrefix = "", + resultContainerUrl = "https://myStorageAccount.blob.core.windows.net/myOutputContainer?mySasToken", + resultPrefix = "trainingDocsResult/", overwriteExisting = true, }); -Operation operation = client.AnalyzeBatchDocuments(WaitUntil.Completed, "", content, pages: "", locale: "", stringIndexType: "textElements", features: new DocumentAnalysisFeature[] { DocumentAnalysisFeature.OcrHighResolution }, queryFields: new string[] { "" }, outputContentFormat: "text", output: new AnalyzeOutputOption[] { AnalyzeOutputOption.Pdf }); +Operation operation = client.AnalyzeBatchDocuments(WaitUntil.Completed, "customModel", content); BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; @@ -1079,38 +319,21 @@ Console.WriteLine(result.GetProperty("failedCount").ToString()); Console.WriteLine(result.GetProperty("skippedCount").ToString()); Console.WriteLine(result.GetProperty("details")[0].GetProperty("status").ToString()); Console.WriteLine(result.GetProperty("details")[0].GetProperty("sourceUrl").ToString()); -Console.WriteLine(result.GetProperty("details")[0].GetProperty("resultUrl").ToString()); -Console.WriteLine(result.GetProperty("details")[0].GetProperty("error").GetProperty("code").ToString()); -Console.WriteLine(result.GetProperty("details")[0].GetProperty("error").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("details")[0].GetProperty("error").GetProperty("target").ToString()); -Console.WriteLine(result.GetProperty("details")[0].GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); -Console.WriteLine(result.GetProperty("details")[0].GetProperty("error").GetProperty("innererror").GetProperty("message").ToString()); ]]> This sample shows how to call ClassifyDocumentAsync. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); - -ClassifyDocumentContent classifyRequest = new ClassifyDocumentContent(); -Operation operation = await client.ClassifyDocumentAsync(WaitUntil.Completed, "", classifyRequest); -AnalyzeResult responseData = operation.Value; -]]> -This sample shows how to call ClassifyDocumentAsync with all parameters. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); ClassifyDocumentContent classifyRequest = new ClassifyDocumentContent { - UrlSource = new Uri("http://localhost:3000"), - Base64Source = BinaryData.FromObjectAsJson(new object()), + UrlSource = new Uri("http://host.com/doc.pdf"), }; -Operation operation = await client.ClassifyDocumentAsync(WaitUntil.Completed, "", classifyRequest, stringIndexType: StringIndexType.TextElements, split: SplitMode.Auto, pages: ""); +Operation operation = await client.ClassifyDocumentAsync(WaitUntil.Completed, "classifierId", classifyRequest); AnalyzeResult responseData = operation.Value; ]]> @@ -1118,26 +341,15 @@ AnalyzeResult responseData = operation.Value; This sample shows how to call ClassifyDocument. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); - -ClassifyDocumentContent classifyRequest = new ClassifyDocumentContent(); -Operation operation = client.ClassifyDocument(WaitUntil.Completed, "", classifyRequest); -AnalyzeResult responseData = operation.Value; -]]> -This sample shows how to call ClassifyDocument with all parameters. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); ClassifyDocumentContent classifyRequest = new ClassifyDocumentContent { - UrlSource = new Uri("http://localhost:3000"), - Base64Source = BinaryData.FromObjectAsJson(new object()), + UrlSource = new Uri("http://host.com/doc.pdf"), }; -Operation operation = client.ClassifyDocument(WaitUntil.Completed, "", classifyRequest, stringIndexType: StringIndexType.TextElements, split: SplitMode.Auto, pages: ""); +Operation operation = client.ClassifyDocument(WaitUntil.Completed, "classifierId", classifyRequest); AnalyzeResult responseData = operation.Value; ]]> @@ -1145,680 +357,50 @@ AnalyzeResult responseData = operation.Value; This sample shows how to call ClassifyDocumentAsync and parse the result. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new object()); -Operation operation = await client.ClassifyDocumentAsync(WaitUntil.Completed, "", content); -BinaryData responseData = operation.Value; - -JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; -Console.WriteLine(result.GetProperty("apiVersion").ToString()); -Console.WriteLine(result.GetProperty("modelId").ToString()); -Console.WriteLine(result.GetProperty("stringIndexType").ToString()); -Console.WriteLine(result.GetProperty("content").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("pageNumber").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("spans")[0].GetProperty("length").ToString()); -]]> -This sample shows how to call ClassifyDocumentAsync with all parameters and request content and parse the result. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - urlSource = "http://localhost:3000", - base64Source = new object(), + urlSource = "http://host.com/doc.pdf", }); -Operation operation = await client.ClassifyDocumentAsync(WaitUntil.Completed, "", content, stringIndexType: "textElements", split: "auto", pages: ""); +Operation operation = await client.ClassifyDocumentAsync(WaitUntil.Completed, "classifierId", content); BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("apiVersion").ToString()); Console.WriteLine(result.GetProperty("modelId").ToString()); Console.WriteLine(result.GetProperty("stringIndexType").ToString()); -Console.WriteLine(result.GetProperty("contentFormat").ToString()); Console.WriteLine(result.GetProperty("content").ToString()); Console.WriteLine(result.GetProperty("pages")[0].GetProperty("pageNumber").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("angle").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("width").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("height").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("unit").ToString()); Console.WriteLine(result.GetProperty("pages")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); Console.WriteLine(result.GetProperty("pages")[0].GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("content").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("span").GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("span").GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("state").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("span").GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("span").GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("lines")[0].GetProperty("content").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("lines")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("lines")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("lines")[0].GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("kind").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("span").GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("span").GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("kind").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("span").GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("span").GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("role").ToString()); -Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("content").ToString()); -Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); -Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("rowCount").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("columnCount").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("kind").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("rowIndex").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("columnIndex").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("rowSpan").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("columnSpan").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("content").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("elements")[0].ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("content").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("elements")[0].ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("content").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("elements")[0].ToString()); -Console.WriteLine(result.GetProperty("figures")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); -Console.WriteLine(result.GetProperty("figures")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("figures")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("figures")[0].GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("figures")[0].GetProperty("elements")[0].ToString()); -Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("content").ToString()); -Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); -Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("elements")[0].ToString()); -Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("content").ToString()); -Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); -Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("elements")[0].ToString()); -Console.WriteLine(result.GetProperty("figures")[0].GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("sections")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("sections")[0].GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("sections")[0].GetProperty("elements")[0].ToString()); -Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("content").ToString()); -Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); -Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("content").ToString()); -Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); -Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("styles")[0].GetProperty("isHandwritten").ToString()); -Console.WriteLine(result.GetProperty("styles")[0].GetProperty("similarFontFamily").ToString()); -Console.WriteLine(result.GetProperty("styles")[0].GetProperty("fontStyle").ToString()); -Console.WriteLine(result.GetProperty("styles")[0].GetProperty("fontWeight").ToString()); -Console.WriteLine(result.GetProperty("styles")[0].GetProperty("color").ToString()); -Console.WriteLine(result.GetProperty("styles")[0].GetProperty("backgroundColor").ToString()); -Console.WriteLine(result.GetProperty("styles")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("styles")[0].GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("styles")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("languages")[0].GetProperty("locale").ToString()); -Console.WriteLine(result.GetProperty("languages")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("languages")[0].GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("languages")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("docType").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueString").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueDate").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueTime").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valuePhoneNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueInteger").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueSelectionMark").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueSignature").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueCountryRegion").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueString").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueDate").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueTime").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valuePhoneNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueInteger").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueSelectionMark").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueSignature").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCountryRegion").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueString").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueDate").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueTime").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valuePhoneNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueInteger").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueSelectionMark").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueSignature").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueCountryRegion").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueCurrency").GetProperty("amount").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueCurrency").GetProperty("currencySymbol").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueCurrency").GetProperty("currencyCode").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("houseNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("poBox").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("road").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("city").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("state").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("postalCode").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("countryRegion").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("streetAddress").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("unit").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("cityDistrict").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("stateDistrict").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("suburb").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("house").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("level").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueBoolean").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueSelectionGroup")[0].ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("content").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCurrency").GetProperty("amount").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCurrency").GetProperty("currencySymbol").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCurrency").GetProperty("currencyCode").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("houseNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("poBox").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("road").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("city").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("state").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("postalCode").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("countryRegion").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("streetAddress").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("unit").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("cityDistrict").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("stateDistrict").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("suburb").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("house").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("level").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueBoolean").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueSelectionGroup")[0].ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("content").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueString").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueDate").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueTime").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valuePhoneNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueInteger").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueSelectionMark").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueSignature").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueCountryRegion").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueString").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueDate").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueTime").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valuePhoneNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueInteger").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueSelectionMark").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueSignature").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCountryRegion").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCurrency").GetProperty("amount").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCurrency").GetProperty("currencySymbol").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCurrency").GetProperty("currencyCode").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("houseNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("poBox").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("road").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("city").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("state").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("postalCode").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("countryRegion").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("streetAddress").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("unit").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("cityDistrict").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("stateDistrict").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("suburb").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("house").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("level").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueBoolean").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueSelectionGroup")[0].ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("content").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueCurrency").GetProperty("amount").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueCurrency").GetProperty("currencySymbol").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueCurrency").GetProperty("currencyCode").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("houseNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("poBox").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("road").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("city").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("state").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("postalCode").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("countryRegion").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("streetAddress").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("unit").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("cityDistrict").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("stateDistrict").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("suburb").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("house").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("level").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueBoolean").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueSelectionGroup")[0].ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("content").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueCurrency").GetProperty("amount").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueCurrency").GetProperty("currencySymbol").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueCurrency").GetProperty("currencyCode").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("houseNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("poBox").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("road").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("city").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("state").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("postalCode").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("countryRegion").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("streetAddress").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("unit").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("cityDistrict").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("stateDistrict").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("suburb").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("house").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("level").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueBoolean").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueSelectionGroup")[0].ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("content").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); -Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("target").ToString()); ]]> This sample shows how to call ClassifyDocument and parse the result. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new object()); -Operation operation = client.ClassifyDocument(WaitUntil.Completed, "", content); -BinaryData responseData = operation.Value; - -JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; -Console.WriteLine(result.GetProperty("apiVersion").ToString()); -Console.WriteLine(result.GetProperty("modelId").ToString()); -Console.WriteLine(result.GetProperty("stringIndexType").ToString()); -Console.WriteLine(result.GetProperty("content").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("pageNumber").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("spans")[0].GetProperty("length").ToString()); -]]> -This sample shows how to call ClassifyDocument with all parameters and request content and parse the result. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - urlSource = "http://localhost:3000", - base64Source = new object(), + urlSource = "http://host.com/doc.pdf", }); -Operation operation = client.ClassifyDocument(WaitUntil.Completed, "", content, stringIndexType: "textElements", split: "auto", pages: ""); +Operation operation = client.ClassifyDocument(WaitUntil.Completed, "classifierId", content); BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("apiVersion").ToString()); Console.WriteLine(result.GetProperty("modelId").ToString()); Console.WriteLine(result.GetProperty("stringIndexType").ToString()); -Console.WriteLine(result.GetProperty("contentFormat").ToString()); Console.WriteLine(result.GetProperty("content").ToString()); Console.WriteLine(result.GetProperty("pages")[0].GetProperty("pageNumber").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("angle").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("width").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("height").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("unit").ToString()); Console.WriteLine(result.GetProperty("pages")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); Console.WriteLine(result.GetProperty("pages")[0].GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("content").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("span").GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("span").GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("state").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("span").GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("span").GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("lines")[0].GetProperty("content").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("lines")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("lines")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("lines")[0].GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("kind").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("span").GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("span").GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("kind").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("span").GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("span").GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("role").ToString()); -Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("content").ToString()); -Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); -Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("rowCount").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("columnCount").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("kind").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("rowIndex").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("columnIndex").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("rowSpan").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("columnSpan").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("content").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("elements")[0].ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("content").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("elements")[0].ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("content").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("elements")[0].ToString()); -Console.WriteLine(result.GetProperty("figures")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); -Console.WriteLine(result.GetProperty("figures")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("figures")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("figures")[0].GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("figures")[0].GetProperty("elements")[0].ToString()); -Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("content").ToString()); -Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); -Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("elements")[0].ToString()); -Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("content").ToString()); -Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); -Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("elements")[0].ToString()); -Console.WriteLine(result.GetProperty("figures")[0].GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("sections")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("sections")[0].GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("sections")[0].GetProperty("elements")[0].ToString()); -Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("content").ToString()); -Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); -Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("content").ToString()); -Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); -Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("styles")[0].GetProperty("isHandwritten").ToString()); -Console.WriteLine(result.GetProperty("styles")[0].GetProperty("similarFontFamily").ToString()); -Console.WriteLine(result.GetProperty("styles")[0].GetProperty("fontStyle").ToString()); -Console.WriteLine(result.GetProperty("styles")[0].GetProperty("fontWeight").ToString()); -Console.WriteLine(result.GetProperty("styles")[0].GetProperty("color").ToString()); -Console.WriteLine(result.GetProperty("styles")[0].GetProperty("backgroundColor").ToString()); -Console.WriteLine(result.GetProperty("styles")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("styles")[0].GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("styles")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("languages")[0].GetProperty("locale").ToString()); -Console.WriteLine(result.GetProperty("languages")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("languages")[0].GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("languages")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("docType").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueString").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueDate").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueTime").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valuePhoneNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueInteger").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueSelectionMark").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueSignature").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueCountryRegion").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueString").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueDate").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueTime").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valuePhoneNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueInteger").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueSelectionMark").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueSignature").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCountryRegion").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueString").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueDate").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueTime").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valuePhoneNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueInteger").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueSelectionMark").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueSignature").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueCountryRegion").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueCurrency").GetProperty("amount").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueCurrency").GetProperty("currencySymbol").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueCurrency").GetProperty("currencyCode").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("houseNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("poBox").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("road").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("city").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("state").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("postalCode").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("countryRegion").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("streetAddress").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("unit").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("cityDistrict").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("stateDistrict").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("suburb").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("house").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("level").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueBoolean").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueSelectionGroup")[0].ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("content").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCurrency").GetProperty("amount").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCurrency").GetProperty("currencySymbol").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCurrency").GetProperty("currencyCode").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("houseNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("poBox").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("road").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("city").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("state").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("postalCode").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("countryRegion").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("streetAddress").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("unit").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("cityDistrict").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("stateDistrict").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("suburb").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("house").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("level").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueBoolean").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueSelectionGroup")[0].ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("content").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueString").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueDate").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueTime").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valuePhoneNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueInteger").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueSelectionMark").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueSignature").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueCountryRegion").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueString").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueDate").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueTime").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valuePhoneNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueInteger").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueSelectionMark").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueSignature").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCountryRegion").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCurrency").GetProperty("amount").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCurrency").GetProperty("currencySymbol").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCurrency").GetProperty("currencyCode").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("houseNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("poBox").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("road").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("city").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("state").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("postalCode").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("countryRegion").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("streetAddress").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("unit").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("cityDistrict").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("stateDistrict").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("suburb").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("house").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("level").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueBoolean").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueSelectionGroup")[0].ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("content").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueCurrency").GetProperty("amount").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueCurrency").GetProperty("currencySymbol").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueCurrency").GetProperty("currencyCode").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("houseNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("poBox").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("road").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("city").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("state").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("postalCode").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("countryRegion").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("streetAddress").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("unit").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("cityDistrict").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("stateDistrict").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("suburb").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("house").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("level").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueBoolean").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueSelectionGroup")[0].ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("content").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueCurrency").GetProperty("amount").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueCurrency").GetProperty("currencySymbol").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueCurrency").GetProperty("currencyCode").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("houseNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("poBox").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("road").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("city").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("state").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("postalCode").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("countryRegion").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("streetAddress").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("unit").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("cityDistrict").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("stateDistrict").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("suburb").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("house").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("level").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueBoolean").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueSelectionGroup")[0].ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("content").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("spans")[0].GetProperty("offset").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("spans")[0].GetProperty("length").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("documents")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); -Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("target").ToString()); ]]> diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentIntelligenceModelFactory.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentIntelligenceModelFactory.cs index 6e39964347fa..65feb08f0058 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentIntelligenceModelFactory.cs +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentIntelligenceModelFactory.cs @@ -662,6 +662,38 @@ public static AnalyzeBatchOperationDetail AnalyzeBatchOperationDetail(OperationS return new AnalyzeBatchOperationDetail(status, sourceUrl, resultUrl, error, serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// Unique document model name. + /// Document model description. + /// Custom document model build mode. + /// + /// Azure Blob Storage location containing the training data. Either + /// azureBlobSource or azureBlobFileListSource must be specified. + /// + /// + /// Azure Blob Storage file list specifying the training data. Either + /// azureBlobSource or azureBlobFileListSource must be specified. + /// + /// List of key-value tag attributes associated with the document model. + /// Max number of V100-equivalent GPU hours to use for model training. Default=0.5. + /// Allow overwriting an existing model with the same name. + /// A new instance for mocking. + public static BuildDocumentModelContent BuildDocumentModelContent(string modelId = null, string description = null, DocumentBuildMode buildMode = default, AzureBlobContentSource azureBlobSource = null, AzureBlobFileListContentSource azureBlobFileListSource = null, IDictionary tags = null, float? maxTrainingHours = null, bool? allowOverwrite = null) + { + tags ??= new Dictionary(); + + return new BuildDocumentModelContent( + modelId, + description, + buildMode, + azureBlobSource, + azureBlobFileListSource, + tags, + maxTrainingHours, + allowOverwrite, + serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// Unique document model name. /// Document model description. @@ -708,97 +740,65 @@ public static DocumentModelDetails DocumentModelDetails(string modelId = null, s serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// Unique document model name. - /// Document model description. - /// Custom document model build mode. - /// - /// Azure Blob Storage location containing the training data. Either - /// azureBlobSource or azureBlobFileListSource must be specified. - /// - /// - /// Azure Blob Storage file list specifying the training data. Either - /// azureBlobSource or azureBlobFileListSource must be specified. - /// - /// List of key-value tag attributes associated with the document model. - /// Max number of V100-equivalent GPU hours to use for model training. Default=0.5. - /// Allow overwriting an existing model with the same name. - /// A new instance for mocking. - public static BuildDocumentModelContent BuildDocumentModelContent(string modelId = null, string description = null, DocumentBuildMode buildMode = default, AzureBlobContentSource azureBlobSource = null, AzureBlobFileListContentSource azureBlobFileListSource = null, IDictionary tags = null, float? maxTrainingHours = null, bool? allowOverwrite = null) - { - tags ??= new Dictionary(); - - return new BuildDocumentModelContent( - modelId, - description, - buildMode, - azureBlobSource, - azureBlobFileListSource, - tags, - maxTrainingHours, - allowOverwrite, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . + /// Initializes a new instance of . /// Operation ID. /// Operation status. notStarted, running, completed, or failed. /// Operation progress (0-100). /// Date and time (UTC) when the operation was created. /// Date and time (UTC) when the status was last updated. - /// Type of operation. /// URL of the resource targeted by this operation. /// API version used to create this operation. /// List of key-value tag attributes associated with the document model. /// Encountered error. - /// A new instance for mocking. - public static OperationDetails OperationDetails(string operationId = null, OperationStatus status = default, int? percentCompleted = null, DateTimeOffset createdOn = default, DateTimeOffset lastUpdatedOn = default, string kind = null, Uri resourceLocation = null, string apiVersion = null, IReadOnlyDictionary tags = null, DocumentIntelligenceError error = null) + /// Operation result upon success. + /// A new instance for mocking. + public static DocumentModelBuildOperationDetails DocumentModelBuildOperationDetails(string operationId = null, OperationStatus status = default, int? percentCompleted = null, DateTimeOffset createdOn = default, DateTimeOffset lastUpdatedOn = default, Uri resourceLocation = null, string apiVersion = null, IReadOnlyDictionary tags = null, DocumentIntelligenceError error = null, DocumentModelDetails result = null) { tags ??= new Dictionary(); - return new UnknownOperationDetails( + return new DocumentModelBuildOperationDetails( operationId, status, percentCompleted, createdOn, lastUpdatedOn, - kind == null ? default : new OperationKind(kind), + OperationKind.DocumentModelBuild, resourceLocation, apiVersion, tags, error, - serializedAdditionalRawData: null); + serializedAdditionalRawData: null, + result); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// Operation ID. /// Operation status. notStarted, running, completed, or failed. /// Operation progress (0-100). /// Date and time (UTC) when the operation was created. /// Date and time (UTC) when the status was last updated. + /// Type of operation. /// URL of the resource targeted by this operation. /// API version used to create this operation. /// List of key-value tag attributes associated with the document model. /// Encountered error. - /// Operation result upon success. - /// A new instance for mocking. - public static DocumentModelBuildOperationDetails DocumentModelBuildOperationDetails(string operationId = null, OperationStatus status = default, int? percentCompleted = null, DateTimeOffset createdOn = default, DateTimeOffset lastUpdatedOn = default, Uri resourceLocation = null, string apiVersion = null, IReadOnlyDictionary tags = null, DocumentIntelligenceError error = null, DocumentModelDetails result = null) + /// A new instance for mocking. + public static OperationDetails OperationDetails(string operationId = null, OperationStatus status = default, int? percentCompleted = null, DateTimeOffset createdOn = default, DateTimeOffset lastUpdatedOn = default, string kind = null, Uri resourceLocation = null, string apiVersion = null, IReadOnlyDictionary tags = null, DocumentIntelligenceError error = null) { tags ??= new Dictionary(); - return new DocumentModelBuildOperationDetails( + return new UnknownOperationDetails( operationId, status, percentCompleted, createdOn, lastUpdatedOn, - OperationKind.DocumentModelBuild, + kind == null ? default : new OperationKind(kind), resourceLocation, apiVersion, tags, error, - serializedAdditionalRawData: null, - result); + serializedAdditionalRawData: null); } /// Initializes a new instance of . @@ -952,23 +952,6 @@ public static DocumentClassifierBuildOperationDetails DocumentClassifierBuildOpe result); } - /// Initializes a new instance of . - /// Details regarding custom document models. - /// A new instance for mocking. - public static ResourceDetails ResourceDetails(CustomDocumentModelsDetails customDocumentModels = null) - { - return new ResourceDetails(customDocumentModels, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Number of custom document models in the current resource. - /// Maximum number of custom document models supported in the current resource. - /// A new instance for mocking. - public static CustomDocumentModelsDetails CustomDocumentModelsDetails(int count = default, int limit = default) - { - return new CustomDocumentModelsDetails(count, limit, serializedAdditionalRawData: null); - } - /// Initializes a new instance of . /// Unique document model name. /// Document model description. @@ -1004,6 +987,23 @@ public static AuthorizeCopyContent AuthorizeCopyContent(string modelId = null, s return new AuthorizeCopyContent(modelId, description, tags, serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// Details regarding custom document models. + /// A new instance for mocking. + public static ResourceDetails ResourceDetails(CustomDocumentModelsDetails customDocumentModels = null) + { + return new ResourceDetails(customDocumentModels, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Number of custom document models in the current resource. + /// Maximum number of custom document models supported in the current resource. + /// A new instance for mocking. + public static CustomDocumentModelsDetails CustomDocumentModelsDetails(int count = default, int limit = default) + { + return new CustomDocumentModelsDetails(count, limit, serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// Unique document classifier name. /// Document classifier description. diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Generated/Samples/Samples_DocumentIntelligenceAdministrationClient.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Generated/Samples/Samples_DocumentIntelligenceAdministrationClient.cs index 45b79245ba54..47ae1347e5bd 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Generated/Samples/Samples_DocumentIntelligenceAdministrationClient.cs +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Generated/Samples/Samples_DocumentIntelligenceAdministrationClient.cs @@ -19,15 +19,16 @@ public partial class Samples_DocumentIntelligenceAdministrationClient { [Test] [Ignore("Only validating compilation of examples")] - public void Example_DocumentIntelligenceAdministrationClient_AuthorizeModelCopy_ShortVersion() + public void Example_DocumentIntelligenceAdministrationClient_AuthorizeModelCopy_AuthorizeCopyOfDocumentModel() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - modelId = "", + modelId = "targetModel", + description = "Target model description", }); Response response = client.AuthorizeModelCopy(content); @@ -42,15 +43,16 @@ public void Example_DocumentIntelligenceAdministrationClient_AuthorizeModelCopy_ [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DocumentIntelligenceAdministrationClient_AuthorizeModelCopy_ShortVersion_Async() + public async Task Example_DocumentIntelligenceAdministrationClient_AuthorizeModelCopy_AuthorizeCopyOfDocumentModel_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - modelId = "", + modelId = "targetModel", + description = "Target model description", }); Response response = await client.AuthorizeModelCopyAsync(content); @@ -65,131 +67,43 @@ public async Task Example_DocumentIntelligenceAdministrationClient_AuthorizeMode [Test] [Ignore("Only validating compilation of examples")] - public void Example_DocumentIntelligenceAdministrationClient_AuthorizeModelCopy_ShortVersion_Convenience() + public void Example_DocumentIntelligenceAdministrationClient_AuthorizeModelCopy_AuthorizeCopyOfDocumentModel_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - AuthorizeCopyContent authorizeCopyRequest = new AuthorizeCopyContent(""); - Response response = client.AuthorizeModelCopy(authorizeCopyRequest); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DocumentIntelligenceAdministrationClient_AuthorizeModelCopy_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - - AuthorizeCopyContent authorizeCopyRequest = new AuthorizeCopyContent(""); - Response response = await client.AuthorizeModelCopyAsync(authorizeCopyRequest); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DocumentIntelligenceAdministrationClient_AuthorizeModelCopy_AllParameters() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - modelId = "", - description = "", - tags = new - { - key = "", - }, - }); - Response response = client.AuthorizeModelCopy(content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("targetResourceId").ToString()); - Console.WriteLine(result.GetProperty("targetResourceRegion").ToString()); - Console.WriteLine(result.GetProperty("targetModelId").ToString()); - Console.WriteLine(result.GetProperty("targetModelLocation").ToString()); - Console.WriteLine(result.GetProperty("accessToken").ToString()); - Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DocumentIntelligenceAdministrationClient_AuthorizeModelCopy_AllParameters_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - modelId = "", - description = "", - tags = new - { - key = "", - }, - }); - Response response = await client.AuthorizeModelCopyAsync(content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("targetResourceId").ToString()); - Console.WriteLine(result.GetProperty("targetResourceRegion").ToString()); - Console.WriteLine(result.GetProperty("targetModelId").ToString()); - Console.WriteLine(result.GetProperty("targetModelLocation").ToString()); - Console.WriteLine(result.GetProperty("accessToken").ToString()); - Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DocumentIntelligenceAdministrationClient_AuthorizeModelCopy_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - - AuthorizeCopyContent authorizeCopyRequest = new AuthorizeCopyContent("") + AuthorizeCopyContent authorizeCopyRequest = new AuthorizeCopyContent("targetModel") { - Description = "", - Tags = -{ -["key"] = "" -}, + Description = "Target model description", }; Response response = client.AuthorizeModelCopy(authorizeCopyRequest); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DocumentIntelligenceAdministrationClient_AuthorizeModelCopy_AllParameters_Convenience_Async() + public async Task Example_DocumentIntelligenceAdministrationClient_AuthorizeModelCopy_AuthorizeCopyOfDocumentModel_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - AuthorizeCopyContent authorizeCopyRequest = new AuthorizeCopyContent("") + AuthorizeCopyContent authorizeCopyRequest = new AuthorizeCopyContent("targetModel") { - Description = "", - Tags = -{ -["key"] = "" -}, + Description = "Target model description", }; Response response = await client.AuthorizeModelCopyAsync(authorizeCopyRequest); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DocumentModelDetails_GetModel_ShortVersion() + public void Example_DocumentModelDetails_GetModel_GetCustomDocumentModel() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - Response response = client.GetModel("", null); + Response response = client.GetModel("myCustomModel", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("modelId").ToString()); @@ -198,13 +112,13 @@ public void Example_DocumentModelDetails_GetModel_ShortVersion() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DocumentModelDetails_GetModel_ShortVersion_Async() + public async Task Example_DocumentModelDetails_GetModel_GetCustomDocumentModel_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - Response response = await client.GetModelAsync("", null); + Response response = await client.GetModelAsync("myCustomModel", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("modelId").ToString()); @@ -213,205 +127,109 @@ public async Task Example_DocumentModelDetails_GetModel_ShortVersion_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_DocumentModelDetails_GetModel_ShortVersion_Convenience() + public void Example_DocumentModelDetails_GetModel_GetCustomDocumentModel_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - Response response = client.GetModel(""); + Response response = client.GetModel("myCustomModel"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DocumentModelDetails_GetModel_ShortVersion_Convenience_Async() + public async Task Example_DocumentModelDetails_GetModel_GetCustomDocumentModel_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - Response response = await client.GetModelAsync(""); + Response response = await client.GetModelAsync("myCustomModel"); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DocumentModelDetails_GetModel_AllParameters() + public void Example_DocumentModelDetails_GetModel_GetPrebuiltDocumentModel() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - Response response = client.GetModel("", null); + Response response = client.GetModel("prebuilt-invoice", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("modelId").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); - Console.WriteLine(result.GetProperty("apiVersion").ToString()); - Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("buildMode").ToString()); - Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); - Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("prefix").ToString()); - Console.WriteLine(result.GetProperty("azureBlobFileListSource").GetProperty("containerUrl").ToString()); - Console.WriteLine(result.GetProperty("azureBlobFileListSource").GetProperty("fileList").ToString()); - Console.WriteLine(result.GetProperty("classifierId").ToString()); - Console.WriteLine(result.GetProperty("split").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("buildMode").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("example").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("example").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("example").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("items").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("items").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("items").GetProperty("example").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldConfidence").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("modelId").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("confidenceThreshold").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("features")[0].ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("queryFields")[0].ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("maxDocumentsToAnalyze").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("trainingHours").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DocumentModelDetails_GetModel_AllParameters_Async() + public async Task Example_DocumentModelDetails_GetModel_GetPrebuiltDocumentModel_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - Response response = await client.GetModelAsync("", null); + Response response = await client.GetModelAsync("prebuilt-invoice", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("modelId").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); - Console.WriteLine(result.GetProperty("apiVersion").ToString()); - Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("buildMode").ToString()); - Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); - Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("prefix").ToString()); - Console.WriteLine(result.GetProperty("azureBlobFileListSource").GetProperty("containerUrl").ToString()); - Console.WriteLine(result.GetProperty("azureBlobFileListSource").GetProperty("fileList").ToString()); - Console.WriteLine(result.GetProperty("classifierId").ToString()); - Console.WriteLine(result.GetProperty("split").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("buildMode").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("example").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("example").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("example").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("items").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("items").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("items").GetProperty("example").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldConfidence").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("modelId").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("confidenceThreshold").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("features")[0].ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("queryFields")[0].ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("maxDocumentsToAnalyze").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("trainingHours").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DocumentModelDetails_GetModel_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - - Response response = client.GetModel(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DocumentModelDetails_GetModel_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - - Response response = await client.GetModelAsync(""); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DocumentModelDetails_DeleteModel_ShortVersion() + public void Example_DocumentModelDetails_GetModel_GetPrebuiltDocumentModel_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - Response response = client.DeleteModel(""); - - Console.WriteLine(response.Status); + Response response = client.GetModel("prebuilt-invoice"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DocumentModelDetails_DeleteModel_ShortVersion_Async() + public async Task Example_DocumentModelDetails_GetModel_GetPrebuiltDocumentModel_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - Response response = await client.DeleteModelAsync(""); - - Console.WriteLine(response.Status); + Response response = await client.GetModelAsync("prebuilt-invoice"); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DocumentModelDetails_DeleteModel_AllParameters() + public void Example_DocumentModelDetails_DeleteModel_DeleteDocumentModel() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - Response response = client.DeleteModel(""); + Response response = client.DeleteModel("myCustomModel"); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DocumentModelDetails_DeleteModel_AllParameters_Async() + public async Task Example_DocumentModelDetails_DeleteModel_DeleteDocumentModel_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - Response response = await client.DeleteModelAsync(""); + Response response = await client.DeleteModelAsync("myCustomModel"); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DocumentIntelligenceAdministrationClient_GetResourceInfo_ShortVersion() + public void Example_DocumentIntelligenceAdministrationClient_GetResourceInfo_GetResourceDetails() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); @@ -424,9 +242,9 @@ public void Example_DocumentIntelligenceAdministrationClient_GetResourceInfo_Sho [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DocumentIntelligenceAdministrationClient_GetResourceInfo_ShortVersion_Async() + public async Task Example_DocumentIntelligenceAdministrationClient_GetResourceInfo_GetResourceDetails_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); @@ -439,9 +257,9 @@ public async Task Example_DocumentIntelligenceAdministrationClient_GetResourceIn [Test] [Ignore("Only validating compilation of examples")] - public void Example_DocumentIntelligenceAdministrationClient_GetResourceInfo_ShortVersion_Convenience() + public void Example_DocumentIntelligenceAdministrationClient_GetResourceInfo_GetResourceDetails_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); @@ -450,9 +268,9 @@ public void Example_DocumentIntelligenceAdministrationClient_GetResourceInfo_Sho [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DocumentIntelligenceAdministrationClient_GetResourceInfo_ShortVersion_Convenience_Async() + public async Task Example_DocumentIntelligenceAdministrationClient_GetResourceInfo_GetResourceDetails_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); @@ -461,853 +279,327 @@ public async Task Example_DocumentIntelligenceAdministrationClient_GetResourceIn [Test] [Ignore("Only validating compilation of examples")] - public void Example_DocumentIntelligenceAdministrationClient_GetResourceInfo_AllParameters() + public void Example_OperationDetails_GetOperation_GetOperation() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - Response response = client.GetResourceInfo(null); + Response response = client.GetOperation("b704bb00-d130-4f3f-a1d8-ca96de3eabb4", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("customDocumentModels").GetProperty("count").ToString()); - Console.WriteLine(result.GetProperty("customDocumentModels").GetProperty("limit").ToString()); + Console.WriteLine(result.GetProperty("operationId").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("resourceLocation").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DocumentIntelligenceAdministrationClient_GetResourceInfo_AllParameters_Async() + public async Task Example_OperationDetails_GetOperation_GetOperation_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - Response response = await client.GetResourceInfoAsync(null); + Response response = await client.GetOperationAsync("b704bb00-d130-4f3f-a1d8-ca96de3eabb4", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("customDocumentModels").GetProperty("count").ToString()); - Console.WriteLine(result.GetProperty("customDocumentModels").GetProperty("limit").ToString()); + Console.WriteLine(result.GetProperty("operationId").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("resourceLocation").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DocumentIntelligenceAdministrationClient_GetResourceInfo_AllParameters_Convenience() + public void Example_OperationDetails_GetOperation_GetOperation_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - Response response = client.GetResourceInfo(); + Response response = client.GetOperation("b704bb00-d130-4f3f-a1d8-ca96de3eabb4"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DocumentIntelligenceAdministrationClient_GetResourceInfo_AllParameters_Convenience_Async() + public async Task Example_OperationDetails_GetOperation_GetOperation_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - Response response = await client.GetResourceInfoAsync(); + Response response = await client.GetOperationAsync("b704bb00-d130-4f3f-a1d8-ca96de3eabb4"); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_OperationDetails_GetOperation_ShortVersion() + public void Example_DocumentIntelligenceAdministrationClient_AuthorizeClassifierCopy_AuthorizeCopyOfDocumentClassifier() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - Response response = client.GetOperation("", null); + using RequestContent content = RequestContent.Create(new + { + classifierId = "targetClassifier", + description = "Target classifier description", + }); + Response response = client.AuthorizeClassifierCopy(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("operationId").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); - Console.WriteLine(result.GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("resourceLocation").ToString()); + Console.WriteLine(result.GetProperty("targetResourceId").ToString()); + Console.WriteLine(result.GetProperty("targetResourceRegion").ToString()); + Console.WriteLine(result.GetProperty("targetClassifierId").ToString()); + Console.WriteLine(result.GetProperty("targetClassifierLocation").ToString()); + Console.WriteLine(result.GetProperty("accessToken").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_OperationDetails_GetOperation_ShortVersion_Async() + public async Task Example_DocumentIntelligenceAdministrationClient_AuthorizeClassifierCopy_AuthorizeCopyOfDocumentClassifier_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - Response response = await client.GetOperationAsync("", null); + using RequestContent content = RequestContent.Create(new + { + classifierId = "targetClassifier", + description = "Target classifier description", + }); + Response response = await client.AuthorizeClassifierCopyAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("operationId").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); - Console.WriteLine(result.GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("resourceLocation").ToString()); + Console.WriteLine(result.GetProperty("targetResourceId").ToString()); + Console.WriteLine(result.GetProperty("targetResourceRegion").ToString()); + Console.WriteLine(result.GetProperty("targetClassifierId").ToString()); + Console.WriteLine(result.GetProperty("targetClassifierLocation").ToString()); + Console.WriteLine(result.GetProperty("accessToken").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_OperationDetails_GetOperation_ShortVersion_Convenience() + public void Example_DocumentIntelligenceAdministrationClient_AuthorizeClassifierCopy_AuthorizeCopyOfDocumentClassifier_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - Response response = client.GetOperation(""); + AuthorizeClassifierCopyContent authorizeCopyRequest = new AuthorizeClassifierCopyContent("targetClassifier") + { + Description = "Target classifier description", + }; + Response response = client.AuthorizeClassifierCopy(authorizeCopyRequest); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_OperationDetails_GetOperation_ShortVersion_Convenience_Async() + public async Task Example_DocumentIntelligenceAdministrationClient_AuthorizeClassifierCopy_AuthorizeCopyOfDocumentClassifier_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - Response response = await client.GetOperationAsync(""); + AuthorizeClassifierCopyContent authorizeCopyRequest = new AuthorizeClassifierCopyContent("targetClassifier") + { + Description = "Target classifier description", + }; + Response response = await client.AuthorizeClassifierCopyAsync(authorizeCopyRequest); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_OperationDetails_GetOperation_AllParameters() + public void Example_DocumentClassifierDetails_GetClassifier_GetDocumentClassifier() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - Response response = client.GetOperation("", null); + Response response = client.GetClassifier("myClassifier", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("operationId").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("percentCompleted").ToString()); + Console.WriteLine(result.GetProperty("classifierId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); - Console.WriteLine(result.GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("resourceLocation").ToString()); Console.WriteLine(result.GetProperty("apiVersion").ToString()); - Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_OperationDetails_GetOperation_AllParameters_Async() + public async Task Example_DocumentClassifierDetails_GetClassifier_GetDocumentClassifier_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - Response response = await client.GetOperationAsync("", null); + Response response = await client.GetClassifierAsync("myClassifier", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("operationId").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("percentCompleted").ToString()); + Console.WriteLine(result.GetProperty("classifierId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); - Console.WriteLine(result.GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("resourceLocation").ToString()); Console.WriteLine(result.GetProperty("apiVersion").ToString()); - Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_OperationDetails_GetOperation_AllParameters_Convenience() + public void Example_DocumentClassifierDetails_GetClassifier_GetDocumentClassifier_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - Response response = client.GetOperation(""); + Response response = client.GetClassifier("myClassifier"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_OperationDetails_GetOperation_AllParameters_Convenience_Async() + public async Task Example_DocumentClassifierDetails_GetClassifier_GetDocumentClassifier_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - Response response = await client.GetOperationAsync(""); + Response response = await client.GetClassifierAsync("myClassifier"); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DocumentIntelligenceAdministrationClient_AuthorizeClassifierCopy_ShortVersion() + public void Example_DocumentClassifierDetails_DeleteClassifier_DeleteDocumentClassifier() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - using RequestContent content = RequestContent.Create(new - { - classifierId = "", - }); - Response response = client.AuthorizeClassifierCopy(content); + Response response = client.DeleteClassifier("myClassifier"); - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("targetResourceId").ToString()); - Console.WriteLine(result.GetProperty("targetResourceRegion").ToString()); - Console.WriteLine(result.GetProperty("targetClassifierId").ToString()); - Console.WriteLine(result.GetProperty("targetClassifierLocation").ToString()); - Console.WriteLine(result.GetProperty("accessToken").ToString()); - Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DocumentIntelligenceAdministrationClient_AuthorizeClassifierCopy_ShortVersion_Async() + public async Task Example_DocumentClassifierDetails_DeleteClassifier_DeleteDocumentClassifier_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - using RequestContent content = RequestContent.Create(new - { - classifierId = "", - }); - Response response = await client.AuthorizeClassifierCopyAsync(content); + Response response = await client.DeleteClassifierAsync("myClassifier"); - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("targetResourceId").ToString()); - Console.WriteLine(result.GetProperty("targetResourceRegion").ToString()); - Console.WriteLine(result.GetProperty("targetClassifierId").ToString()); - Console.WriteLine(result.GetProperty("targetClassifierLocation").ToString()); - Console.WriteLine(result.GetProperty("accessToken").ToString()); - Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DocumentIntelligenceAdministrationClient_AuthorizeClassifierCopy_ShortVersion_Convenience() + public void Example_DocumentModelDetails_GetModels_GetDocumentModels() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - AuthorizeClassifierCopyContent authorizeCopyRequest = new AuthorizeClassifierCopyContent(""); - Response response = client.AuthorizeClassifierCopy(authorizeCopyRequest); + foreach (BinaryData item in client.GetModels(null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + } } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DocumentIntelligenceAdministrationClient_AuthorizeClassifierCopy_ShortVersion_Convenience_Async() + public async Task Example_DocumentModelDetails_GetModels_GetDocumentModels_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - AuthorizeClassifierCopyContent authorizeCopyRequest = new AuthorizeClassifierCopyContent(""); - Response response = await client.AuthorizeClassifierCopyAsync(authorizeCopyRequest); + await foreach (BinaryData item in client.GetModelsAsync(null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + } } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DocumentIntelligenceAdministrationClient_AuthorizeClassifierCopy_AllParameters() + public void Example_DocumentModelDetails_GetModels_GetDocumentModels_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - using RequestContent content = RequestContent.Create(new + foreach (DocumentModelDetails item in client.GetModels()) { - classifierId = "", - description = "", - tags = new - { - key = "", - }, - }); - Response response = client.AuthorizeClassifierCopy(content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("targetResourceId").ToString()); - Console.WriteLine(result.GetProperty("targetResourceRegion").ToString()); - Console.WriteLine(result.GetProperty("targetClassifierId").ToString()); - Console.WriteLine(result.GetProperty("targetClassifierLocation").ToString()); - Console.WriteLine(result.GetProperty("accessToken").ToString()); - Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + } } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DocumentIntelligenceAdministrationClient_AuthorizeClassifierCopy_AllParameters_Async() + public async Task Example_DocumentModelDetails_GetModels_GetDocumentModels_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - using RequestContent content = RequestContent.Create(new + await foreach (DocumentModelDetails item in client.GetModelsAsync()) { - classifierId = "", - description = "", - tags = new - { - key = "", - }, - }); - Response response = await client.AuthorizeClassifierCopyAsync(content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("targetResourceId").ToString()); - Console.WriteLine(result.GetProperty("targetResourceRegion").ToString()); - Console.WriteLine(result.GetProperty("targetClassifierId").ToString()); - Console.WriteLine(result.GetProperty("targetClassifierLocation").ToString()); - Console.WriteLine(result.GetProperty("accessToken").ToString()); - Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + } } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DocumentIntelligenceAdministrationClient_AuthorizeClassifierCopy_AllParameters_Convenience() + public void Example_OperationDetails_GetOperations_GetOperations() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - AuthorizeClassifierCopyContent authorizeCopyRequest = new AuthorizeClassifierCopyContent("") + foreach (BinaryData item in client.GetOperations(null)) { - Description = "", - Tags = -{ -["key"] = "" -}, - }; - Response response = client.AuthorizeClassifierCopy(authorizeCopyRequest); + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("operationId").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("resourceLocation").ToString()); + } } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DocumentIntelligenceAdministrationClient_AuthorizeClassifierCopy_AllParameters_Convenience_Async() + public async Task Example_OperationDetails_GetOperations_GetOperations_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - AuthorizeClassifierCopyContent authorizeCopyRequest = new AuthorizeClassifierCopyContent("") - { - Description = "", - Tags = -{ -["key"] = "" -}, - }; - Response response = await client.AuthorizeClassifierCopyAsync(authorizeCopyRequest); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DocumentClassifierDetails_GetClassifier_ShortVersion() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - - Response response = client.GetClassifier("", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("classifierId").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("apiVersion").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DocumentClassifierDetails_GetClassifier_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - - Response response = await client.GetClassifierAsync("", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("classifierId").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("apiVersion").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DocumentClassifierDetails_GetClassifier_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - - Response response = client.GetClassifier(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DocumentClassifierDetails_GetClassifier_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - - Response response = await client.GetClassifierAsync(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DocumentClassifierDetails_GetClassifier_AllParameters() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - - Response response = client.GetClassifier("", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("classifierId").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); - Console.WriteLine(result.GetProperty("apiVersion").ToString()); - Console.WriteLine(result.GetProperty("baseClassifierId").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("sourceKind").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobSource").GetProperty("prefix").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobFileListSource").GetProperty("containerUrl").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobFileListSource").GetProperty("fileList").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("target").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DocumentClassifierDetails_GetClassifier_AllParameters_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - - Response response = await client.GetClassifierAsync("", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("classifierId").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); - Console.WriteLine(result.GetProperty("apiVersion").ToString()); - Console.WriteLine(result.GetProperty("baseClassifierId").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("sourceKind").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobSource").GetProperty("prefix").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobFileListSource").GetProperty("containerUrl").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobFileListSource").GetProperty("fileList").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("target").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DocumentClassifierDetails_GetClassifier_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - - Response response = client.GetClassifier(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DocumentClassifierDetails_GetClassifier_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - - Response response = await client.GetClassifierAsync(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DocumentClassifierDetails_DeleteClassifier_ShortVersion() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - - Response response = client.DeleteClassifier(""); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DocumentClassifierDetails_DeleteClassifier_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - - Response response = await client.DeleteClassifierAsync(""); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DocumentClassifierDetails_DeleteClassifier_AllParameters() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - - Response response = client.DeleteClassifier(""); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DocumentClassifierDetails_DeleteClassifier_AllParameters_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - - Response response = await client.DeleteClassifierAsync(""); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DocumentModelDetails_GetModels_ShortVersion() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - - foreach (BinaryData item in client.GetModels(null)) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("modelId").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DocumentModelDetails_GetModels_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - - await foreach (BinaryData item in client.GetModelsAsync(null)) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("modelId").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DocumentModelDetails_GetModels_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - - foreach (DocumentModelDetails item in client.GetModels()) - { - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DocumentModelDetails_GetModels_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - - await foreach (DocumentModelDetails item in client.GetModelsAsync()) - { - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DocumentModelDetails_GetModels_AllParameters() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - - foreach (BinaryData item in client.GetModels(null)) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("modelId").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); - Console.WriteLine(result.GetProperty("apiVersion").ToString()); - Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("buildMode").ToString()); - Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); - Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("prefix").ToString()); - Console.WriteLine(result.GetProperty("azureBlobFileListSource").GetProperty("containerUrl").ToString()); - Console.WriteLine(result.GetProperty("azureBlobFileListSource").GetProperty("fileList").ToString()); - Console.WriteLine(result.GetProperty("classifierId").ToString()); - Console.WriteLine(result.GetProperty("split").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("buildMode").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("example").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("example").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("example").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("items").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("items").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("items").GetProperty("example").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldConfidence").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("modelId").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("confidenceThreshold").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("features")[0].ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("queryFields")[0].ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("maxDocumentsToAnalyze").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("trainingHours").ToString()); - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DocumentModelDetails_GetModels_AllParameters_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - - await foreach (BinaryData item in client.GetModelsAsync(null)) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("modelId").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); - Console.WriteLine(result.GetProperty("apiVersion").ToString()); - Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("buildMode").ToString()); - Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); - Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("prefix").ToString()); - Console.WriteLine(result.GetProperty("azureBlobFileListSource").GetProperty("containerUrl").ToString()); - Console.WriteLine(result.GetProperty("azureBlobFileListSource").GetProperty("fileList").ToString()); - Console.WriteLine(result.GetProperty("classifierId").ToString()); - Console.WriteLine(result.GetProperty("split").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("buildMode").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("example").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("example").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("example").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("items").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("items").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("items").GetProperty("example").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldConfidence").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("modelId").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("confidenceThreshold").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("features")[0].ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("queryFields")[0].ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("maxDocumentsToAnalyze").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("trainingHours").ToString()); - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DocumentModelDetails_GetModels_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - - foreach (DocumentModelDetails item in client.GetModels()) - { - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DocumentModelDetails_GetModels_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - - await foreach (DocumentModelDetails item in client.GetModelsAsync()) - { - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_OperationDetails_GetOperations_ShortVersion() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - - foreach (BinaryData item in client.GetOperations(null)) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("operationId").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); - Console.WriteLine(result.GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("resourceLocation").ToString()); - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_OperationDetails_GetOperations_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - - await foreach (BinaryData item in client.GetOperationsAsync(null)) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("operationId").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); - Console.WriteLine(result.GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("resourceLocation").ToString()); - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_OperationDetails_GetOperations_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - - foreach (OperationDetails item in client.GetOperations()) - { - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_OperationDetails_GetOperations_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - - await foreach (OperationDetails item in client.GetOperationsAsync()) - { - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_OperationDetails_GetOperations_AllParameters() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - - foreach (BinaryData item in client.GetOperations(null)) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("operationId").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("percentCompleted").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); - Console.WriteLine(result.GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("resourceLocation").ToString()); - Console.WriteLine(result.GetProperty("apiVersion").ToString()); - Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("message").ToString()); - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_OperationDetails_GetOperations_AllParameters_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - - await foreach (BinaryData item in client.GetOperationsAsync(null)) + await foreach (BinaryData item in client.GetOperationsAsync(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("operationId").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("percentCompleted").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); Console.WriteLine(result.GetProperty("kind").ToString()); Console.WriteLine(result.GetProperty("resourceLocation").ToString()); - Console.WriteLine(result.GetProperty("apiVersion").ToString()); - Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("message").ToString()); } } [Test] [Ignore("Only validating compilation of examples")] - public void Example_OperationDetails_GetOperations_AllParameters_Convenience() + public void Example_OperationDetails_GetOperations_GetOperations_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); @@ -1318,9 +610,9 @@ public void Example_OperationDetails_GetOperations_AllParameters_Convenience() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_OperationDetails_GetOperations_AllParameters_Convenience_Async() + public async Task Example_OperationDetails_GetOperations_GetOperations_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); @@ -1331,9 +623,9 @@ public async Task Example_OperationDetails_GetOperations_AllParameters_Convenien [Test] [Ignore("Only validating compilation of examples")] - public void Example_DocumentClassifierDetails_GetClassifiers_ShortVersion() + public void Example_DocumentClassifierDetails_GetClassifiers_GetDocumentClassifiers() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); @@ -1349,9 +641,9 @@ public void Example_DocumentClassifierDetails_GetClassifiers_ShortVersion() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DocumentClassifierDetails_GetClassifiers_ShortVersion_Async() + public async Task Example_DocumentClassifierDetails_GetClassifiers_GetDocumentClassifiers_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); @@ -1367,770 +659,166 @@ public async Task Example_DocumentClassifierDetails_GetClassifiers_ShortVersion_ [Test] [Ignore("Only validating compilation of examples")] - public void Example_DocumentClassifierDetails_GetClassifiers_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - - foreach (DocumentClassifierDetails item in client.GetClassifiers()) - { - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DocumentClassifierDetails_GetClassifiers_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - - await foreach (DocumentClassifierDetails item in client.GetClassifiersAsync()) - { - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DocumentClassifierDetails_GetClassifiers_AllParameters() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - - foreach (BinaryData item in client.GetClassifiers(null)) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("classifierId").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); - Console.WriteLine(result.GetProperty("apiVersion").ToString()); - Console.WriteLine(result.GetProperty("baseClassifierId").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("sourceKind").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobSource").GetProperty("prefix").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobFileListSource").GetProperty("containerUrl").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobFileListSource").GetProperty("fileList").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("target").ToString()); - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DocumentClassifierDetails_GetClassifiers_AllParameters_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - - await foreach (BinaryData item in client.GetClassifiersAsync(null)) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("classifierId").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); - Console.WriteLine(result.GetProperty("apiVersion").ToString()); - Console.WriteLine(result.GetProperty("baseClassifierId").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("sourceKind").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobSource").GetProperty("prefix").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobFileListSource").GetProperty("containerUrl").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobFileListSource").GetProperty("fileList").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("target").ToString()); - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DocumentClassifierDetails_GetClassifiers_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - - foreach (DocumentClassifierDetails item in client.GetClassifiers()) - { - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DocumentClassifierDetails_GetClassifiers_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - - await foreach (DocumentClassifierDetails item in client.GetClassifiersAsync()) - { - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DocumentIntelligenceAdministrationClient_BuildDocumentModel_ShortVersion() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - modelId = "", - buildMode = "template", - }); - Operation operation = client.BuildDocumentModel(WaitUntil.Completed, content); - BinaryData responseData = operation.Value; - - JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("modelId").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DocumentIntelligenceAdministrationClient_BuildDocumentModel_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - modelId = "", - buildMode = "template", - }); - Operation operation = await client.BuildDocumentModelAsync(WaitUntil.Completed, content); - BinaryData responseData = operation.Value; - - JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("modelId").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DocumentIntelligenceAdministrationClient_BuildDocumentModel_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - - BuildDocumentModelContent buildRequest = new BuildDocumentModelContent("", DocumentBuildMode.Template); - Operation operation = client.BuildDocumentModel(WaitUntil.Completed, buildRequest); - DocumentModelDetails responseData = operation.Value; - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DocumentIntelligenceAdministrationClient_BuildDocumentModel_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - - BuildDocumentModelContent buildRequest = new BuildDocumentModelContent("", DocumentBuildMode.Template); - Operation operation = await client.BuildDocumentModelAsync(WaitUntil.Completed, buildRequest); - DocumentModelDetails responseData = operation.Value; - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DocumentIntelligenceAdministrationClient_BuildDocumentModel_AllParameters() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - modelId = "", - description = "", - buildMode = "template", - azureBlobSource = new - { - containerUrl = "http://localhost:3000", - prefix = "", - }, - azureBlobFileListSource = new - { - containerUrl = "http://localhost:3000", - fileList = "", - }, - tags = new - { - key = "", - }, - maxTrainingHours = 123.45F, - allowOverwrite = true, - }); - Operation operation = client.BuildDocumentModel(WaitUntil.Completed, content); - BinaryData responseData = operation.Value; - - JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("modelId").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); - Console.WriteLine(result.GetProperty("apiVersion").ToString()); - Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("buildMode").ToString()); - Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); - Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("prefix").ToString()); - Console.WriteLine(result.GetProperty("azureBlobFileListSource").GetProperty("containerUrl").ToString()); - Console.WriteLine(result.GetProperty("azureBlobFileListSource").GetProperty("fileList").ToString()); - Console.WriteLine(result.GetProperty("classifierId").ToString()); - Console.WriteLine(result.GetProperty("split").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("buildMode").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("example").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("example").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("example").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("items").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("items").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("items").GetProperty("example").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldConfidence").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("modelId").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("confidenceThreshold").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("features")[0].ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("queryFields")[0].ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("maxDocumentsToAnalyze").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("trainingHours").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DocumentIntelligenceAdministrationClient_BuildDocumentModel_AllParameters_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - modelId = "", - description = "", - buildMode = "template", - azureBlobSource = new - { - containerUrl = "http://localhost:3000", - prefix = "", - }, - azureBlobFileListSource = new - { - containerUrl = "http://localhost:3000", - fileList = "", - }, - tags = new - { - key = "", - }, - maxTrainingHours = 123.45F, - allowOverwrite = true, - }); - Operation operation = await client.BuildDocumentModelAsync(WaitUntil.Completed, content); - BinaryData responseData = operation.Value; - - JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("modelId").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); - Console.WriteLine(result.GetProperty("apiVersion").ToString()); - Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("buildMode").ToString()); - Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); - Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("prefix").ToString()); - Console.WriteLine(result.GetProperty("azureBlobFileListSource").GetProperty("containerUrl").ToString()); - Console.WriteLine(result.GetProperty("azureBlobFileListSource").GetProperty("fileList").ToString()); - Console.WriteLine(result.GetProperty("classifierId").ToString()); - Console.WriteLine(result.GetProperty("split").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("buildMode").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("example").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("example").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("example").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("items").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("items").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("items").GetProperty("example").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldConfidence").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("modelId").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("confidenceThreshold").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("features")[0].ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("queryFields")[0].ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("maxDocumentsToAnalyze").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("trainingHours").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DocumentIntelligenceAdministrationClient_BuildDocumentModel_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - - BuildDocumentModelContent buildRequest = new BuildDocumentModelContent("", DocumentBuildMode.Template) - { - Description = "", - AzureBlobSource = new AzureBlobContentSource(new Uri("http://localhost:3000")) - { - Prefix = "", - }, - AzureBlobFileListSource = new AzureBlobFileListContentSource(new Uri("http://localhost:3000"), ""), - Tags = -{ -["key"] = "" -}, - MaxTrainingHours = 123.45F, - AllowOverwrite = true, - }; - Operation operation = client.BuildDocumentModel(WaitUntil.Completed, buildRequest); - DocumentModelDetails responseData = operation.Value; - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DocumentIntelligenceAdministrationClient_BuildDocumentModel_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - - BuildDocumentModelContent buildRequest = new BuildDocumentModelContent("", DocumentBuildMode.Template) - { - Description = "", - AzureBlobSource = new AzureBlobContentSource(new Uri("http://localhost:3000")) - { - Prefix = "", - }, - AzureBlobFileListSource = new AzureBlobFileListContentSource(new Uri("http://localhost:3000"), ""), - Tags = -{ -["key"] = "" -}, - MaxTrainingHours = 123.45F, - AllowOverwrite = true, - }; - Operation operation = await client.BuildDocumentModelAsync(WaitUntil.Completed, buildRequest); - DocumentModelDetails responseData = operation.Value; - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DocumentIntelligenceAdministrationClient_ComposeModel_ShortVersion() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - modelId = "", - classifierId = "", - docTypes = new - { - key = new object(), - }, - }); - Operation operation = client.ComposeModel(WaitUntil.Completed, content); - BinaryData responseData = operation.Value; - - JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("modelId").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DocumentIntelligenceAdministrationClient_ComposeModel_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - modelId = "", - classifierId = "", - docTypes = new - { - key = new object(), - }, - }); - Operation operation = await client.ComposeModelAsync(WaitUntil.Completed, content); - BinaryData responseData = operation.Value; - - JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("modelId").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DocumentIntelligenceAdministrationClient_ComposeModel_ShortVersion_Convenience() + public void Example_DocumentClassifierDetails_GetClassifiers_GetDocumentClassifiers_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - ComposeDocumentModelContent composeRequest = new ComposeDocumentModelContent("", "", new Dictionary + foreach (DocumentClassifierDetails item in client.GetClassifiers()) { - ["key"] = new DocumentTypeDetails() - }); - Operation operation = client.ComposeModel(WaitUntil.Completed, composeRequest); - DocumentModelDetails responseData = operation.Value; + } } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DocumentIntelligenceAdministrationClient_ComposeModel_ShortVersion_Convenience_Async() + public async Task Example_DocumentClassifierDetails_GetClassifiers_GetDocumentClassifiers_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - ComposeDocumentModelContent composeRequest = new ComposeDocumentModelContent("", "", new Dictionary + await foreach (DocumentClassifierDetails item in client.GetClassifiersAsync()) { - ["key"] = new DocumentTypeDetails() - }); - Operation operation = await client.ComposeModelAsync(WaitUntil.Completed, composeRequest); - DocumentModelDetails responseData = operation.Value; + } } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DocumentIntelligenceAdministrationClient_ComposeModel_AllParameters() + public void Example_DocumentIntelligenceAdministrationClient_BuildDocumentModel_BuildDocumentModel() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - modelId = "", - description = "", - classifierId = "", - split = "auto", - docTypes = new + modelId = "myCustomModel", + description = "Custom model description", + buildMode = "template", + azureBlobSource = new { - key = new - { - description = "", - buildMode = "template", - fieldSchema = new - { - key = new - { - type = "string", - description = "", - example = "", - properties = new { }, - }, - }, - fieldConfidence = new - { - key = 123.45F, - }, - modelId = "", - confidenceThreshold = 123.45F, - features = new object[] - { -"ocrHighResolution" - }, - queryFields = new object[] - { -"" - }, - maxDocumentsToAnalyze = 1234, - }, + containerUrl = "https://myStorageAccount.blob.core.windows.net/myContainer?mySasToken", + prefix = "trainingDocs/", }, tags = new { - key = "", + createdBy = "myUserId", }, }); - Operation operation = client.ComposeModel(WaitUntil.Completed, content); + Operation operation = client.BuildDocumentModel(WaitUntil.Completed, content); BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("modelId").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); - Console.WriteLine(result.GetProperty("apiVersion").ToString()); - Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("buildMode").ToString()); - Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); - Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("prefix").ToString()); - Console.WriteLine(result.GetProperty("azureBlobFileListSource").GetProperty("containerUrl").ToString()); - Console.WriteLine(result.GetProperty("azureBlobFileListSource").GetProperty("fileList").ToString()); - Console.WriteLine(result.GetProperty("classifierId").ToString()); - Console.WriteLine(result.GetProperty("split").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("buildMode").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("example").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("example").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("example").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("items").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("items").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("items").GetProperty("example").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldConfidence").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("modelId").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("confidenceThreshold").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("features")[0].ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("queryFields")[0].ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("maxDocumentsToAnalyze").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("trainingHours").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DocumentIntelligenceAdministrationClient_ComposeModel_AllParameters_Async() + public async Task Example_DocumentIntelligenceAdministrationClient_BuildDocumentModel_BuildDocumentModel_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - modelId = "", - description = "", - classifierId = "", - split = "auto", - docTypes = new + modelId = "myCustomModel", + description = "Custom model description", + buildMode = "template", + azureBlobSource = new { - key = new - { - description = "", - buildMode = "template", - fieldSchema = new - { - key = new - { - type = "string", - description = "", - example = "", - properties = new { }, - }, - }, - fieldConfidence = new - { - key = 123.45F, - }, - modelId = "", - confidenceThreshold = 123.45F, - features = new object[] - { -"ocrHighResolution" - }, - queryFields = new object[] - { -"" - }, - maxDocumentsToAnalyze = 1234, - }, + containerUrl = "https://myStorageAccount.blob.core.windows.net/myContainer?mySasToken", + prefix = "trainingDocs/", }, tags = new { - key = "", + createdBy = "myUserId", }, }); - Operation operation = await client.ComposeModelAsync(WaitUntil.Completed, content); + Operation operation = await client.BuildDocumentModelAsync(WaitUntil.Completed, content); BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("modelId").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); - Console.WriteLine(result.GetProperty("apiVersion").ToString()); - Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("buildMode").ToString()); - Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); - Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("prefix").ToString()); - Console.WriteLine(result.GetProperty("azureBlobFileListSource").GetProperty("containerUrl").ToString()); - Console.WriteLine(result.GetProperty("azureBlobFileListSource").GetProperty("fileList").ToString()); - Console.WriteLine(result.GetProperty("classifierId").ToString()); - Console.WriteLine(result.GetProperty("split").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("buildMode").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("example").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("example").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("example").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("items").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("items").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("items").GetProperty("example").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldConfidence").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("modelId").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("confidenceThreshold").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("features")[0].ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("queryFields")[0].ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("maxDocumentsToAnalyze").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("trainingHours").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DocumentIntelligenceAdministrationClient_ComposeModel_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - - ComposeDocumentModelContent composeRequest = new ComposeDocumentModelContent("", "", new Dictionary + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_DocumentIntelligenceAdministrationClient_BuildDocumentModel_BuildDocumentModel_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); + + BuildDocumentModelContent buildRequest = new BuildDocumentModelContent("myCustomModel", DocumentBuildMode.Template) { - ["key"] = new DocumentTypeDetails + Description = "Custom model description", + AzureBlobSource = new AzureBlobContentSource(new Uri("https://myStorageAccount.blob.core.windows.net/myContainer?mySasToken")) { - Description = "", - BuildMode = DocumentBuildMode.Template, - FieldSchema = -{ -["key"] = new DocumentFieldSchema(DocumentFieldType.String) -{ -Description = "", -Example = "", -Items = default, -Properties = -{ -["key"] = default -}, -} -}, - FieldConfidence = -{ -["key"] = 123.45F -}, - ModelId = "", - ConfidenceThreshold = 123.45F, - Features = { DocumentAnalysisFeature.OcrHighResolution }, - QueryFields = { "" }, - MaxDocumentsToAnalyze = 1234, - } - }) - { - Description = "", - Split = SplitMode.Auto, + Prefix = "trainingDocs/", + }, Tags = { -["key"] = "" +["createdBy"] = "myUserId" }, }; - Operation operation = client.ComposeModel(WaitUntil.Completed, composeRequest); + Operation operation = client.BuildDocumentModel(WaitUntil.Completed, buildRequest); DocumentModelDetails responseData = operation.Value; } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DocumentIntelligenceAdministrationClient_ComposeModel_AllParameters_Convenience_Async() + public async Task Example_DocumentIntelligenceAdministrationClient_BuildDocumentModel_BuildDocumentModel_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - ComposeDocumentModelContent composeRequest = new ComposeDocumentModelContent("", "", new Dictionary + BuildDocumentModelContent buildRequest = new BuildDocumentModelContent("myCustomModel", DocumentBuildMode.Template) { - ["key"] = new DocumentTypeDetails + Description = "Custom model description", + AzureBlobSource = new AzureBlobContentSource(new Uri("https://myStorageAccount.blob.core.windows.net/myContainer?mySasToken")) { - Description = "", - BuildMode = DocumentBuildMode.Template, - FieldSchema = -{ -["key"] = new DocumentFieldSchema(DocumentFieldType.String) -{ -Description = "", -Example = "", -Items = default, -Properties = -{ -["key"] = default -}, -} -}, - FieldConfidence = -{ -["key"] = 123.45F -}, - ModelId = "", - ConfidenceThreshold = 123.45F, - Features = { DocumentAnalysisFeature.OcrHighResolution }, - QueryFields = { "" }, - MaxDocumentsToAnalyze = 1234, - } - }) - { - Description = "", - Split = SplitMode.Auto, + Prefix = "trainingDocs/", + }, Tags = { -["key"] = "" +["createdBy"] = "myUserId" }, }; - Operation operation = await client.ComposeModelAsync(WaitUntil.Completed, composeRequest); + Operation operation = await client.BuildDocumentModelAsync(WaitUntil.Completed, buildRequest); DocumentModelDetails responseData = operation.Value; } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DocumentIntelligenceAdministrationClient_CopyModelTo_ShortVersion() + public void Example_DocumentIntelligenceAdministrationClient_ComposeModel_ComposeDocumentModel() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - targetResourceId = "", - targetResourceRegion = "", - targetModelId = "", - targetModelLocation = "http://localhost:3000", - accessToken = "", - expirationDateTime = "2022-05-10T18:57:31.2311892Z", + modelId = "composedModel", + description = "Composed model description", + classifierId = "customClassifier", + docTypes = new + { + formA = new + { + modelId = "model1", + }, + formB = new + { + modelId = "model2", + }, + }, }); - Operation operation = client.CopyModelTo(WaitUntil.Completed, "", content); + Operation operation = client.ComposeModel(WaitUntil.Completed, content); BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; @@ -2140,22 +828,30 @@ public void Example_DocumentIntelligenceAdministrationClient_CopyModelTo_ShortVe [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DocumentIntelligenceAdministrationClient_CopyModelTo_ShortVersion_Async() + public async Task Example_DocumentIntelligenceAdministrationClient_ComposeModel_ComposeDocumentModel_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - targetResourceId = "", - targetResourceRegion = "", - targetModelId = "", - targetModelLocation = "http://localhost:3000", - accessToken = "", - expirationDateTime = "2022-05-10T18:57:31.2311892Z", + modelId = "composedModel", + description = "Composed model description", + classifierId = "customClassifier", + docTypes = new + { + formA = new + { + modelId = "model1", + }, + formB = new + { + modelId = "model2", + }, + }, }); - Operation operation = await client.CopyModelToAsync(WaitUntil.Completed, "", content); + Operation operation = await client.ComposeModelAsync(WaitUntil.Completed, content); BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; @@ -2165,412 +861,252 @@ public async Task Example_DocumentIntelligenceAdministrationClient_CopyModelTo_S [Test] [Ignore("Only validating compilation of examples")] - public void Example_DocumentIntelligenceAdministrationClient_CopyModelTo_ShortVersion_Convenience() + public void Example_DocumentIntelligenceAdministrationClient_ComposeModel_ComposeDocumentModel_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - CopyAuthorization copyToRequest = new CopyAuthorization( - "", - "", - "", - new Uri("http://localhost:3000"), - "", - DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); - Operation operation = client.CopyModelTo(WaitUntil.Completed, "", copyToRequest); + ComposeDocumentModelContent composeRequest = new ComposeDocumentModelContent("composedModel", "customClassifier", new Dictionary + { + ["formA"] = new DocumentTypeDetails + { + ModelId = "model1", + }, + ["formB"] = new DocumentTypeDetails + { + ModelId = "model2", + } + }) + { + Description = "Composed model description", + }; + Operation operation = client.ComposeModel(WaitUntil.Completed, composeRequest); DocumentModelDetails responseData = operation.Value; } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DocumentIntelligenceAdministrationClient_CopyModelTo_ShortVersion_Convenience_Async() + public async Task Example_DocumentIntelligenceAdministrationClient_ComposeModel_ComposeDocumentModel_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - CopyAuthorization copyToRequest = new CopyAuthorization( - "", - "", - "", - new Uri("http://localhost:3000"), - "", - DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); - Operation operation = await client.CopyModelToAsync(WaitUntil.Completed, "", copyToRequest); + ComposeDocumentModelContent composeRequest = new ComposeDocumentModelContent("composedModel", "customClassifier", new Dictionary + { + ["formA"] = new DocumentTypeDetails + { + ModelId = "model1", + }, + ["formB"] = new DocumentTypeDetails + { + ModelId = "model2", + } + }) + { + Description = "Composed model description", + }; + Operation operation = await client.ComposeModelAsync(WaitUntil.Completed, composeRequest); DocumentModelDetails responseData = operation.Value; } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DocumentIntelligenceAdministrationClient_CopyModelTo_AllParameters() + public void Example_DocumentIntelligenceAdministrationClient_CopyModelTo_CopyDocumentModelTo() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - targetResourceId = "", - targetResourceRegion = "", - targetModelId = "", - targetModelLocation = "http://localhost:3000", - accessToken = "", - expirationDateTime = "2022-05-10T18:57:31.2311892Z", + targetResourceId = "/subscriptions/targetSub/resourceGroups/targetRG/providers/Microsoft.CognitiveServices/accounts/targetService", + targetResourceRegion = "targetResourceRegion", + targetModelId = "targetModel", + targetModelLocation = "https://targetEndpoint.cognitiveservices.azure.com/documentintelligence/documentModels/targetModel", + accessToken = "accessToken", + expirationDateTime = "2021-09-23T09:12:54.552Z", }); - Operation operation = client.CopyModelTo(WaitUntil.Completed, "", content); + Operation operation = client.CopyModelTo(WaitUntil.Completed, "sourceModel", content); BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("modelId").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); - Console.WriteLine(result.GetProperty("apiVersion").ToString()); - Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("buildMode").ToString()); - Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); - Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("prefix").ToString()); - Console.WriteLine(result.GetProperty("azureBlobFileListSource").GetProperty("containerUrl").ToString()); - Console.WriteLine(result.GetProperty("azureBlobFileListSource").GetProperty("fileList").ToString()); - Console.WriteLine(result.GetProperty("classifierId").ToString()); - Console.WriteLine(result.GetProperty("split").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("buildMode").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("example").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("example").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("example").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("items").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("items").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("items").GetProperty("example").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldConfidence").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("modelId").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("confidenceThreshold").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("features")[0].ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("queryFields")[0].ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("maxDocumentsToAnalyze").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("trainingHours").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DocumentIntelligenceAdministrationClient_CopyModelTo_AllParameters_Async() + public async Task Example_DocumentIntelligenceAdministrationClient_CopyModelTo_CopyDocumentModelTo_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - targetResourceId = "", - targetResourceRegion = "", - targetModelId = "", - targetModelLocation = "http://localhost:3000", - accessToken = "", - expirationDateTime = "2022-05-10T18:57:31.2311892Z", + targetResourceId = "/subscriptions/targetSub/resourceGroups/targetRG/providers/Microsoft.CognitiveServices/accounts/targetService", + targetResourceRegion = "targetResourceRegion", + targetModelId = "targetModel", + targetModelLocation = "https://targetEndpoint.cognitiveservices.azure.com/documentintelligence/documentModels/targetModel", + accessToken = "accessToken", + expirationDateTime = "2021-09-23T09:12:54.552Z", }); - Operation operation = await client.CopyModelToAsync(WaitUntil.Completed, "", content); + Operation operation = await client.CopyModelToAsync(WaitUntil.Completed, "sourceModel", content); BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("modelId").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); - Console.WriteLine(result.GetProperty("apiVersion").ToString()); - Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("buildMode").ToString()); - Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); - Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("prefix").ToString()); - Console.WriteLine(result.GetProperty("azureBlobFileListSource").GetProperty("containerUrl").ToString()); - Console.WriteLine(result.GetProperty("azureBlobFileListSource").GetProperty("fileList").ToString()); - Console.WriteLine(result.GetProperty("classifierId").ToString()); - Console.WriteLine(result.GetProperty("split").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("buildMode").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("example").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("example").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("example").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("items").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("items").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("properties").GetProperty("").GetProperty("items").GetProperty("example").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldConfidence").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("modelId").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("confidenceThreshold").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("features")[0].ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("queryFields")[0].ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("maxDocumentsToAnalyze").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("trainingHours").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DocumentIntelligenceAdministrationClient_CopyModelTo_AllParameters_Convenience() + public void Example_DocumentIntelligenceAdministrationClient_CopyModelTo_CopyDocumentModelTo_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); CopyAuthorization copyToRequest = new CopyAuthorization( - "", - "", - "", - new Uri("http://localhost:3000"), - "", - DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); - Operation operation = client.CopyModelTo(WaitUntil.Completed, "", copyToRequest); + "/subscriptions/targetSub/resourceGroups/targetRG/providers/Microsoft.CognitiveServices/accounts/targetService", + "targetResourceRegion", + "targetModel", + new Uri("https://targetEndpoint.cognitiveservices.azure.com/documentintelligence/documentModels/targetModel"), + "accessToken", + DateTimeOffset.Parse("2021-09-23T09:12:54.552Z")); + Operation operation = client.CopyModelTo(WaitUntil.Completed, "sourceModel", copyToRequest); DocumentModelDetails responseData = operation.Value; } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DocumentIntelligenceAdministrationClient_CopyModelTo_AllParameters_Convenience_Async() + public async Task Example_DocumentIntelligenceAdministrationClient_CopyModelTo_CopyDocumentModelTo_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); CopyAuthorization copyToRequest = new CopyAuthorization( - "", - "", - "", - new Uri("http://localhost:3000"), - "", - DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); - Operation operation = await client.CopyModelToAsync(WaitUntil.Completed, "", copyToRequest); + "/subscriptions/targetSub/resourceGroups/targetRG/providers/Microsoft.CognitiveServices/accounts/targetService", + "targetResourceRegion", + "targetModel", + new Uri("https://targetEndpoint.cognitiveservices.azure.com/documentintelligence/documentModels/targetModel"), + "accessToken", + DateTimeOffset.Parse("2021-09-23T09:12:54.552Z")); + Operation operation = await client.CopyModelToAsync(WaitUntil.Completed, "sourceModel", copyToRequest); DocumentModelDetails responseData = operation.Value; } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DocumentIntelligenceAdministrationClient_BuildClassifier_ShortVersion() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - classifierId = "", - docTypes = new - { - key = new object(), - }, - }); - Operation operation = client.BuildClassifier(WaitUntil.Completed, content); - BinaryData responseData = operation.Value; - - JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("classifierId").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("apiVersion").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DocumentIntelligenceAdministrationClient_BuildClassifier_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - classifierId = "", - docTypes = new - { - key = new object(), - }, - }); - Operation operation = await client.BuildClassifierAsync(WaitUntil.Completed, content); - BinaryData responseData = operation.Value; - - JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("classifierId").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("apiVersion").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DocumentIntelligenceAdministrationClient_BuildClassifier_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - - BuildDocumentClassifierContent buildRequest = new BuildDocumentClassifierContent("", new Dictionary - { - ["key"] = new ClassifierDocumentTypeDetails() - }); - Operation operation = client.BuildClassifier(WaitUntil.Completed, buildRequest); - DocumentClassifierDetails responseData = operation.Value; - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DocumentIntelligenceAdministrationClient_BuildClassifier_ShortVersion_Convenience_Async() + public void Example_DocumentIntelligenceAdministrationClient_BuildClassifier_BuildDocumentClassifier() { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - - BuildDocumentClassifierContent buildRequest = new BuildDocumentClassifierContent("", new Dictionary - { - ["key"] = new ClassifierDocumentTypeDetails() - }); - Operation operation = await client.BuildClassifierAsync(WaitUntil.Completed, buildRequest); - DocumentClassifierDetails responseData = operation.Value; - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DocumentIntelligenceAdministrationClient_BuildClassifier_AllParameters() - { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - classifierId = "", - description = "", - baseClassifierId = "", + classifierId = "myClassifier", + description = "Classifier description", docTypes = new { - key = new + formA = new { - sourceKind = "url", azureBlobSource = new { - containerUrl = "http://localhost:3000", - prefix = "", + containerUrl = "https://myStorageAccount.blob.core.windows.net/myContainer?mySasToken", + prefix = "formADocs/", }, + }, + formB = new + { azureBlobFileListSource = new { - containerUrl = "http://localhost:3000", - fileList = "", + containerUrl = "https://myStorageAccount.blob.core.windows.net/myContainer?mySasToken", + fileList = "formB.jsonl", }, }, }, - allowOverwrite = true, }); Operation operation = client.BuildClassifier(WaitUntil.Completed, content); BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("classifierId").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); Console.WriteLine(result.GetProperty("apiVersion").ToString()); - Console.WriteLine(result.GetProperty("baseClassifierId").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("sourceKind").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobSource").GetProperty("prefix").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobFileListSource").GetProperty("containerUrl").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobFileListSource").GetProperty("fileList").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DocumentIntelligenceAdministrationClient_BuildClassifier_AllParameters_Async() + public async Task Example_DocumentIntelligenceAdministrationClient_BuildClassifier_BuildDocumentClassifier_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - classifierId = "", - description = "", - baseClassifierId = "", + classifierId = "myClassifier", + description = "Classifier description", docTypes = new { - key = new + formA = new { - sourceKind = "url", azureBlobSource = new { - containerUrl = "http://localhost:3000", - prefix = "", + containerUrl = "https://myStorageAccount.blob.core.windows.net/myContainer?mySasToken", + prefix = "formADocs/", }, + }, + formB = new + { azureBlobFileListSource = new { - containerUrl = "http://localhost:3000", - fileList = "", + containerUrl = "https://myStorageAccount.blob.core.windows.net/myContainer?mySasToken", + fileList = "formB.jsonl", }, }, }, - allowOverwrite = true, }); Operation operation = await client.BuildClassifierAsync(WaitUntil.Completed, content); BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("classifierId").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); Console.WriteLine(result.GetProperty("apiVersion").ToString()); - Console.WriteLine(result.GetProperty("baseClassifierId").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("sourceKind").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobSource").GetProperty("prefix").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobFileListSource").GetProperty("containerUrl").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobFileListSource").GetProperty("fileList").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DocumentIntelligenceAdministrationClient_BuildClassifier_AllParameters_Convenience() + public void Example_DocumentIntelligenceAdministrationClient_BuildClassifier_BuildDocumentClassifier_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - BuildDocumentClassifierContent buildRequest = new BuildDocumentClassifierContent("", new Dictionary + BuildDocumentClassifierContent buildRequest = new BuildDocumentClassifierContent("myClassifier", new Dictionary { - ["key"] = new ClassifierDocumentTypeDetails + ["formA"] = new ClassifierDocumentTypeDetails { - SourceKind = ContentSourceKind.Url, - AzureBlobSource = new AzureBlobContentSource(new Uri("http://localhost:3000")) + AzureBlobSource = new AzureBlobContentSource(new Uri("https://myStorageAccount.blob.core.windows.net/myContainer?mySasToken")) { - Prefix = "", + Prefix = "formADocs/", }, - AzureBlobFileListSource = new AzureBlobFileListContentSource(new Uri("http://localhost:3000"), ""), + }, + ["formB"] = new ClassifierDocumentTypeDetails + { + AzureBlobFileListSource = new AzureBlobFileListContentSource(new Uri("https://myStorageAccount.blob.core.windows.net/myContainer?mySasToken"), "formB.jsonl"), } }) { - Description = "", - BaseClassifierId = "", - AllowOverwrite = true, + Description = "Classifier description", }; Operation operation = client.BuildClassifier(WaitUntil.Completed, buildRequest); DocumentClassifierDetails responseData = operation.Value; @@ -2578,28 +1114,28 @@ public void Example_DocumentIntelligenceAdministrationClient_BuildClassifier_All [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DocumentIntelligenceAdministrationClient_BuildClassifier_AllParameters_Convenience_Async() + public async Task Example_DocumentIntelligenceAdministrationClient_BuildClassifier_BuildDocumentClassifier_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - BuildDocumentClassifierContent buildRequest = new BuildDocumentClassifierContent("", new Dictionary + BuildDocumentClassifierContent buildRequest = new BuildDocumentClassifierContent("myClassifier", new Dictionary { - ["key"] = new ClassifierDocumentTypeDetails + ["formA"] = new ClassifierDocumentTypeDetails { - SourceKind = ContentSourceKind.Url, - AzureBlobSource = new AzureBlobContentSource(new Uri("http://localhost:3000")) + AzureBlobSource = new AzureBlobContentSource(new Uri("https://myStorageAccount.blob.core.windows.net/myContainer?mySasToken")) { - Prefix = "", + Prefix = "formADocs/", }, - AzureBlobFileListSource = new AzureBlobFileListContentSource(new Uri("http://localhost:3000"), ""), + }, + ["formB"] = new ClassifierDocumentTypeDetails + { + AzureBlobFileListSource = new AzureBlobFileListContentSource(new Uri("https://myStorageAccount.blob.core.windows.net/myContainer?mySasToken"), "formB.jsonl"), } }) { - Description = "", - BaseClassifierId = "", - AllowOverwrite = true, + Description = "Classifier description", }; Operation operation = await client.BuildClassifierAsync(WaitUntil.Completed, buildRequest); DocumentClassifierDetails responseData = operation.Value; @@ -2607,22 +1143,22 @@ public async Task Example_DocumentIntelligenceAdministrationClient_BuildClassifi [Test] [Ignore("Only validating compilation of examples")] - public void Example_DocumentIntelligenceAdministrationClient_CopyClassifierTo_ShortVersion() + public void Example_DocumentIntelligenceAdministrationClient_CopyClassifierTo_CopyDocumentClassifierTo() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - targetResourceId = "", - targetResourceRegion = "", - targetClassifierId = "", - targetClassifierLocation = "http://localhost:3000", - accessToken = "", - expirationDateTime = "2022-05-10T18:57:31.2311892Z", + targetResourceId = "/subscriptions/targetSub/resourceGroups/targetRG/providers/Microsoft.CognitiveServices/accounts/targetService", + targetResourceRegion = "targetResourceRegion", + targetClassifierId = "targetClassifier", + targetClassifierLocation = "https://targetEndpoint.cognitiveservices.azure.com/documentintelligence/documentClassifiers/targetClassifier", + accessToken = "accessToken", + expirationDateTime = "2021-09-23T09:12:54.552Z", }); - Operation operation = client.CopyClassifierTo(WaitUntil.Completed, "", content); + Operation operation = client.CopyClassifierTo(WaitUntil.Completed, "sourceClassifier", content); BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; @@ -2634,22 +1170,22 @@ public void Example_DocumentIntelligenceAdministrationClient_CopyClassifierTo_Sh [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DocumentIntelligenceAdministrationClient_CopyClassifierTo_ShortVersion_Async() + public async Task Example_DocumentIntelligenceAdministrationClient_CopyClassifierTo_CopyDocumentClassifierTo_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - targetResourceId = "", - targetResourceRegion = "", - targetClassifierId = "", - targetClassifierLocation = "http://localhost:3000", - accessToken = "", - expirationDateTime = "2022-05-10T18:57:31.2311892Z", + targetResourceId = "/subscriptions/targetSub/resourceGroups/targetRG/providers/Microsoft.CognitiveServices/accounts/targetService", + targetResourceRegion = "targetResourceRegion", + targetClassifierId = "targetClassifier", + targetClassifierLocation = "https://targetEndpoint.cognitiveservices.azure.com/documentintelligence/documentClassifiers/targetClassifier", + accessToken = "accessToken", + expirationDateTime = "2021-09-23T09:12:54.552Z", }); - Operation operation = await client.CopyClassifierToAsync(WaitUntil.Completed, "", content); + Operation operation = await client.CopyClassifierToAsync(WaitUntil.Completed, "sourceClassifier", content); BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; @@ -2661,151 +1197,39 @@ public async Task Example_DocumentIntelligenceAdministrationClient_CopyClassifie [Test] [Ignore("Only validating compilation of examples")] - public void Example_DocumentIntelligenceAdministrationClient_CopyClassifierTo_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - - ClassifierCopyAuthorization copyToRequest = new ClassifierCopyAuthorization( - "", - "", - "", - new Uri("http://localhost:3000"), - "", - DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); - Operation operation = client.CopyClassifierTo(WaitUntil.Completed, "", copyToRequest); - DocumentClassifierDetails responseData = operation.Value; - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DocumentIntelligenceAdministrationClient_CopyClassifierTo_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - - ClassifierCopyAuthorization copyToRequest = new ClassifierCopyAuthorization( - "", - "", - "", - new Uri("http://localhost:3000"), - "", - DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); - Operation operation = await client.CopyClassifierToAsync(WaitUntil.Completed, "", copyToRequest); - DocumentClassifierDetails responseData = operation.Value; - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DocumentIntelligenceAdministrationClient_CopyClassifierTo_AllParameters() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - targetResourceId = "", - targetResourceRegion = "", - targetClassifierId = "", - targetClassifierLocation = "http://localhost:3000", - accessToken = "", - expirationDateTime = "2022-05-10T18:57:31.2311892Z", - }); - Operation operation = client.CopyClassifierTo(WaitUntil.Completed, "", content); - BinaryData responseData = operation.Value; - - JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("classifierId").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); - Console.WriteLine(result.GetProperty("apiVersion").ToString()); - Console.WriteLine(result.GetProperty("baseClassifierId").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("sourceKind").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobSource").GetProperty("prefix").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobFileListSource").GetProperty("containerUrl").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobFileListSource").GetProperty("fileList").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("target").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DocumentIntelligenceAdministrationClient_CopyClassifierTo_AllParameters_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - targetResourceId = "", - targetResourceRegion = "", - targetClassifierId = "", - targetClassifierLocation = "http://localhost:3000", - accessToken = "", - expirationDateTime = "2022-05-10T18:57:31.2311892Z", - }); - Operation operation = await client.CopyClassifierToAsync(WaitUntil.Completed, "", content); - BinaryData responseData = operation.Value; - - JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("classifierId").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); - Console.WriteLine(result.GetProperty("apiVersion").ToString()); - Console.WriteLine(result.GetProperty("baseClassifierId").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("sourceKind").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobSource").GetProperty("prefix").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobFileListSource").GetProperty("containerUrl").ToString()); - Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobFileListSource").GetProperty("fileList").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("target").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DocumentIntelligenceAdministrationClient_CopyClassifierTo_AllParameters_Convenience() + public void Example_DocumentIntelligenceAdministrationClient_CopyClassifierTo_CopyDocumentClassifierTo_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); ClassifierCopyAuthorization copyToRequest = new ClassifierCopyAuthorization( - "", - "", - "", - new Uri("http://localhost:3000"), - "", - DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); - Operation operation = client.CopyClassifierTo(WaitUntil.Completed, "", copyToRequest); + "/subscriptions/targetSub/resourceGroups/targetRG/providers/Microsoft.CognitiveServices/accounts/targetService", + "targetResourceRegion", + "targetClassifier", + new Uri("https://targetEndpoint.cognitiveservices.azure.com/documentintelligence/documentClassifiers/targetClassifier"), + "accessToken", + DateTimeOffset.Parse("2021-09-23T09:12:54.552Z")); + Operation operation = client.CopyClassifierTo(WaitUntil.Completed, "sourceClassifier", copyToRequest); DocumentClassifierDetails responseData = operation.Value; } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DocumentIntelligenceAdministrationClient_CopyClassifierTo_AllParameters_Convenience_Async() + public async Task Example_DocumentIntelligenceAdministrationClient_CopyClassifierTo_CopyDocumentClassifierTo_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential); ClassifierCopyAuthorization copyToRequest = new ClassifierCopyAuthorization( - "", - "", - "", - new Uri("http://localhost:3000"), - "", - DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); - Operation operation = await client.CopyClassifierToAsync(WaitUntil.Completed, "", copyToRequest); + "/subscriptions/targetSub/resourceGroups/targetRG/providers/Microsoft.CognitiveServices/accounts/targetService", + "targetResourceRegion", + "targetClassifier", + new Uri("https://targetEndpoint.cognitiveservices.azure.com/documentintelligence/documentClassifiers/targetClassifier"), + "accessToken", + DateTimeOffset.Parse("2021-09-23T09:12:54.552Z")); + Operation operation = await client.CopyClassifierToAsync(WaitUntil.Completed, "sourceClassifier", copyToRequest); DocumentClassifierDetails responseData = operation.Value; } } diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Generated/Samples/Samples_DocumentIntelligenceClient.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Generated/Samples/Samples_DocumentIntelligenceClient.cs index 66b3634bdabc..bc3756b82309 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Generated/Samples/Samples_DocumentIntelligenceClient.cs +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Generated/Samples/Samples_DocumentIntelligenceClient.cs @@ -18,13 +18,13 @@ public partial class Samples_DocumentIntelligenceClient { [Test] [Ignore("Only validating compilation of examples")] - public void Example_DocumentIntelligenceClient_GetAnalyzeResultPdf_ShortVersion() + public void Example_DocumentIntelligenceClient_GetAnalyzeResultPdf_GetAnalyzeDocumentResultPDF() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); - Response response = client.GetAnalyzeResultPdf("", Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), null); + Response response = client.GetAnalyzeResultPdf("prebuilt-invoice", Guid.Parse("3b31320d-8bab-4f88-b19c-2322a7f11034"), null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -32,13 +32,13 @@ public void Example_DocumentIntelligenceClient_GetAnalyzeResultPdf_ShortVersion( [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DocumentIntelligenceClient_GetAnalyzeResultPdf_ShortVersion_Async() + public async Task Example_DocumentIntelligenceClient_GetAnalyzeResultPdf_GetAnalyzeDocumentResultPDF_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); - Response response = await client.GetAnalyzeResultPdfAsync("", Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), null); + Response response = await client.GetAnalyzeResultPdfAsync("prebuilt-invoice", Guid.Parse("3b31320d-8bab-4f88-b19c-2322a7f11034"), null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -46,35 +46,35 @@ public async Task Example_DocumentIntelligenceClient_GetAnalyzeResultPdf_ShortVe [Test] [Ignore("Only validating compilation of examples")] - public void Example_DocumentIntelligenceClient_GetAnalyzeResultPdf_ShortVersion_Convenience() + public void Example_DocumentIntelligenceClient_GetAnalyzeResultPdf_GetAnalyzeDocumentResultPDF_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); - Response response = client.GetAnalyzeResultPdf("", Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); + Response response = client.GetAnalyzeResultPdf("prebuilt-invoice", Guid.Parse("3b31320d-8bab-4f88-b19c-2322a7f11034")); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DocumentIntelligenceClient_GetAnalyzeResultPdf_ShortVersion_Convenience_Async() + public async Task Example_DocumentIntelligenceClient_GetAnalyzeResultPdf_GetAnalyzeDocumentResultPDF_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); - Response response = await client.GetAnalyzeResultPdfAsync("", Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); + Response response = await client.GetAnalyzeResultPdfAsync("prebuilt-invoice", Guid.Parse("3b31320d-8bab-4f88-b19c-2322a7f11034")); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DocumentIntelligenceClient_GetAnalyzeResultPdf_AllParameters() + public void Example_DocumentIntelligenceClient_GetAnalyzeResultFigure_GetAnalyzeDocumentResultFigure() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); - Response response = client.GetAnalyzeResultPdf("", Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), null); + Response response = client.GetAnalyzeResultFigure("prebuilt-invoice", Guid.Parse("3b31320d-8bab-4f88-b19c-2322a7f11034"), "1.0", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -82,13 +82,13 @@ public void Example_DocumentIntelligenceClient_GetAnalyzeResultPdf_AllParameters [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DocumentIntelligenceClient_GetAnalyzeResultPdf_AllParameters_Async() + public async Task Example_DocumentIntelligenceClient_GetAnalyzeResultFigure_GetAnalyzeDocumentResultFigure_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); - Response response = await client.GetAnalyzeResultPdfAsync("", Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), null); + Response response = await client.GetAnalyzeResultFigureAsync("prebuilt-invoice", Guid.Parse("3b31320d-8bab-4f88-b19c-2322a7f11034"), "1.0", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -96,136 +96,39 @@ public async Task Example_DocumentIntelligenceClient_GetAnalyzeResultPdf_AllPara [Test] [Ignore("Only validating compilation of examples")] - public void Example_DocumentIntelligenceClient_GetAnalyzeResultPdf_AllParameters_Convenience() + public void Example_DocumentIntelligenceClient_GetAnalyzeResultFigure_GetAnalyzeDocumentResultFigure_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); - Response response = client.GetAnalyzeResultPdf("", Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); + Response response = client.GetAnalyzeResultFigure("prebuilt-invoice", Guid.Parse("3b31320d-8bab-4f88-b19c-2322a7f11034"), "1.0"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DocumentIntelligenceClient_GetAnalyzeResultPdf_AllParameters_Convenience_Async() + public async Task Example_DocumentIntelligenceClient_GetAnalyzeResultFigure_GetAnalyzeDocumentResultFigure_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); - Response response = await client.GetAnalyzeResultPdfAsync("", Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); + Response response = await client.GetAnalyzeResultFigureAsync("prebuilt-invoice", Guid.Parse("3b31320d-8bab-4f88-b19c-2322a7f11034"), "1.0"); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DocumentIntelligenceClient_GetAnalyzeResultFigure_ShortVersion() + public void Example_DocumentIntelligenceClient_AnalyzeDocument_AnalyzeDocumentFromBase64() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); - Response response = client.GetAnalyzeResultFigure("", Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), "", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DocumentIntelligenceClient_GetAnalyzeResultFigure_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); - - Response response = await client.GetAnalyzeResultFigureAsync("", Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), "", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DocumentIntelligenceClient_GetAnalyzeResultFigure_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); - - Response response = client.GetAnalyzeResultFigure("", Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), ""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DocumentIntelligenceClient_GetAnalyzeResultFigure_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); - - Response response = await client.GetAnalyzeResultFigureAsync("", Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), ""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DocumentIntelligenceClient_GetAnalyzeResultFigure_AllParameters() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); - - Response response = client.GetAnalyzeResultFigure("", Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), "", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DocumentIntelligenceClient_GetAnalyzeResultFigure_AllParameters_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); - - Response response = await client.GetAnalyzeResultFigureAsync("", Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), "", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DocumentIntelligenceClient_GetAnalyzeResultFigure_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); - - Response response = client.GetAnalyzeResultFigure("", Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), ""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DocumentIntelligenceClient_GetAnalyzeResultFigure_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); - - Response response = await client.GetAnalyzeResultFigureAsync("", Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), ""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DocumentIntelligenceClient_AnalyzeDocument_ShortVersion() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); - - using RequestContent content = null; - Operation operation = client.AnalyzeDocument(WaitUntil.Completed, "", content); + using RequestContent content = RequestContent.Create(new + { + base64Source = "e2Jhc2U2NEVuY29kZWRQZGZ9", + }); + Operation operation = client.AnalyzeDocument(WaitUntil.Completed, "prebuilt-layout", content); BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; @@ -240,14 +143,17 @@ public void Example_DocumentIntelligenceClient_AnalyzeDocument_ShortVersion() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DocumentIntelligenceClient_AnalyzeDocument_ShortVersion_Async() + public async Task Example_DocumentIntelligenceClient_AnalyzeDocument_AnalyzeDocumentFromBase64_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); - using RequestContent content = null; - Operation operation = await client.AnalyzeDocumentAsync(WaitUntil.Completed, "", content); + using RequestContent content = RequestContent.Create(new + { + base64Source = "e2Jhc2U2NEVuY29kZWRQZGZ9", + }); + Operation operation = await client.AnalyzeDocumentAsync(WaitUntil.Completed, "prebuilt-layout", content); BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; @@ -262,773 +168,107 @@ public async Task Example_DocumentIntelligenceClient_AnalyzeDocument_ShortVersio [Test] [Ignore("Only validating compilation of examples")] - public void Example_DocumentIntelligenceClient_AnalyzeDocument_ShortVersion_Convenience() + public void Example_DocumentIntelligenceClient_AnalyzeDocument_AnalyzeDocumentFromBase64_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); - Operation operation = client.AnalyzeDocument(WaitUntil.Completed, ""); + Operation operation = client.AnalyzeDocument(WaitUntil.Completed, "prebuilt-layout"); AnalyzeResult responseData = operation.Value; } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DocumentIntelligenceClient_AnalyzeDocument_ShortVersion_Convenience_Async() + public async Task Example_DocumentIntelligenceClient_AnalyzeDocument_AnalyzeDocumentFromBase64_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); - Operation operation = await client.AnalyzeDocumentAsync(WaitUntil.Completed, ""); + Operation operation = await client.AnalyzeDocumentAsync(WaitUntil.Completed, "prebuilt-layout"); AnalyzeResult responseData = operation.Value; } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DocumentIntelligenceClient_AnalyzeDocument_AllParameters() + public void Example_DocumentIntelligenceClient_AnalyzeDocument_AnalyzeDocumentFromUrl() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - urlSource = "http://localhost:3000", - base64Source = new object(), + urlSource = "http://host.com/doc.pdf", }); - Operation operation = client.AnalyzeDocument(WaitUntil.Completed, "", content, pages: "", locale: "", stringIndexType: "textElements", features: new DocumentAnalysisFeature[] { DocumentAnalysisFeature.OcrHighResolution }, queryFields: new string[] { "" }, outputContentFormat: "text", output: new AnalyzeOutputOption[] { AnalyzeOutputOption.Pdf }); + Operation operation = client.AnalyzeDocument(WaitUntil.Completed, "customModel", content); BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("apiVersion").ToString()); Console.WriteLine(result.GetProperty("modelId").ToString()); Console.WriteLine(result.GetProperty("stringIndexType").ToString()); - Console.WriteLine(result.GetProperty("contentFormat").ToString()); Console.WriteLine(result.GetProperty("content").ToString()); Console.WriteLine(result.GetProperty("pages")[0].GetProperty("pageNumber").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("angle").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("width").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("height").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("unit").ToString()); Console.WriteLine(result.GetProperty("pages")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); Console.WriteLine(result.GetProperty("pages")[0].GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("content").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("span").GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("span").GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("span").GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("span").GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("lines")[0].GetProperty("content").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("lines")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("lines")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("lines")[0].GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("span").GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("span").GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("span").GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("span").GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("role").ToString()); - Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("content").ToString()); - Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); - Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("rowCount").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("columnCount").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("rowIndex").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("columnIndex").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("rowSpan").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("columnSpan").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("content").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("elements")[0].ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("content").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("elements")[0].ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("content").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("elements")[0].ToString()); - Console.WriteLine(result.GetProperty("figures")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); - Console.WriteLine(result.GetProperty("figures")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("figures")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("figures")[0].GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("figures")[0].GetProperty("elements")[0].ToString()); - Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("content").ToString()); - Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); - Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("elements")[0].ToString()); - Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("content").ToString()); - Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); - Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("elements")[0].ToString()); - Console.WriteLine(result.GetProperty("figures")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("sections")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("sections")[0].GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("sections")[0].GetProperty("elements")[0].ToString()); - Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("content").ToString()); - Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); - Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("content").ToString()); - Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); - Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("styles")[0].GetProperty("isHandwritten").ToString()); - Console.WriteLine(result.GetProperty("styles")[0].GetProperty("similarFontFamily").ToString()); - Console.WriteLine(result.GetProperty("styles")[0].GetProperty("fontStyle").ToString()); - Console.WriteLine(result.GetProperty("styles")[0].GetProperty("fontWeight").ToString()); - Console.WriteLine(result.GetProperty("styles")[0].GetProperty("color").ToString()); - Console.WriteLine(result.GetProperty("styles")[0].GetProperty("backgroundColor").ToString()); - Console.WriteLine(result.GetProperty("styles")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("styles")[0].GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("styles")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("languages")[0].GetProperty("locale").ToString()); - Console.WriteLine(result.GetProperty("languages")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("languages")[0].GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("languages")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("docType").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueString").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueDate").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueTime").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valuePhoneNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueInteger").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueSelectionMark").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueSignature").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueCountryRegion").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueString").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueDate").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueTime").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valuePhoneNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueInteger").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueSelectionMark").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueSignature").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCountryRegion").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueString").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueDate").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueTime").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valuePhoneNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueInteger").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueSelectionMark").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueSignature").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueCountryRegion").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueCurrency").GetProperty("amount").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueCurrency").GetProperty("currencySymbol").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueCurrency").GetProperty("currencyCode").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("houseNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("poBox").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("road").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("city").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("postalCode").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("countryRegion").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("streetAddress").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("cityDistrict").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("stateDistrict").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("suburb").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("house").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("level").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueBoolean").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueSelectionGroup")[0].ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("content").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCurrency").GetProperty("amount").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCurrency").GetProperty("currencySymbol").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCurrency").GetProperty("currencyCode").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("houseNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("poBox").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("road").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("city").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("postalCode").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("countryRegion").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("streetAddress").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("cityDistrict").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("stateDistrict").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("suburb").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("house").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("level").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueBoolean").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueSelectionGroup")[0].ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("content").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueString").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueDate").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueTime").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valuePhoneNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueInteger").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueSelectionMark").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueSignature").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueCountryRegion").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueString").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueDate").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueTime").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valuePhoneNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueInteger").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueSelectionMark").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueSignature").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCountryRegion").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCurrency").GetProperty("amount").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCurrency").GetProperty("currencySymbol").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCurrency").GetProperty("currencyCode").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("houseNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("poBox").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("road").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("city").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("postalCode").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("countryRegion").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("streetAddress").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("cityDistrict").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("stateDistrict").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("suburb").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("house").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("level").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueBoolean").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueSelectionGroup")[0].ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("content").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueCurrency").GetProperty("amount").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueCurrency").GetProperty("currencySymbol").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueCurrency").GetProperty("currencyCode").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("houseNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("poBox").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("road").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("city").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("postalCode").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("countryRegion").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("streetAddress").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("cityDistrict").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("stateDistrict").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("suburb").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("house").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("level").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueBoolean").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueSelectionGroup")[0].ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("content").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueCurrency").GetProperty("amount").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueCurrency").GetProperty("currencySymbol").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueCurrency").GetProperty("currencyCode").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("houseNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("poBox").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("road").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("city").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("postalCode").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("countryRegion").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("streetAddress").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("cityDistrict").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("stateDistrict").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("suburb").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("house").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("level").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueBoolean").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueSelectionGroup")[0].ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("content").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("target").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DocumentIntelligenceClient_AnalyzeDocument_AllParameters_Async() + public async Task Example_DocumentIntelligenceClient_AnalyzeDocument_AnalyzeDocumentFromUrl_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - urlSource = "http://localhost:3000", - base64Source = new object(), + urlSource = "http://host.com/doc.pdf", }); - Operation operation = await client.AnalyzeDocumentAsync(WaitUntil.Completed, "", content, pages: "", locale: "", stringIndexType: "textElements", features: new DocumentAnalysisFeature[] { DocumentAnalysisFeature.OcrHighResolution }, queryFields: new string[] { "" }, outputContentFormat: "text", output: new AnalyzeOutputOption[] { AnalyzeOutputOption.Pdf }); + Operation operation = await client.AnalyzeDocumentAsync(WaitUntil.Completed, "customModel", content); BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("apiVersion").ToString()); Console.WriteLine(result.GetProperty("modelId").ToString()); Console.WriteLine(result.GetProperty("stringIndexType").ToString()); - Console.WriteLine(result.GetProperty("contentFormat").ToString()); Console.WriteLine(result.GetProperty("content").ToString()); Console.WriteLine(result.GetProperty("pages")[0].GetProperty("pageNumber").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("angle").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("width").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("height").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("unit").ToString()); Console.WriteLine(result.GetProperty("pages")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); Console.WriteLine(result.GetProperty("pages")[0].GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("content").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("span").GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("span").GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("span").GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("span").GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("lines")[0].GetProperty("content").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("lines")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("lines")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("lines")[0].GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("span").GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("span").GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("span").GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("span").GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("role").ToString()); - Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("content").ToString()); - Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); - Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("rowCount").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("columnCount").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("rowIndex").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("columnIndex").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("rowSpan").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("columnSpan").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("content").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("elements")[0].ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("content").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("elements")[0].ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("content").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("elements")[0].ToString()); - Console.WriteLine(result.GetProperty("figures")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); - Console.WriteLine(result.GetProperty("figures")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("figures")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("figures")[0].GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("figures")[0].GetProperty("elements")[0].ToString()); - Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("content").ToString()); - Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); - Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("elements")[0].ToString()); - Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("content").ToString()); - Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); - Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("elements")[0].ToString()); - Console.WriteLine(result.GetProperty("figures")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("sections")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("sections")[0].GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("sections")[0].GetProperty("elements")[0].ToString()); - Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("content").ToString()); - Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); - Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("content").ToString()); - Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); - Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("styles")[0].GetProperty("isHandwritten").ToString()); - Console.WriteLine(result.GetProperty("styles")[0].GetProperty("similarFontFamily").ToString()); - Console.WriteLine(result.GetProperty("styles")[0].GetProperty("fontStyle").ToString()); - Console.WriteLine(result.GetProperty("styles")[0].GetProperty("fontWeight").ToString()); - Console.WriteLine(result.GetProperty("styles")[0].GetProperty("color").ToString()); - Console.WriteLine(result.GetProperty("styles")[0].GetProperty("backgroundColor").ToString()); - Console.WriteLine(result.GetProperty("styles")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("styles")[0].GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("styles")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("languages")[0].GetProperty("locale").ToString()); - Console.WriteLine(result.GetProperty("languages")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("languages")[0].GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("languages")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("docType").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueString").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueDate").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueTime").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valuePhoneNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueInteger").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueSelectionMark").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueSignature").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueCountryRegion").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueString").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueDate").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueTime").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valuePhoneNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueInteger").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueSelectionMark").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueSignature").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCountryRegion").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueString").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueDate").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueTime").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valuePhoneNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueInteger").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueSelectionMark").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueSignature").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueCountryRegion").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueCurrency").GetProperty("amount").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueCurrency").GetProperty("currencySymbol").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueCurrency").GetProperty("currencyCode").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("houseNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("poBox").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("road").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("city").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("postalCode").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("countryRegion").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("streetAddress").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("cityDistrict").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("stateDistrict").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("suburb").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("house").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("level").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueBoolean").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueSelectionGroup")[0].ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("content").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCurrency").GetProperty("amount").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCurrency").GetProperty("currencySymbol").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCurrency").GetProperty("currencyCode").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("houseNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("poBox").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("road").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("city").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("postalCode").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("countryRegion").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("streetAddress").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("cityDistrict").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("stateDistrict").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("suburb").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("house").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("level").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueBoolean").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueSelectionGroup")[0].ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("content").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueString").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueDate").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueTime").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valuePhoneNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueInteger").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueSelectionMark").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueSignature").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueCountryRegion").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueString").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueDate").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueTime").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valuePhoneNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueInteger").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueSelectionMark").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueSignature").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCountryRegion").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCurrency").GetProperty("amount").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCurrency").GetProperty("currencySymbol").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCurrency").GetProperty("currencyCode").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("houseNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("poBox").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("road").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("city").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("postalCode").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("countryRegion").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("streetAddress").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("cityDistrict").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("stateDistrict").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("suburb").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("house").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("level").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueBoolean").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueSelectionGroup")[0].ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("content").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueCurrency").GetProperty("amount").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueCurrency").GetProperty("currencySymbol").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueCurrency").GetProperty("currencyCode").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("houseNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("poBox").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("road").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("city").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("postalCode").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("countryRegion").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("streetAddress").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("cityDistrict").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("stateDistrict").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("suburb").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("house").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("level").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueBoolean").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueSelectionGroup")[0].ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("content").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueCurrency").GetProperty("amount").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueCurrency").GetProperty("currencySymbol").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueCurrency").GetProperty("currencyCode").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("houseNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("poBox").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("road").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("city").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("postalCode").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("countryRegion").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("streetAddress").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("cityDistrict").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("stateDistrict").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("suburb").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("house").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("level").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueBoolean").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueSelectionGroup")[0].ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("content").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("target").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DocumentIntelligenceClient_AnalyzeDocument_AllParameters_Convenience() + public void Example_DocumentIntelligenceClient_AnalyzeDocument_AnalyzeDocumentFromUrl_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); - AnalyzeDocumentContent analyzeRequest = new AnalyzeDocumentContent - { - UrlSource = new Uri("http://localhost:3000"), - Base64Source = BinaryData.FromObjectAsJson(new object()), - }; - Operation operation = client.AnalyzeDocument(WaitUntil.Completed, "", analyzeRequest: analyzeRequest, pages: "", locale: "", stringIndexType: StringIndexType.TextElements, features: new DocumentAnalysisFeature[] { DocumentAnalysisFeature.OcrHighResolution }, queryFields: new string[] { "" }, outputContentFormat: ContentFormat.Text, output: new AnalyzeOutputOption[] { AnalyzeOutputOption.Pdf }); + Operation operation = client.AnalyzeDocument(WaitUntil.Completed, "customModel"); AnalyzeResult responseData = operation.Value; } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DocumentIntelligenceClient_AnalyzeDocument_AllParameters_Convenience_Async() + public async Task Example_DocumentIntelligenceClient_AnalyzeDocument_AnalyzeDocumentFromUrl_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); - AnalyzeDocumentContent analyzeRequest = new AnalyzeDocumentContent - { - UrlSource = new Uri("http://localhost:3000"), - Base64Source = BinaryData.FromObjectAsJson(new object()), - }; - Operation operation = await client.AnalyzeDocumentAsync(WaitUntil.Completed, "", analyzeRequest: analyzeRequest, pages: "", locale: "", stringIndexType: StringIndexType.TextElements, features: new DocumentAnalysisFeature[] { DocumentAnalysisFeature.OcrHighResolution }, queryFields: new string[] { "" }, outputContentFormat: ContentFormat.Text, output: new AnalyzeOutputOption[] { AnalyzeOutputOption.Pdf }); + Operation operation = await client.AnalyzeDocumentAsync(WaitUntil.Completed, "customModel"); AnalyzeResult responseData = operation.Value; } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DocumentIntelligenceClient_AnalyzeBatchDocuments_ShortVersion() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); - - using RequestContent content = null; - Operation operation = client.AnalyzeBatchDocuments(WaitUntil.Completed, "", content); - BinaryData responseData = operation.Value; - - JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("succeededCount").ToString()); - Console.WriteLine(result.GetProperty("failedCount").ToString()); - Console.WriteLine(result.GetProperty("skippedCount").ToString()); - Console.WriteLine(result.GetProperty("details")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("details")[0].GetProperty("sourceUrl").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DocumentIntelligenceClient_AnalyzeBatchDocuments_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); - - using RequestContent content = null; - Operation operation = await client.AnalyzeBatchDocumentsAsync(WaitUntil.Completed, "", content); - BinaryData responseData = operation.Value; - - JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("succeededCount").ToString()); - Console.WriteLine(result.GetProperty("failedCount").ToString()); - Console.WriteLine(result.GetProperty("skippedCount").ToString()); - Console.WriteLine(result.GetProperty("details")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("details")[0].GetProperty("sourceUrl").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DocumentIntelligenceClient_AnalyzeBatchDocuments_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); - - Operation operation = client.AnalyzeBatchDocuments(WaitUntil.Completed, ""); - AnalyzeBatchResult responseData = operation.Value; - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DocumentIntelligenceClient_AnalyzeBatchDocuments_ShortVersion_Convenience_Async() + public void Example_DocumentIntelligenceClient_AnalyzeBatchDocuments_AnalyzeBatchDocuments() { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); - - Operation operation = await client.AnalyzeBatchDocumentsAsync(WaitUntil.Completed, ""); - AnalyzeBatchResult responseData = operation.Value; - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DocumentIntelligenceClient_AnalyzeBatchDocuments_AllParameters() - { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); @@ -1036,19 +276,14 @@ public void Example_DocumentIntelligenceClient_AnalyzeBatchDocuments_AllParamete { azureBlobSource = new { - containerUrl = "http://localhost:3000", - prefix = "", - }, - azureBlobFileListSource = new - { - containerUrl = "http://localhost:3000", - fileList = "", + containerUrl = "https://myStorageAccount.blob.core.windows.net/myContainer?mySasToken", + prefix = "trainingDocs/", }, - resultContainerUrl = "http://localhost:3000", - resultPrefix = "", + resultContainerUrl = "https://myStorageAccount.blob.core.windows.net/myOutputContainer?mySasToken", + resultPrefix = "trainingDocsResult/", overwriteExisting = true, }); - Operation operation = client.AnalyzeBatchDocuments(WaitUntil.Completed, "", content, pages: "", locale: "", stringIndexType: "textElements", features: new DocumentAnalysisFeature[] { DocumentAnalysisFeature.OcrHighResolution }, queryFields: new string[] { "" }, outputContentFormat: "text", output: new AnalyzeOutputOption[] { AnalyzeOutputOption.Pdf }); + Operation operation = client.AnalyzeBatchDocuments(WaitUntil.Completed, "customModel", content); BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; @@ -1057,19 +292,13 @@ public void Example_DocumentIntelligenceClient_AnalyzeBatchDocuments_AllParamete Console.WriteLine(result.GetProperty("skippedCount").ToString()); Console.WriteLine(result.GetProperty("details")[0].GetProperty("status").ToString()); Console.WriteLine(result.GetProperty("details")[0].GetProperty("sourceUrl").ToString()); - Console.WriteLine(result.GetProperty("details")[0].GetProperty("resultUrl").ToString()); - Console.WriteLine(result.GetProperty("details")[0].GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("details")[0].GetProperty("error").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("details")[0].GetProperty("error").GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("details")[0].GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("details")[0].GetProperty("error").GetProperty("innererror").GetProperty("message").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DocumentIntelligenceClient_AnalyzeBatchDocuments_AllParameters_Async() + public async Task Example_DocumentIntelligenceClient_AnalyzeBatchDocuments_AnalyzeBatchDocuments_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); @@ -1077,19 +306,14 @@ public async Task Example_DocumentIntelligenceClient_AnalyzeBatchDocuments_AllPa { azureBlobSource = new { - containerUrl = "http://localhost:3000", - prefix = "", - }, - azureBlobFileListSource = new - { - containerUrl = "http://localhost:3000", - fileList = "", + containerUrl = "https://myStorageAccount.blob.core.windows.net/myContainer?mySasToken", + prefix = "trainingDocs/", }, - resultContainerUrl = "http://localhost:3000", - resultPrefix = "", + resultContainerUrl = "https://myStorageAccount.blob.core.windows.net/myOutputContainer?mySasToken", + resultPrefix = "trainingDocsResult/", overwriteExisting = true, }); - Operation operation = await client.AnalyzeBatchDocumentsAsync(WaitUntil.Completed, "", content, pages: "", locale: "", stringIndexType: "textElements", features: new DocumentAnalysisFeature[] { DocumentAnalysisFeature.OcrHighResolution }, queryFields: new string[] { "" }, outputContentFormat: "text", output: new AnalyzeOutputOption[] { AnalyzeOutputOption.Pdf }); + Operation operation = await client.AnalyzeBatchDocumentsAsync(WaitUntil.Completed, "customModel", content); BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; @@ -1098,801 +322,111 @@ public async Task Example_DocumentIntelligenceClient_AnalyzeBatchDocuments_AllPa Console.WriteLine(result.GetProperty("skippedCount").ToString()); Console.WriteLine(result.GetProperty("details")[0].GetProperty("status").ToString()); Console.WriteLine(result.GetProperty("details")[0].GetProperty("sourceUrl").ToString()); - Console.WriteLine(result.GetProperty("details")[0].GetProperty("resultUrl").ToString()); - Console.WriteLine(result.GetProperty("details")[0].GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("details")[0].GetProperty("error").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("details")[0].GetProperty("error").GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("details")[0].GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("details")[0].GetProperty("error").GetProperty("innererror").GetProperty("message").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DocumentIntelligenceClient_AnalyzeBatchDocuments_AllParameters_Convenience() + public void Example_DocumentIntelligenceClient_AnalyzeBatchDocuments_AnalyzeBatchDocuments_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); - AnalyzeBatchDocumentsContent analyzeBatchRequest = new AnalyzeBatchDocumentsContent(new Uri("http://localhost:3000")) - { - AzureBlobSource = new AzureBlobContentSource(new Uri("http://localhost:3000")) - { - Prefix = "", - }, - AzureBlobFileListSource = new AzureBlobFileListContentSource(new Uri("http://localhost:3000"), ""), - ResultPrefix = "", - OverwriteExisting = true, - }; - Operation operation = client.AnalyzeBatchDocuments(WaitUntil.Completed, "", analyzeBatchRequest: analyzeBatchRequest, pages: "", locale: "", stringIndexType: StringIndexType.TextElements, features: new DocumentAnalysisFeature[] { DocumentAnalysisFeature.OcrHighResolution }, queryFields: new string[] { "" }, outputContentFormat: ContentFormat.Text, output: new AnalyzeOutputOption[] { AnalyzeOutputOption.Pdf }); + Operation operation = client.AnalyzeBatchDocuments(WaitUntil.Completed, "customModel"); AnalyzeBatchResult responseData = operation.Value; } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DocumentIntelligenceClient_AnalyzeBatchDocuments_AllParameters_Convenience_Async() + public async Task Example_DocumentIntelligenceClient_AnalyzeBatchDocuments_AnalyzeBatchDocuments_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); - AnalyzeBatchDocumentsContent analyzeBatchRequest = new AnalyzeBatchDocumentsContent(new Uri("http://localhost:3000")) - { - AzureBlobSource = new AzureBlobContentSource(new Uri("http://localhost:3000")) - { - Prefix = "", - }, - AzureBlobFileListSource = new AzureBlobFileListContentSource(new Uri("http://localhost:3000"), ""), - ResultPrefix = "", - OverwriteExisting = true, - }; - Operation operation = await client.AnalyzeBatchDocumentsAsync(WaitUntil.Completed, "", analyzeBatchRequest: analyzeBatchRequest, pages: "", locale: "", stringIndexType: StringIndexType.TextElements, features: new DocumentAnalysisFeature[] { DocumentAnalysisFeature.OcrHighResolution }, queryFields: new string[] { "" }, outputContentFormat: ContentFormat.Text, output: new AnalyzeOutputOption[] { AnalyzeOutputOption.Pdf }); + Operation operation = await client.AnalyzeBatchDocumentsAsync(WaitUntil.Completed, "customModel"); AnalyzeBatchResult responseData = operation.Value; } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DocumentIntelligenceClient_ClassifyDocument_ShortVersion() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new object()); - Operation operation = client.ClassifyDocument(WaitUntil.Completed, "", content); - BinaryData responseData = operation.Value; - - JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("apiVersion").ToString()); - Console.WriteLine(result.GetProperty("modelId").ToString()); - Console.WriteLine(result.GetProperty("stringIndexType").ToString()); - Console.WriteLine(result.GetProperty("content").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("pageNumber").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("spans")[0].GetProperty("length").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DocumentIntelligenceClient_ClassifyDocument_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new object()); - Operation operation = await client.ClassifyDocumentAsync(WaitUntil.Completed, "", content); - BinaryData responseData = operation.Value; - - JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("apiVersion").ToString()); - Console.WriteLine(result.GetProperty("modelId").ToString()); - Console.WriteLine(result.GetProperty("stringIndexType").ToString()); - Console.WriteLine(result.GetProperty("content").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("pageNumber").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("spans")[0].GetProperty("length").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DocumentIntelligenceClient_ClassifyDocument_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); - - ClassifyDocumentContent classifyRequest = new ClassifyDocumentContent(); - Operation operation = client.ClassifyDocument(WaitUntil.Completed, "", classifyRequest); - AnalyzeResult responseData = operation.Value; - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DocumentIntelligenceClient_ClassifyDocument_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); - - ClassifyDocumentContent classifyRequest = new ClassifyDocumentContent(); - Operation operation = await client.ClassifyDocumentAsync(WaitUntil.Completed, "", classifyRequest); - AnalyzeResult responseData = operation.Value; - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DocumentIntelligenceClient_ClassifyDocument_AllParameters() + public void Example_DocumentIntelligenceClient_ClassifyDocument_ClassifyDocumentFromUrl() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - urlSource = "http://localhost:3000", - base64Source = new object(), + urlSource = "http://host.com/doc.pdf", }); - Operation operation = client.ClassifyDocument(WaitUntil.Completed, "", content, stringIndexType: "textElements", split: "auto", pages: ""); + Operation operation = client.ClassifyDocument(WaitUntil.Completed, "classifierId", content); BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("apiVersion").ToString()); Console.WriteLine(result.GetProperty("modelId").ToString()); Console.WriteLine(result.GetProperty("stringIndexType").ToString()); - Console.WriteLine(result.GetProperty("contentFormat").ToString()); Console.WriteLine(result.GetProperty("content").ToString()); Console.WriteLine(result.GetProperty("pages")[0].GetProperty("pageNumber").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("angle").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("width").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("height").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("unit").ToString()); Console.WriteLine(result.GetProperty("pages")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); Console.WriteLine(result.GetProperty("pages")[0].GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("content").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("span").GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("span").GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("span").GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("span").GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("lines")[0].GetProperty("content").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("lines")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("lines")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("lines")[0].GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("span").GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("span").GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("span").GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("span").GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("role").ToString()); - Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("content").ToString()); - Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); - Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("rowCount").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("columnCount").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("rowIndex").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("columnIndex").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("rowSpan").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("columnSpan").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("content").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("elements")[0].ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("content").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("elements")[0].ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("content").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("elements")[0].ToString()); - Console.WriteLine(result.GetProperty("figures")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); - Console.WriteLine(result.GetProperty("figures")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("figures")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("figures")[0].GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("figures")[0].GetProperty("elements")[0].ToString()); - Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("content").ToString()); - Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); - Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("elements")[0].ToString()); - Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("content").ToString()); - Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); - Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("elements")[0].ToString()); - Console.WriteLine(result.GetProperty("figures")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("sections")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("sections")[0].GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("sections")[0].GetProperty("elements")[0].ToString()); - Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("content").ToString()); - Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); - Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("content").ToString()); - Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); - Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("styles")[0].GetProperty("isHandwritten").ToString()); - Console.WriteLine(result.GetProperty("styles")[0].GetProperty("similarFontFamily").ToString()); - Console.WriteLine(result.GetProperty("styles")[0].GetProperty("fontStyle").ToString()); - Console.WriteLine(result.GetProperty("styles")[0].GetProperty("fontWeight").ToString()); - Console.WriteLine(result.GetProperty("styles")[0].GetProperty("color").ToString()); - Console.WriteLine(result.GetProperty("styles")[0].GetProperty("backgroundColor").ToString()); - Console.WriteLine(result.GetProperty("styles")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("styles")[0].GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("styles")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("languages")[0].GetProperty("locale").ToString()); - Console.WriteLine(result.GetProperty("languages")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("languages")[0].GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("languages")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("docType").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueString").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueDate").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueTime").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valuePhoneNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueInteger").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueSelectionMark").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueSignature").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueCountryRegion").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueString").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueDate").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueTime").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valuePhoneNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueInteger").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueSelectionMark").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueSignature").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCountryRegion").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueString").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueDate").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueTime").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valuePhoneNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueInteger").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueSelectionMark").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueSignature").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueCountryRegion").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueCurrency").GetProperty("amount").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueCurrency").GetProperty("currencySymbol").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueCurrency").GetProperty("currencyCode").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("houseNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("poBox").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("road").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("city").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("postalCode").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("countryRegion").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("streetAddress").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("cityDistrict").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("stateDistrict").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("suburb").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("house").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("level").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueBoolean").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueSelectionGroup")[0].ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("content").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCurrency").GetProperty("amount").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCurrency").GetProperty("currencySymbol").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCurrency").GetProperty("currencyCode").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("houseNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("poBox").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("road").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("city").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("postalCode").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("countryRegion").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("streetAddress").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("cityDistrict").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("stateDistrict").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("suburb").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("house").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("level").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueBoolean").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueSelectionGroup")[0].ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("content").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueString").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueDate").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueTime").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valuePhoneNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueInteger").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueSelectionMark").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueSignature").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueCountryRegion").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueString").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueDate").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueTime").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valuePhoneNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueInteger").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueSelectionMark").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueSignature").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCountryRegion").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCurrency").GetProperty("amount").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCurrency").GetProperty("currencySymbol").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCurrency").GetProperty("currencyCode").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("houseNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("poBox").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("road").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("city").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("postalCode").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("countryRegion").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("streetAddress").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("cityDistrict").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("stateDistrict").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("suburb").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("house").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("level").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueBoolean").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueSelectionGroup")[0].ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("content").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueCurrency").GetProperty("amount").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueCurrency").GetProperty("currencySymbol").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueCurrency").GetProperty("currencyCode").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("houseNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("poBox").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("road").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("city").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("postalCode").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("countryRegion").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("streetAddress").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("cityDistrict").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("stateDistrict").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("suburb").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("house").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("level").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueBoolean").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueSelectionGroup")[0].ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("content").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueCurrency").GetProperty("amount").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueCurrency").GetProperty("currencySymbol").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueCurrency").GetProperty("currencyCode").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("houseNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("poBox").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("road").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("city").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("postalCode").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("countryRegion").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("streetAddress").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("cityDistrict").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("stateDistrict").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("suburb").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("house").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("level").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueBoolean").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueSelectionGroup")[0].ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("content").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("target").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DocumentIntelligenceClient_ClassifyDocument_AllParameters_Async() + public async Task Example_DocumentIntelligenceClient_ClassifyDocument_ClassifyDocumentFromUrl_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - urlSource = "http://localhost:3000", - base64Source = new object(), + urlSource = "http://host.com/doc.pdf", }); - Operation operation = await client.ClassifyDocumentAsync(WaitUntil.Completed, "", content, stringIndexType: "textElements", split: "auto", pages: ""); + Operation operation = await client.ClassifyDocumentAsync(WaitUntil.Completed, "classifierId", content); BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("apiVersion").ToString()); Console.WriteLine(result.GetProperty("modelId").ToString()); Console.WriteLine(result.GetProperty("stringIndexType").ToString()); - Console.WriteLine(result.GetProperty("contentFormat").ToString()); Console.WriteLine(result.GetProperty("content").ToString()); Console.WriteLine(result.GetProperty("pages")[0].GetProperty("pageNumber").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("angle").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("width").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("height").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("unit").ToString()); Console.WriteLine(result.GetProperty("pages")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); Console.WriteLine(result.GetProperty("pages")[0].GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("content").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("span").GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("span").GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("span").GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("span").GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("lines")[0].GetProperty("content").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("lines")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("lines")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("lines")[0].GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("span").GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("span").GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("span").GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("span").GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("role").ToString()); - Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("content").ToString()); - Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); - Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("rowCount").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("columnCount").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("rowIndex").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("columnIndex").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("rowSpan").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("columnSpan").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("content").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("elements")[0].ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("content").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("elements")[0].ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("content").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("elements")[0].ToString()); - Console.WriteLine(result.GetProperty("figures")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); - Console.WriteLine(result.GetProperty("figures")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("figures")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("figures")[0].GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("figures")[0].GetProperty("elements")[0].ToString()); - Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("content").ToString()); - Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); - Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("elements")[0].ToString()); - Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("content").ToString()); - Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); - Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("elements")[0].ToString()); - Console.WriteLine(result.GetProperty("figures")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("sections")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("sections")[0].GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("sections")[0].GetProperty("elements")[0].ToString()); - Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("content").ToString()); - Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); - Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("content").ToString()); - Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); - Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("styles")[0].GetProperty("isHandwritten").ToString()); - Console.WriteLine(result.GetProperty("styles")[0].GetProperty("similarFontFamily").ToString()); - Console.WriteLine(result.GetProperty("styles")[0].GetProperty("fontStyle").ToString()); - Console.WriteLine(result.GetProperty("styles")[0].GetProperty("fontWeight").ToString()); - Console.WriteLine(result.GetProperty("styles")[0].GetProperty("color").ToString()); - Console.WriteLine(result.GetProperty("styles")[0].GetProperty("backgroundColor").ToString()); - Console.WriteLine(result.GetProperty("styles")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("styles")[0].GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("styles")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("languages")[0].GetProperty("locale").ToString()); - Console.WriteLine(result.GetProperty("languages")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("languages")[0].GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("languages")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("docType").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueString").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueDate").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueTime").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valuePhoneNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueInteger").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueSelectionMark").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueSignature").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueCountryRegion").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueString").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueDate").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueTime").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valuePhoneNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueInteger").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueSelectionMark").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueSignature").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCountryRegion").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueString").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueDate").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueTime").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valuePhoneNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueInteger").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueSelectionMark").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueSignature").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueCountryRegion").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueCurrency").GetProperty("amount").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueCurrency").GetProperty("currencySymbol").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueCurrency").GetProperty("currencyCode").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("houseNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("poBox").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("road").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("city").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("postalCode").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("countryRegion").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("streetAddress").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("cityDistrict").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("stateDistrict").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("suburb").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("house").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("level").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueBoolean").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("valueSelectionGroup")[0].ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("content").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueObject").GetProperty("").GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCurrency").GetProperty("amount").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCurrency").GetProperty("currencySymbol").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCurrency").GetProperty("currencyCode").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("houseNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("poBox").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("road").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("city").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("postalCode").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("countryRegion").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("streetAddress").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("cityDistrict").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("stateDistrict").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("suburb").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("house").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("level").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueBoolean").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueSelectionGroup")[0].ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("content").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueString").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueDate").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueTime").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valuePhoneNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueInteger").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueSelectionMark").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueSignature").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueCountryRegion").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueString").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueDate").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueTime").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valuePhoneNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueInteger").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueSelectionMark").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueSignature").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCountryRegion").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCurrency").GetProperty("amount").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCurrency").GetProperty("currencySymbol").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCurrency").GetProperty("currencyCode").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("houseNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("poBox").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("road").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("city").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("postalCode").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("countryRegion").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("streetAddress").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("cityDistrict").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("stateDistrict").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("suburb").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("house").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("level").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueBoolean").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueSelectionGroup")[0].ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("content").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueArray")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueCurrency").GetProperty("amount").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueCurrency").GetProperty("currencySymbol").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueCurrency").GetProperty("currencyCode").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("houseNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("poBox").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("road").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("city").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("postalCode").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("countryRegion").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("streetAddress").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("cityDistrict").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("stateDistrict").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("suburb").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("house").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueAddress").GetProperty("level").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueBoolean").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("valueSelectionGroup")[0].ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("content").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueObject").GetProperty("").GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueCurrency").GetProperty("amount").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueCurrency").GetProperty("currencySymbol").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueCurrency").GetProperty("currencyCode").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("houseNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("poBox").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("road").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("city").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("postalCode").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("countryRegion").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("streetAddress").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("cityDistrict").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("stateDistrict").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("suburb").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("house").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("level").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueBoolean").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueSelectionGroup")[0].ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("content").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("spans")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("spans")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("documents")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("target").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DocumentIntelligenceClient_ClassifyDocument_AllParameters_Convenience() + public void Example_DocumentIntelligenceClient_ClassifyDocument_ClassifyDocumentFromUrl_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); ClassifyDocumentContent classifyRequest = new ClassifyDocumentContent { - UrlSource = new Uri("http://localhost:3000"), - Base64Source = BinaryData.FromObjectAsJson(new object()), + UrlSource = new Uri("http://host.com/doc.pdf"), }; - Operation operation = client.ClassifyDocument(WaitUntil.Completed, "", classifyRequest, stringIndexType: StringIndexType.TextElements, split: SplitMode.Auto, pages: ""); + Operation operation = client.ClassifyDocument(WaitUntil.Completed, "classifierId", classifyRequest); AnalyzeResult responseData = operation.Value; } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DocumentIntelligenceClient_ClassifyDocument_AllParameters_Convenience_Async() + public async Task Example_DocumentIntelligenceClient_ClassifyDocument_ClassifyDocumentFromUrl_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); ClassifyDocumentContent classifyRequest = new ClassifyDocumentContent { - UrlSource = new Uri("http://localhost:3000"), - Base64Source = BinaryData.FromObjectAsJson(new object()), + UrlSource = new Uri("http://host.com/doc.pdf"), }; - Operation operation = await client.ClassifyDocumentAsync(WaitUntil.Completed, "", classifyRequest, stringIndexType: StringIndexType.TextElements, split: SplitMode.Auto, pages: ""); + Operation operation = await client.ClassifyDocumentAsync(WaitUntil.Completed, "classifierId", classifyRequest); AnalyzeResult responseData = operation.Value; } } diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/Docs/EasmClient.xml b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/Docs/EasmClient.xml index 6df56c7d8216..61714420b8a4 100644 --- a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/Docs/EasmClient.xml +++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/Docs/EasmClient.xml @@ -5,299 +5,157 @@ This sample shows how to call UpdateAssetsAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -EasmClient client = new EasmClient(endpoint, credential); - -AssetUpdatePayload body = new AssetUpdatePayload(); -Response response = await client.UpdateAssetsAsync("", body); -]]> -This sample shows how to call UpdateAssetsAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); AssetUpdatePayload body = new AssetUpdatePayload { - State = AssetUpdateState.Candidate, - ExternalId = "", + State = AssetUpdateState.Confirmed, + ExternalId = "contosoInternalId", Labels = { - ["key"] = true + ["contosoLabel"] = true }, - Transfers = AssetUpdateTransfers.As, }; -Response response = await client.UpdateAssetsAsync("", body); +Response response = await client.UpdateAssetsAsync("state%20%3D%20%22confirmed%22%20AND%20name%20%5E%3D%20%22contoso.com%22", body); ]]> This sample shows how to call UpdateAssets. "); -TokenCredential credential = new DefaultAzureCredential(); -EasmClient client = new EasmClient(endpoint, credential); - -AssetUpdatePayload body = new AssetUpdatePayload(); -Response response = client.UpdateAssets("", body); -]]> -This sample shows how to call UpdateAssets with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); AssetUpdatePayload body = new AssetUpdatePayload { - State = AssetUpdateState.Candidate, - ExternalId = "", + State = AssetUpdateState.Confirmed, + ExternalId = "contosoInternalId", Labels = { - ["key"] = true + ["contosoLabel"] = true }, - Transfers = AssetUpdateTransfers.As, }; -Response response = client.UpdateAssets("", body); +Response response = client.UpdateAssets("state%20%3D%20%22confirmed%22%20AND%20name%20%5E%3D%20%22contoso.com%22", body); ]]> This sample shows how to call UpdateAssetsAsync and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -EasmClient client = new EasmClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new object()); -Response response = await client.UpdateAssetsAsync("", content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("id").ToString()); -]]> -This sample shows how to call UpdateAssetsAsync with all parameters and request content and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - state = "candidate", - externalId = "", + state = "confirmed", + externalId = "contosoInternalId", labels = new { - key = true, + contosoLabel = true, }, - transfers = "as", }); -Response response = await client.UpdateAssetsAsync("", content); +Response response = await client.UpdateAssetsAsync("state%20%3D%20%22confirmed%22%20AND%20name%20%5E%3D%20%22contoso.com%22", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("startedAt").ToString()); -Console.WriteLine(result.GetProperty("completedAt").ToString()); -Console.WriteLine(result.GetProperty("lastPolledAt").ToString()); -Console.WriteLine(result.GetProperty("state").ToString()); -Console.WriteLine(result.GetProperty("phase").ToString()); -Console.WriteLine(result.GetProperty("reason").ToString()); -Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); ]]> This sample shows how to call UpdateAssets and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -EasmClient client = new EasmClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new object()); -Response response = client.UpdateAssets("", content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("id").ToString()); -]]> -This sample shows how to call UpdateAssets with all parameters and request content and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - state = "candidate", - externalId = "", + state = "confirmed", + externalId = "contosoInternalId", labels = new { - key = true, + contosoLabel = true, }, - transfers = "as", }); -Response response = client.UpdateAssets("", content); +Response response = client.UpdateAssets("state%20%3D%20%22confirmed%22%20AND%20name%20%5E%3D%20%22contoso.com%22", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("startedAt").ToString()); -Console.WriteLine(result.GetProperty("completedAt").ToString()); -Console.WriteLine(result.GetProperty("lastPolledAt").ToString()); -Console.WriteLine(result.GetProperty("state").ToString()); -Console.WriteLine(result.GetProperty("phase").ToString()); -Console.WriteLine(result.GetProperty("reason").ToString()); -Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); ]]> This sample shows how to call GetAssetResourceAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -EasmClient client = new EasmClient(endpoint, credential); - -Response response = await client.GetAssetResourceAsync(""); -]]> -This sample shows how to call GetAssetResourceAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -Response response = await client.GetAssetResourceAsync(""); +Response response = await client.GetAssetResourceAsync("aG9zdCQkY29udG9zby5jb20"); ]]> This sample shows how to call GetAssetResource. "); -TokenCredential credential = new DefaultAzureCredential(); -EasmClient client = new EasmClient(endpoint, credential); - -Response response = client.GetAssetResource(""); -]]> -This sample shows how to call GetAssetResource with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -Response response = client.GetAssetResource(""); +Response response = client.GetAssetResource("aG9zdCQkY29udG9zby5jb20"); ]]> This sample shows how to call GetAssetResourceAsync and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -EasmClient client = new EasmClient(endpoint, credential); - -Response response = await client.GetAssetResourceAsync("", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("kind").ToString()); -Console.WriteLine(result.GetProperty("id").ToString()); -]]> -This sample shows how to call GetAssetResourceAsync with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -Response response = await client.GetAssetResourceAsync("", null); +Response response = await client.GetAssetResourceAsync("aG9zdCQkY29udG9zby5jb20", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("kind").ToString()); Console.WriteLine(result.GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("uuid").ToString()); -Console.WriteLine(result.GetProperty("createdDate").ToString()); -Console.WriteLine(result.GetProperty("updatedDate").ToString()); -Console.WriteLine(result.GetProperty("state").ToString()); -Console.WriteLine(result.GetProperty("externalId").ToString()); -Console.WriteLine(result.GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("wildcard").ToString()); -Console.WriteLine(result.GetProperty("discoGroupName").ToString()); -Console.WriteLine(result.GetProperty("auditTrail")[0].GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("auditTrail")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("auditTrail")[0].GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("auditTrail")[0].GetProperty("kind").ToString()); -Console.WriteLine(result.GetProperty("auditTrail")[0].GetProperty("reason").ToString()); -Console.WriteLine(result.GetProperty("reason").ToString()); ]]> This sample shows how to call GetAssetResource and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -EasmClient client = new EasmClient(endpoint, credential); - -Response response = client.GetAssetResource("", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("kind").ToString()); -Console.WriteLine(result.GetProperty("id").ToString()); -]]> -This sample shows how to call GetAssetResource with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -Response response = client.GetAssetResource("", null); +Response response = client.GetAssetResource("aG9zdCQkY29udG9zby5jb20", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("kind").ToString()); Console.WriteLine(result.GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("uuid").ToString()); -Console.WriteLine(result.GetProperty("createdDate").ToString()); -Console.WriteLine(result.GetProperty("updatedDate").ToString()); -Console.WriteLine(result.GetProperty("state").ToString()); -Console.WriteLine(result.GetProperty("externalId").ToString()); -Console.WriteLine(result.GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("wildcard").ToString()); -Console.WriteLine(result.GetProperty("discoGroupName").ToString()); -Console.WriteLine(result.GetProperty("auditTrail")[0].GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("auditTrail")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("auditTrail")[0].GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("auditTrail")[0].GetProperty("kind").ToString()); -Console.WriteLine(result.GetProperty("auditTrail")[0].GetProperty("reason").ToString()); -Console.WriteLine(result.GetProperty("reason").ToString()); ]]> This sample shows how to call ValidateDataConnectionAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -EasmClient client = new EasmClient(endpoint, credential); - -DataConnectionPayload body = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties()); -Response response = await client.ValidateDataConnectionAsync(body); -]]> -This sample shows how to call ValidateDataConnectionAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); DataConnectionPayload body = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties { - ApiKey = "", - WorkspaceId = "", + ApiKey = "ThisisApiKey", + WorkspaceId = "ThisisWorkspaceId", }) { - Name = "", - Content = DataConnectionContent.Assets, - Frequency = DataConnectionFrequency.Daily, - FrequencyOffset = 1234, + Name = "ThisisaDataConnection", + Frequency = DataConnectionFrequency.Weekly, + FrequencyOffset = 1, }; Response response = await client.ValidateDataConnectionAsync(body); ]]> @@ -306,29 +164,19 @@ Response response = await client.ValidateDataConnectionAsync(bod This sample shows how to call ValidateDataConnection. "); -TokenCredential credential = new DefaultAzureCredential(); -EasmClient client = new EasmClient(endpoint, credential); - -DataConnectionPayload body = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties()); -Response response = client.ValidateDataConnection(body); -]]> -This sample shows how to call ValidateDataConnection with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); DataConnectionPayload body = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties { - ApiKey = "", - WorkspaceId = "", + ApiKey = "ThisisApiKey", + WorkspaceId = "ThisisWorkspaceId", }) { - Name = "", - Content = DataConnectionContent.Assets, - Frequency = DataConnectionFrequency.Daily, - FrequencyOffset = 1234, + Name = "ThisisaDataConnection", + Frequency = DataConnectionFrequency.Weekly, + FrequencyOffset = 1, }; Response response = client.ValidateDataConnection(body); ]]> @@ -337,23 +185,7 @@ Response response = client.ValidateDataConnection(body); This sample shows how to call ValidateDataConnectionAsync and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -EasmClient client = new EasmClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - kind = "logAnalytics", - properties = new object(), -}); -Response response = await client.ValidateDataConnectionAsync(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.ToString()); -]]> -This sample shows how to call ValidateDataConnectionAsync with all request content and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); @@ -362,45 +194,24 @@ using RequestContent content = RequestContent.Create(new kind = "logAnalytics", properties = new { - apiKey = "", - workspaceId = "", + apiKey = "ThisisApiKey", + workspaceId = "ThisisWorkspaceId", }, - name = "", - content = "assets", - frequency = "daily", - frequencyOffset = 1234, + frequency = "weekly", + frequencyOffset = 1, + name = "ThisisaDataConnection", }); Response response = await client.ValidateDataConnectionAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("value").ToString()); +Console.WriteLine(result.ToString()); ]]> This sample shows how to call ValidateDataConnection and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -EasmClient client = new EasmClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - kind = "logAnalytics", - properties = new object(), -}); -Response response = client.ValidateDataConnection(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.ToString()); -]]> -This sample shows how to call ValidateDataConnection with all request content and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); @@ -409,220 +220,116 @@ using RequestContent content = RequestContent.Create(new kind = "logAnalytics", properties = new { - apiKey = "", - workspaceId = "", + apiKey = "ThisisApiKey", + workspaceId = "ThisisWorkspaceId", }, - name = "", - content = "assets", - frequency = "daily", - frequencyOffset = 1234, + frequency = "weekly", + frequencyOffset = 1, + name = "ThisisaDataConnection", }); Response response = client.ValidateDataConnection(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("value").ToString()); +Console.WriteLine(result.ToString()); ]]> This sample shows how to call GetDataConnectionAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -EasmClient client = new EasmClient(endpoint, credential); - -Response response = await client.GetDataConnectionAsync(""); -]]> -This sample shows how to call GetDataConnectionAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -Response response = await client.GetDataConnectionAsync(""); +Response response = await client.GetDataConnectionAsync("ThisisaDataConnection"); ]]> This sample shows how to call GetDataConnection. "); -TokenCredential credential = new DefaultAzureCredential(); -EasmClient client = new EasmClient(endpoint, credential); - -Response response = client.GetDataConnection(""); -]]> -This sample shows how to call GetDataConnection with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -Response response = client.GetDataConnection(""); +Response response = client.GetDataConnection("ThisisaDataConnection"); ]]> This sample shows how to call GetDataConnectionAsync and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -EasmClient client = new EasmClient(endpoint, credential); - -Response response = await client.GetDataConnectionAsync("", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("kind").ToString()); -Console.WriteLine(result.GetProperty("name").ToString()); -]]> -This sample shows how to call GetDataConnectionAsync with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -Response response = await client.GetDataConnectionAsync("", null); +Response response = await client.GetDataConnectionAsync("ThisisaDataConnection", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("kind").ToString()); -Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("content").ToString()); -Console.WriteLine(result.GetProperty("createdDate").ToString()); -Console.WriteLine(result.GetProperty("frequency").ToString()); -Console.WriteLine(result.GetProperty("frequencyOffset").ToString()); -Console.WriteLine(result.GetProperty("updatedDate").ToString()); -Console.WriteLine(result.GetProperty("userUpdatedAt").ToString()); -Console.WriteLine(result.GetProperty("active").ToString()); -Console.WriteLine(result.GetProperty("inactiveMessage").ToString()); ]]> This sample shows how to call GetDataConnection and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -EasmClient client = new EasmClient(endpoint, credential); - -Response response = client.GetDataConnection("", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("kind").ToString()); -Console.WriteLine(result.GetProperty("name").ToString()); -]]> -This sample shows how to call GetDataConnection with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -Response response = client.GetDataConnection("", null); +Response response = client.GetDataConnection("ThisisaDataConnection", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("kind").ToString()); -Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("content").ToString()); -Console.WriteLine(result.GetProperty("createdDate").ToString()); -Console.WriteLine(result.GetProperty("frequency").ToString()); -Console.WriteLine(result.GetProperty("frequencyOffset").ToString()); -Console.WriteLine(result.GetProperty("updatedDate").ToString()); -Console.WriteLine(result.GetProperty("userUpdatedAt").ToString()); -Console.WriteLine(result.GetProperty("active").ToString()); -Console.WriteLine(result.GetProperty("inactiveMessage").ToString()); ]]> This sample shows how to call CreateOrReplaceDataConnectionAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -EasmClient client = new EasmClient(endpoint, credential); - -DataConnectionPayload body = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties()); -Response response = await client.CreateOrReplaceDataConnectionAsync("", body); -]]> -This sample shows how to call CreateOrReplaceDataConnectionAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); DataConnectionPayload body = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties { - ApiKey = "", - WorkspaceId = "", + ApiKey = "ThisisApiKey", + WorkspaceId = "ThisisWorkspaceId", }) { - Name = "", - Content = DataConnectionContent.Assets, - Frequency = DataConnectionFrequency.Daily, - FrequencyOffset = 1234, + Frequency = DataConnectionFrequency.Weekly, + FrequencyOffset = 1, }; -Response response = await client.CreateOrReplaceDataConnectionAsync("", body); +Response response = await client.CreateOrReplaceDataConnectionAsync("ThisisaDataConnection", body); ]]> This sample shows how to call CreateOrReplaceDataConnection. "); -TokenCredential credential = new DefaultAzureCredential(); -EasmClient client = new EasmClient(endpoint, credential); - -DataConnectionPayload body = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties()); -Response response = client.CreateOrReplaceDataConnection("", body); -]]> -This sample shows how to call CreateOrReplaceDataConnection with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); DataConnectionPayload body = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties { - ApiKey = "", - WorkspaceId = "", + ApiKey = "ThisisApiKey", + WorkspaceId = "ThisisWorkspaceId", }) { - Name = "", - Content = DataConnectionContent.Assets, - Frequency = DataConnectionFrequency.Daily, - FrequencyOffset = 1234, + Frequency = DataConnectionFrequency.Weekly, + FrequencyOffset = 1, }; -Response response = client.CreateOrReplaceDataConnection("", body); +Response response = client.CreateOrReplaceDataConnection("ThisisaDataConnection", body); ]]> This sample shows how to call CreateOrReplaceDataConnectionAsync and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -EasmClient client = new EasmClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - kind = "logAnalytics", - properties = new object(), -}); -Response response = await client.CreateOrReplaceDataConnectionAsync("", content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("kind").ToString()); -Console.WriteLine(result.GetProperty("name").ToString()); -]]> -This sample shows how to call CreateOrReplaceDataConnectionAsync with all parameters and request content and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); @@ -631,53 +338,24 @@ using RequestContent content = RequestContent.Create(new kind = "logAnalytics", properties = new { - apiKey = "", - workspaceId = "", + apiKey = "ThisisApiKey", + workspaceId = "ThisisWorkspaceId", }, - name = "", - content = "assets", - frequency = "daily", - frequencyOffset = 1234, + frequency = "weekly", + frequencyOffset = 1, }); -Response response = await client.CreateOrReplaceDataConnectionAsync("", content); +Response response = await client.CreateOrReplaceDataConnectionAsync("ThisisaDataConnection", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("kind").ToString()); -Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("content").ToString()); -Console.WriteLine(result.GetProperty("createdDate").ToString()); -Console.WriteLine(result.GetProperty("frequency").ToString()); -Console.WriteLine(result.GetProperty("frequencyOffset").ToString()); -Console.WriteLine(result.GetProperty("updatedDate").ToString()); -Console.WriteLine(result.GetProperty("userUpdatedAt").ToString()); -Console.WriteLine(result.GetProperty("active").ToString()); -Console.WriteLine(result.GetProperty("inactiveMessage").ToString()); ]]> This sample shows how to call CreateOrReplaceDataConnection and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -EasmClient client = new EasmClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - kind = "logAnalytics", - properties = new object(), -}); -Response response = client.CreateOrReplaceDataConnection("", content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("kind").ToString()); -Console.WriteLine(result.GetProperty("name").ToString()); -]]> -This sample shows how to call CreateOrReplaceDataConnection with all parameters and request content and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); @@ -686,50 +364,28 @@ using RequestContent content = RequestContent.Create(new kind = "logAnalytics", properties = new { - apiKey = "", - workspaceId = "", + apiKey = "ThisisApiKey", + workspaceId = "ThisisWorkspaceId", }, - name = "", - content = "assets", - frequency = "daily", - frequencyOffset = 1234, + frequency = "weekly", + frequencyOffset = 1, }); -Response response = client.CreateOrReplaceDataConnection("", content); +Response response = client.CreateOrReplaceDataConnection("ThisisaDataConnection", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("kind").ToString()); -Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("content").ToString()); -Console.WriteLine(result.GetProperty("createdDate").ToString()); -Console.WriteLine(result.GetProperty("frequency").ToString()); -Console.WriteLine(result.GetProperty("frequencyOffset").ToString()); -Console.WriteLine(result.GetProperty("updatedDate").ToString()); -Console.WriteLine(result.GetProperty("userUpdatedAt").ToString()); -Console.WriteLine(result.GetProperty("active").ToString()); -Console.WriteLine(result.GetProperty("inactiveMessage").ToString()); ]]> This sample shows how to call DeleteDataConnectionAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -EasmClient client = new EasmClient(endpoint, credential); - -Response response = await client.DeleteDataConnectionAsync(""); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call DeleteDataConnectionAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -Response response = await client.DeleteDataConnectionAsync(""); +Response response = await client.DeleteDataConnectionAsync("ThisisaDataConnection"); Console.WriteLine(response.Status); ]]> @@ -738,21 +394,11 @@ Console.WriteLine(response.Status); This sample shows how to call DeleteDataConnection. "); -TokenCredential credential = new DefaultAzureCredential(); -EasmClient client = new EasmClient(endpoint, credential); - -Response response = client.DeleteDataConnection(""); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call DeleteDataConnection with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -Response response = client.DeleteDataConnection(""); +Response response = client.DeleteDataConnection("ThisisaDataConnection"); Console.WriteLine(response.Status); ]]> @@ -1443,15 +1089,7 @@ Console.WriteLine(result.GetProperty("names")[0].ToString()); This sample shows how to call GetBillableAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -EasmClient client = new EasmClient(endpoint, credential); - -Response response = await client.GetBillableAsync(); -]]> -This sample shows how to call GetBillableAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); @@ -1462,15 +1100,7 @@ Response response = await client.GetBillableAs This sample shows how to call GetBillable. "); -TokenCredential credential = new DefaultAzureCredential(); -EasmClient client = new EasmClient(endpoint, credential); - -Response response = client.GetBillable(); -]]> -This sample shows how to call GetBillable with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); @@ -1481,7 +1111,7 @@ Response response = client.GetBillable(); This sample shows how to call GetBillableAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); @@ -1489,27 +1119,13 @@ Response response = await client.GetBillableAsync(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetBillableAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -EasmClient client = new EasmClient(endpoint, credential); - -Response response = await client.GetBillableAsync(null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("date").ToString()); -Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("total").ToString()); -Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("assetBreakdown")[0].GetProperty("kind").ToString()); -Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("assetBreakdown")[0].GetProperty("count").ToString()); ]]> This sample shows how to call GetBillable and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); @@ -1517,45 +1133,21 @@ Response response = client.GetBillable(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetBillable with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -EasmClient client = new EasmClient(endpoint, credential); - -Response response = client.GetBillable(null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("date").ToString()); -Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("total").ToString()); -Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("assetBreakdown")[0].GetProperty("kind").ToString()); -Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("assetBreakdown")[0].GetProperty("count").ToString()); ]]> This sample shows how to call GetSnapshotAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -EasmClient client = new EasmClient(endpoint, credential); - -ReportAssetSnapshotPayload body = new ReportAssetSnapshotPayload(); -Response response = await client.GetSnapshotAsync(body); -]]> -This sample shows how to call GetSnapshotAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); ReportAssetSnapshotPayload body = new ReportAssetSnapshotPayload { - Metric = "", - LabelName = "", - Size = 1234, - Page = 1234, + Metric = "site_status_active", + Size = 5, + Page = 0, }; Response response = await client.GetSnapshotAsync(body); ]]> @@ -1564,25 +1156,15 @@ Response response = await client.GetSnapshotAsync(bod This sample shows how to call GetSnapshot. "); -TokenCredential credential = new DefaultAzureCredential(); -EasmClient client = new EasmClient(endpoint, credential); - -ReportAssetSnapshotPayload body = new ReportAssetSnapshotPayload(); -Response response = client.GetSnapshot(body); -]]> -This sample shows how to call GetSnapshot with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); ReportAssetSnapshotPayload body = new ReportAssetSnapshotPayload { - Metric = "", - LabelName = "", - Size = 1234, - Page = 1234, + Metric = "site_status_active", + Size = 5, + Page = 0, }; Response response = client.GetSnapshot(body); ]]> @@ -1591,143 +1173,53 @@ Response response = client.GetSnapshot(body); This sample shows how to call GetSnapshotAsync and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -EasmClient client = new EasmClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new object()); -Response response = await client.GetSnapshotAsync(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetSnapshotAsync with all request content and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - metric = "", - labelName = "", - size = 1234, - page = 1234, + metric = "site_status_active", + page = 0, + size = 5, }); Response response = await client.GetSnapshotAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("metric").ToString()); -Console.WriteLine(result.GetProperty("labelName").ToString()); -Console.WriteLine(result.GetProperty("updatedAt").ToString()); -Console.WriteLine(result.GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("assets").GetProperty("totalElements").ToString()); -Console.WriteLine(result.GetProperty("assets").GetProperty("mark").ToString()); -Console.WriteLine(result.GetProperty("assets").GetProperty("nextLink").ToString()); -Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("kind").ToString()); -Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("uuid").ToString()); -Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("createdDate").ToString()); -Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("updatedDate").ToString()); -Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("state").ToString()); -Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("externalId").ToString()); -Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("wildcard").ToString()); -Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("discoGroupName").ToString()); -Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("auditTrail")[0].GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("auditTrail")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("auditTrail")[0].GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("auditTrail")[0].GetProperty("kind").ToString()); -Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("auditTrail")[0].GetProperty("reason").ToString()); -Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("reason").ToString()); +Console.WriteLine(result.ToString()); ]]> This sample shows how to call GetSnapshot and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -EasmClient client = new EasmClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new object()); -Response response = client.GetSnapshot(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetSnapshot with all request content and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - metric = "", - labelName = "", - size = 1234, - page = 1234, + metric = "site_status_active", + page = 0, + size = 5, }); Response response = client.GetSnapshot(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("metric").ToString()); -Console.WriteLine(result.GetProperty("labelName").ToString()); -Console.WriteLine(result.GetProperty("updatedAt").ToString()); -Console.WriteLine(result.GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("assets").GetProperty("totalElements").ToString()); -Console.WriteLine(result.GetProperty("assets").GetProperty("mark").ToString()); -Console.WriteLine(result.GetProperty("assets").GetProperty("nextLink").ToString()); -Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("kind").ToString()); -Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("uuid").ToString()); -Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("createdDate").ToString()); -Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("updatedDate").ToString()); -Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("state").ToString()); -Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("externalId").ToString()); -Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("wildcard").ToString()); -Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("discoGroupName").ToString()); -Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("auditTrail")[0].GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("auditTrail")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("auditTrail")[0].GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("auditTrail")[0].GetProperty("kind").ToString()); -Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("auditTrail")[0].GetProperty("reason").ToString()); -Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("reason").ToString()); +Console.WriteLine(result.ToString()); ]]> This sample shows how to call GetSummaryAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -EasmClient client = new EasmClient(endpoint, credential); - -ReportAssetSummaryPayload body = new ReportAssetSummaryPayload(); -Response response = await client.GetSummaryAsync(body); -]]> -This sample shows how to call GetSummaryAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); ReportAssetSummaryPayload body = new ReportAssetSummaryPayload { - MetricCategories = { "" }, - Metrics = { "" }, - Filters = { "" }, - GroupBy = "", - SegmentBy = "", - LabelName = "", + Filters = { "state = \"confirmed\" AND kind = \"domain\"", "state = \"confirmed\" AND kind = \"host\"", "state = \"confirmed\" AND kind = \"page\"" }, }; Response response = await client.GetSummaryAsync(body); ]]> @@ -1736,27 +1228,13 @@ Response response = await client.GetSummaryAsync(body) This sample shows how to call GetSummary. "); -TokenCredential credential = new DefaultAzureCredential(); -EasmClient client = new EasmClient(endpoint, credential); - -ReportAssetSummaryPayload body = new ReportAssetSummaryPayload(); -Response response = client.GetSummary(body); -]]> -This sample shows how to call GetSummary with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); ReportAssetSummaryPayload body = new ReportAssetSummaryPayload { - MetricCategories = { "" }, - Metrics = { "" }, - Filters = { "" }, - GroupBy = "", - SegmentBy = "", - LabelName = "", + Filters = { "state = \"confirmed\" AND kind = \"domain\"", "state = \"confirmed\" AND kind = \"host\"", "state = \"confirmed\" AND kind = \"page\"" }, }; Response response = client.GetSummary(body); ]]> @@ -1765,359 +1243,169 @@ Response response = client.GetSummary(body); This sample shows how to call GetSummaryAsync and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -EasmClient client = new EasmClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new object()); -Response response = await client.GetSummaryAsync(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetSummaryAsync with all request content and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - metricCategories = new object[] - { - "" - }, - metrics = new object[] - { - "" - }, filters = new object[] { - "" + "state = \"confirmed\" AND kind = \"domain\"", + "state = \"confirmed\" AND kind = \"host\"", + "state = \"confirmed\" AND kind = \"page\"" }, - groupBy = "", - segmentBy = "", - labelName = "", }); Response response = await client.GetSummaryAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("updatedAt").ToString()); -Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("metricCategory").ToString()); -Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("metric").ToString()); -Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("filter").ToString()); -Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("labelName").ToString()); -Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("count").ToString()); -Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("link").ToString()); -Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("children")[0].GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("children")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("children")[0].GetProperty("updatedAt").ToString()); -Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("children")[0].GetProperty("metricCategory").ToString()); -Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("children")[0].GetProperty("metric").ToString()); -Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("children")[0].GetProperty("filter").ToString()); -Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("children")[0].GetProperty("labelName").ToString()); -Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("children")[0].GetProperty("count").ToString()); -Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("children")[0].GetProperty("link").ToString()); +Console.WriteLine(result.ToString()); ]]> This sample shows how to call GetSummary and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -EasmClient client = new EasmClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new object()); -Response response = client.GetSummary(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetSummary with all request content and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - metricCategories = new object[] - { - "" - }, - metrics = new object[] - { - "" - }, filters = new object[] { - "" + "state = \"confirmed\" AND kind = \"domain\"", + "state = \"confirmed\" AND kind = \"host\"", + "state = \"confirmed\" AND kind = \"page\"" }, - groupBy = "", - segmentBy = "", - labelName = "", }); Response response = client.GetSummary(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("updatedAt").ToString()); -Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("metricCategory").ToString()); -Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("metric").ToString()); -Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("filter").ToString()); -Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("labelName").ToString()); -Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("count").ToString()); -Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("link").ToString()); -Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("children")[0].GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("children")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("children")[0].GetProperty("updatedAt").ToString()); -Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("children")[0].GetProperty("metricCategory").ToString()); -Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("children")[0].GetProperty("metric").ToString()); -Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("children")[0].GetProperty("filter").ToString()); -Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("children")[0].GetProperty("labelName").ToString()); -Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("children")[0].GetProperty("count").ToString()); -Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("children")[0].GetProperty("link").ToString()); +Console.WriteLine(result.ToString()); ]]> This sample shows how to call GetSavedFilterAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -EasmClient client = new EasmClient(endpoint, credential); - -Response response = await client.GetSavedFilterAsync(""); -]]> -This sample shows how to call GetSavedFilterAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -Response response = await client.GetSavedFilterAsync(""); +Response response = await client.GetSavedFilterAsync("ThisisaSavedFilter"); ]]> This sample shows how to call GetSavedFilter. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -Response response = client.GetSavedFilter(""); -]]> -This sample shows how to call GetSavedFilter with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -EasmClient client = new EasmClient(endpoint, credential); - -Response response = client.GetSavedFilter(""); +Response response = client.GetSavedFilter("ThisisaSavedFilter"); ]]> This sample shows how to call GetSavedFilterAsync and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -EasmClient client = new EasmClient(endpoint, credential); - -Response response = await client.GetSavedFilterAsync("", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("name").ToString()); -]]> -This sample shows how to call GetSavedFilterAsync with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -Response response = await client.GetSavedFilterAsync("", null); +Response response = await client.GetSavedFilterAsync("ThisisaSavedFilter", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("filter").ToString()); -Console.WriteLine(result.GetProperty("description").ToString()); ]]> This sample shows how to call GetSavedFilter and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -EasmClient client = new EasmClient(endpoint, credential); - -Response response = client.GetSavedFilter("", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("name").ToString()); -]]> -This sample shows how to call GetSavedFilter with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -Response response = client.GetSavedFilter("", null); +Response response = client.GetSavedFilter("ThisisaSavedFilter", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("filter").ToString()); -Console.WriteLine(result.GetProperty("description").ToString()); ]]> This sample shows how to call CreateOrReplaceSavedFilterAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -EasmClient client = new EasmClient(endpoint, credential); - -SavedFilterPayload body = new SavedFilterPayload("", ""); -Response response = await client.CreateOrReplaceSavedFilterAsync("", body); -]]> -This sample shows how to call CreateOrReplaceSavedFilterAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -SavedFilterPayload body = new SavedFilterPayload("", ""); -Response response = await client.CreateOrReplaceSavedFilterAsync("", body); +SavedFilterPayload body = new SavedFilterPayload("state IN (\"confirmed\")", "This is a saved filter"); +Response response = await client.CreateOrReplaceSavedFilterAsync("ThisisaSavedFilter", body); ]]> This sample shows how to call CreateOrReplaceSavedFilter. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -SavedFilterPayload body = new SavedFilterPayload("", ""); -Response response = client.CreateOrReplaceSavedFilter("", body); -]]> -This sample shows how to call CreateOrReplaceSavedFilter with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -EasmClient client = new EasmClient(endpoint, credential); - -SavedFilterPayload body = new SavedFilterPayload("", ""); -Response response = client.CreateOrReplaceSavedFilter("", body); +SavedFilterPayload body = new SavedFilterPayload("state IN (\"confirmed\")", "This is a saved filter"); +Response response = client.CreateOrReplaceSavedFilter("ThisisaSavedFilter", body); ]]> This sample shows how to call CreateOrReplaceSavedFilterAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - filter = "", - description = "", -}); -Response response = await client.CreateOrReplaceSavedFilterAsync("", content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("name").ToString()); -]]> -This sample shows how to call CreateOrReplaceSavedFilterAsync with all parameters and request content and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -EasmClient client = new EasmClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - filter = "", - description = "", + filter = "state IN (\"confirmed\")", + description = "This is a saved filter", }); -Response response = await client.CreateOrReplaceSavedFilterAsync("", content); +Response response = await client.CreateOrReplaceSavedFilterAsync("ThisisaSavedFilter", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("filter").ToString()); -Console.WriteLine(result.GetProperty("description").ToString()); ]]> This sample shows how to call CreateOrReplaceSavedFilter and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - filter = "", - description = "", + filter = "state IN (\"confirmed\")", + description = "This is a saved filter", }); -Response response = client.CreateOrReplaceSavedFilter("", content); +Response response = client.CreateOrReplaceSavedFilter("ThisisaSavedFilter", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); -]]> -This sample shows how to call CreateOrReplaceSavedFilter with all parameters and request content and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -EasmClient client = new EasmClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - filter = "", - description = "", -}); -Response response = client.CreateOrReplaceSavedFilter("", content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("filter").ToString()); -Console.WriteLine(result.GetProperty("description").ToString()); ]]> This sample shows how to call DeleteSavedFilterAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -Response response = await client.DeleteSavedFilterAsync(""); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call DeleteSavedFilterAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -EasmClient client = new EasmClient(endpoint, credential); - -Response response = await client.DeleteSavedFilterAsync(""); +Response response = await client.DeleteSavedFilterAsync("ThisisaSavedFilter"); Console.WriteLine(response.Status); ]]> @@ -2126,21 +1414,11 @@ Console.WriteLine(response.Status); This sample shows how to call DeleteSavedFilter. "); -TokenCredential credential = new DefaultAzureCredential(); -EasmClient client = new EasmClient(endpoint, credential); - -Response response = client.DeleteSavedFilter(""); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call DeleteSavedFilter with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -Response response = client.DeleteSavedFilter(""); +Response response = client.DeleteSavedFilter("ThisisaSavedFilter"); Console.WriteLine(response.Status); ]]> @@ -2149,393 +1427,191 @@ Console.WriteLine(response.Status); This sample shows how to call GetTaskAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -Response response = await client.GetTaskAsync(""); -]]> -This sample shows how to call GetTaskAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -EasmClient client = new EasmClient(endpoint, credential); - -Response response = await client.GetTaskAsync(""); +Response response = await client.GetTaskAsync("ThisisaTaskId"); ]]> This sample shows how to call GetTask. "); -TokenCredential credential = new DefaultAzureCredential(); -EasmClient client = new EasmClient(endpoint, credential); - -Response response = client.GetTask(""); -]]> -This sample shows how to call GetTask with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -Response response = client.GetTask(""); +Response response = client.GetTask("ThisisaTaskId"); ]]> This sample shows how to call GetTaskAsync and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -EasmClient client = new EasmClient(endpoint, credential); - -Response response = await client.GetTaskAsync("", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("id").ToString()); -]]> -This sample shows how to call GetTaskAsync with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -Response response = await client.GetTaskAsync("", null); +Response response = await client.GetTaskAsync("ThisisaTaskId", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("startedAt").ToString()); -Console.WriteLine(result.GetProperty("completedAt").ToString()); -Console.WriteLine(result.GetProperty("lastPolledAt").ToString()); -Console.WriteLine(result.GetProperty("state").ToString()); -Console.WriteLine(result.GetProperty("phase").ToString()); -Console.WriteLine(result.GetProperty("reason").ToString()); -Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); ]]> This sample shows how to call GetTask and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -Response response = client.GetTask("", null); +Response response = client.GetTask("ThisisaTaskId", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); -]]> -This sample shows how to call GetTask with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -EasmClient client = new EasmClient(endpoint, credential); - -Response response = client.GetTask("", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("startedAt").ToString()); -Console.WriteLine(result.GetProperty("completedAt").ToString()); -Console.WriteLine(result.GetProperty("lastPolledAt").ToString()); -Console.WriteLine(result.GetProperty("state").ToString()); -Console.WriteLine(result.GetProperty("phase").ToString()); -Console.WriteLine(result.GetProperty("reason").ToString()); -Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); ]]> This sample shows how to call CancelTaskAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -EasmClient client = new EasmClient(endpoint, credential); - -Response response = await client.CancelTaskAsync(""); -]]> -This sample shows how to call CancelTaskAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -Response response = await client.CancelTaskAsync(""); +Response response = await client.CancelTaskAsync("ThisisaTaskId"); ]]> This sample shows how to call CancelTask. "); -TokenCredential credential = new DefaultAzureCredential(); -EasmClient client = new EasmClient(endpoint, credential); - -Response response = client.CancelTask(""); -]]> -This sample shows how to call CancelTask with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -Response response = client.CancelTask(""); +Response response = client.CancelTask("ThisisaTaskId"); ]]> This sample shows how to call CancelTaskAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -Response response = await client.CancelTaskAsync("", null); +Response response = await client.CancelTaskAsync("ThisisaTaskId", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); -]]> -This sample shows how to call CancelTaskAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -EasmClient client = new EasmClient(endpoint, credential); - -Response response = await client.CancelTaskAsync("", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("startedAt").ToString()); -Console.WriteLine(result.GetProperty("completedAt").ToString()); -Console.WriteLine(result.GetProperty("lastPolledAt").ToString()); -Console.WriteLine(result.GetProperty("state").ToString()); -Console.WriteLine(result.GetProperty("phase").ToString()); -Console.WriteLine(result.GetProperty("reason").ToString()); -Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); ]]> This sample shows how to call CancelTask and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -Response response = client.CancelTask("", null); +Response response = client.CancelTask("ThisisaTaskId", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); -]]> -This sample shows how to call CancelTask with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -EasmClient client = new EasmClient(endpoint, credential); - -Response response = client.CancelTask("", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("startedAt").ToString()); -Console.WriteLine(result.GetProperty("completedAt").ToString()); -Console.WriteLine(result.GetProperty("lastPolledAt").ToString()); -Console.WriteLine(result.GetProperty("state").ToString()); -Console.WriteLine(result.GetProperty("phase").ToString()); -Console.WriteLine(result.GetProperty("reason").ToString()); -Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); ]]> This sample shows how to call GetAssetResourcesAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); await foreach (AssetResource item in client.GetAssetResourcesAsync()) { } -]]> -This sample shows how to call GetAssetResourcesAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -EasmClient client = new EasmClient(endpoint, credential); - -await foreach (AssetResource item in client.GetAssetResourcesAsync(filter: "", orderby: "", skip: 1234, maxpagesize: 1234, mark: "")) -{ -} ]]> This sample shows how to call GetAssetResources. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); foreach (AssetResource item in client.GetAssetResources()) { } -]]> -This sample shows how to call GetAssetResources with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -EasmClient client = new EasmClient(endpoint, credential); - -foreach (AssetResource item in client.GetAssetResources(filter: "", orderby: "", skip: 1234, maxpagesize: 1234, mark: "")) -{ -} ]]> This sample shows how to call GetAssetResourcesAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -await foreach (BinaryData item in client.GetAssetResourcesAsync(null, null, null, null, null, null)) +await foreach (BinaryData item in client.GetAssetResourcesAsync("state%20%3D%20%22confirmed%22", null, 0, 5, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("kind").ToString()); Console.WriteLine(result.GetProperty("id").ToString()); } -]]> -This sample shows how to call GetAssetResourcesAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -EasmClient client = new EasmClient(endpoint, credential); - -await foreach (BinaryData item in client.GetAssetResourcesAsync("", "", 1234, 1234, "", null)) -{ - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("uuid").ToString()); - Console.WriteLine(result.GetProperty("createdDate").ToString()); - Console.WriteLine(result.GetProperty("updatedDate").ToString()); - Console.WriteLine(result.GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("externalId").ToString()); - Console.WriteLine(result.GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("wildcard").ToString()); - Console.WriteLine(result.GetProperty("discoGroupName").ToString()); - Console.WriteLine(result.GetProperty("auditTrail")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("auditTrail")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("auditTrail")[0].GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("auditTrail")[0].GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("auditTrail")[0].GetProperty("reason").ToString()); - Console.WriteLine(result.GetProperty("reason").ToString()); -} ]]> This sample shows how to call GetAssetResources and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -foreach (BinaryData item in client.GetAssetResources(null, null, null, null, null, null)) +foreach (BinaryData item in client.GetAssetResources("state%20%3D%20%22confirmed%22", null, 0, 5, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("kind").ToString()); Console.WriteLine(result.GetProperty("id").ToString()); } -]]> -This sample shows how to call GetAssetResources with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -EasmClient client = new EasmClient(endpoint, credential); - -foreach (BinaryData item in client.GetAssetResources("", "", 1234, 1234, "", null)) -{ - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("uuid").ToString()); - Console.WriteLine(result.GetProperty("createdDate").ToString()); - Console.WriteLine(result.GetProperty("updatedDate").ToString()); - Console.WriteLine(result.GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("externalId").ToString()); - Console.WriteLine(result.GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("wildcard").ToString()); - Console.WriteLine(result.GetProperty("discoGroupName").ToString()); - Console.WriteLine(result.GetProperty("auditTrail")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("auditTrail")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("auditTrail")[0].GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("auditTrail")[0].GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("auditTrail")[0].GetProperty("reason").ToString()); - Console.WriteLine(result.GetProperty("reason").ToString()); -} ]]> This sample shows how to call GetDataConnectionsAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); await foreach (DataConnection item in client.GetDataConnectionsAsync()) { } -]]> -This sample shows how to call GetDataConnectionsAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -EasmClient client = new EasmClient(endpoint, credential); - -await foreach (DataConnection item in client.GetDataConnectionsAsync(skip: 1234, maxpagesize: 1234)) -{ -} ]]> This sample shows how to call GetDataConnections. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); foreach (DataConnection item in client.GetDataConnections()) { } -]]> -This sample shows how to call GetDataConnections with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -EasmClient client = new EasmClient(endpoint, credential); - -foreach (DataConnection item in client.GetDataConnections(skip: 1234, maxpagesize: 1234)) -{ -} ]]> This sample shows how to call GetDataConnectionsAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); @@ -2545,36 +1621,13 @@ await foreach (BinaryData item in client.GetDataConnectionsAsync(null, null, nul Console.WriteLine(result.GetProperty("kind").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); } -]]> -This sample shows how to call GetDataConnectionsAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -EasmClient client = new EasmClient(endpoint, credential); - -await foreach (BinaryData item in client.GetDataConnectionsAsync(1234, 1234, null)) -{ - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("content").ToString()); - Console.WriteLine(result.GetProperty("createdDate").ToString()); - Console.WriteLine(result.GetProperty("frequency").ToString()); - Console.WriteLine(result.GetProperty("frequencyOffset").ToString()); - Console.WriteLine(result.GetProperty("updatedDate").ToString()); - Console.WriteLine(result.GetProperty("userUpdatedAt").ToString()); - Console.WriteLine(result.GetProperty("active").ToString()); - Console.WriteLine(result.GetProperty("inactiveMessage").ToString()); -} ]]> This sample shows how to call GetDataConnections and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); @@ -2584,29 +1637,6 @@ foreach (BinaryData item in client.GetDataConnections(null, null, null)) Console.WriteLine(result.GetProperty("kind").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); } -]]> -This sample shows how to call GetDataConnections with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -EasmClient client = new EasmClient(endpoint, credential); - -foreach (BinaryData item in client.GetDataConnections(1234, 1234, null)) -{ - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("content").ToString()); - Console.WriteLine(result.GetProperty("createdDate").ToString()); - Console.WriteLine(result.GetProperty("frequency").ToString()); - Console.WriteLine(result.GetProperty("frequencyOffset").ToString()); - Console.WriteLine(result.GetProperty("updatedDate").ToString()); - Console.WriteLine(result.GetProperty("userUpdatedAt").ToString()); - Console.WriteLine(result.GetProperty("active").ToString()); - Console.WriteLine(result.GetProperty("inactiveMessage").ToString()); -} ]]> @@ -2999,53 +2029,33 @@ foreach (BinaryData item in client.GetDiscoveryTemplates("", 1234, 1234, This sample shows how to call GetSavedFiltersAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); await foreach (SavedFilter item in client.GetSavedFiltersAsync()) { } -]]> -This sample shows how to call GetSavedFiltersAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -EasmClient client = new EasmClient(endpoint, credential); - -await foreach (SavedFilter item in client.GetSavedFiltersAsync(filter: "", skip: 1234, maxpagesize: 1234)) -{ -} ]]> This sample shows how to call GetSavedFilters. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); foreach (SavedFilter item in client.GetSavedFilters()) { } -]]> -This sample shows how to call GetSavedFilters with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -EasmClient client = new EasmClient(endpoint, credential); - -foreach (SavedFilter item in client.GetSavedFilters(filter: "", skip: 1234, maxpagesize: 1234)) -{ -} ]]> This sample shows how to call GetSavedFiltersAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); @@ -3054,29 +2064,13 @@ await foreach (BinaryData item in client.GetSavedFiltersAsync(null, null, null, JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); } -]]> -This sample shows how to call GetSavedFiltersAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -EasmClient client = new EasmClient(endpoint, credential); - -await foreach (BinaryData item in client.GetSavedFiltersAsync("", 1234, 1234, null)) -{ - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("filter").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); -} ]]> This sample shows how to call GetSavedFilters and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); @@ -3085,75 +2079,39 @@ foreach (BinaryData item in client.GetSavedFilters(null, null, null, null)) JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); } -]]> -This sample shows how to call GetSavedFilters with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -EasmClient client = new EasmClient(endpoint, credential); - -foreach (BinaryData item in client.GetSavedFilters("", 1234, 1234, null)) -{ - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("filter").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); -} ]]> This sample shows how to call GetTasksAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); await foreach (TaskResource item in client.GetTasksAsync()) { } -]]> -This sample shows how to call GetTasksAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -EasmClient client = new EasmClient(endpoint, credential); - -await foreach (TaskResource item in client.GetTasksAsync(filter: "", orderby: "", skip: 1234, maxpagesize: 1234)) -{ -} ]]> This sample shows how to call GetTasks. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); foreach (TaskResource item in client.GetTasks()) { } -]]> -This sample shows how to call GetTasks with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -EasmClient client = new EasmClient(endpoint, credential); - -foreach (TaskResource item in client.GetTasks(filter: "", orderby: "", skip: 1234, maxpagesize: 1234)) -{ -} ]]> This sample shows how to call GetTasksAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); @@ -3162,32 +2120,13 @@ await foreach (BinaryData item in client.GetTasksAsync(null, null, null, null, n JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); } -]]> -This sample shows how to call GetTasksAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -EasmClient client = new EasmClient(endpoint, credential); - -await foreach (BinaryData item in client.GetTasksAsync("", "", 1234, 1234, null)) -{ - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("startedAt").ToString()); - Console.WriteLine(result.GetProperty("completedAt").ToString()); - Console.WriteLine(result.GetProperty("lastPolledAt").ToString()); - Console.WriteLine(result.GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("phase").ToString()); - Console.WriteLine(result.GetProperty("reason").ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); -} ]]> This sample shows how to call GetTasks and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); @@ -3196,25 +2135,6 @@ foreach (BinaryData item in client.GetTasks(null, null, null, null, null)) JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); } -]]> -This sample shows how to call GetTasks with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -EasmClient client = new EasmClient(endpoint, credential); - -foreach (BinaryData item in client.GetTasks("", "", 1234, 1234, null)) -{ - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("startedAt").ToString()); - Console.WriteLine(result.GetProperty("completedAt").ToString()); - Console.WriteLine(result.GetProperty("lastPolledAt").ToString()); - Console.WriteLine(result.GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("phase").ToString()); - Console.WriteLine(result.GetProperty("reason").ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); -} ]]> diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/tests/Generated/Samples/Samples_EasmClient.cs b/sdk/easm/Azure.Analytics.Defender.Easm/tests/Generated/Samples/Samples_EasmClient.cs index b2dafd89b006..68a001e1a109 100644 --- a/sdk/easm/Azure.Analytics.Defender.Easm/tests/Generated/Samples/Samples_EasmClient.cs +++ b/sdk/easm/Azure.Analytics.Defender.Easm/tests/Generated/Samples/Samples_EasmClient.cs @@ -18,171 +18,99 @@ public partial class Samples_EasmClient { [Test] [Ignore("Only validating compilation of examples")] - public void Example_AssetResource_UpdateAssets_ShortVersion() + public void Example_AssetResource_UpdateAssets_AssetsUpdateAssets() { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - EasmClient client = new EasmClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new object()); - Response response = client.UpdateAssets("", content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_AssetResource_UpdateAssets_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - EasmClient client = new EasmClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new object()); - Response response = await client.UpdateAssetsAsync("", content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_AssetResource_UpdateAssets_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - EasmClient client = new EasmClient(endpoint, credential); - - AssetUpdatePayload body = new AssetUpdatePayload(); - Response response = client.UpdateAssets("", body); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_AssetResource_UpdateAssets_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - EasmClient client = new EasmClient(endpoint, credential); - - AssetUpdatePayload body = new AssetUpdatePayload(); - Response response = await client.UpdateAssetsAsync("", body); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_AssetResource_UpdateAssets_AllParameters() - { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - state = "candidate", - externalId = "", + state = "confirmed", + externalId = "contosoInternalId", labels = new { - key = true, + contosoLabel = true, }, - transfers = "as", }); - Response response = client.UpdateAssets("", content); + Response response = client.UpdateAssets("state%20%3D%20%22confirmed%22%20AND%20name%20%5E%3D%20%22contoso.com%22", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("startedAt").ToString()); - Console.WriteLine(result.GetProperty("completedAt").ToString()); - Console.WriteLine(result.GetProperty("lastPolledAt").ToString()); - Console.WriteLine(result.GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("phase").ToString()); - Console.WriteLine(result.GetProperty("reason").ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_AssetResource_UpdateAssets_AllParameters_Async() + public async Task Example_AssetResource_UpdateAssets_AssetsUpdateAssets_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - state = "candidate", - externalId = "", + state = "confirmed", + externalId = "contosoInternalId", labels = new { - key = true, + contosoLabel = true, }, - transfers = "as", }); - Response response = await client.UpdateAssetsAsync("", content); + Response response = await client.UpdateAssetsAsync("state%20%3D%20%22confirmed%22%20AND%20name%20%5E%3D%20%22contoso.com%22", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("startedAt").ToString()); - Console.WriteLine(result.GetProperty("completedAt").ToString()); - Console.WriteLine(result.GetProperty("lastPolledAt").ToString()); - Console.WriteLine(result.GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("phase").ToString()); - Console.WriteLine(result.GetProperty("reason").ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_AssetResource_UpdateAssets_AllParameters_Convenience() + public void Example_AssetResource_UpdateAssets_AssetsUpdateAssets_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); AssetUpdatePayload body = new AssetUpdatePayload { - State = AssetUpdateState.Candidate, - ExternalId = "", + State = AssetUpdateState.Confirmed, + ExternalId = "contosoInternalId", Labels = { -["key"] = true +["contosoLabel"] = true }, - Transfers = AssetUpdateTransfers.As, }; - Response response = client.UpdateAssets("", body); + Response response = client.UpdateAssets("state%20%3D%20%22confirmed%22%20AND%20name%20%5E%3D%20%22contoso.com%22", body); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_AssetResource_UpdateAssets_AllParameters_Convenience_Async() + public async Task Example_AssetResource_UpdateAssets_AssetsUpdateAssets_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); AssetUpdatePayload body = new AssetUpdatePayload { - State = AssetUpdateState.Candidate, - ExternalId = "", + State = AssetUpdateState.Confirmed, + ExternalId = "contosoInternalId", Labels = { -["key"] = true +["contosoLabel"] = true }, - Transfers = AssetUpdateTransfers.As, }; - Response response = await client.UpdateAssetsAsync("", body); + Response response = await client.UpdateAssetsAsync("state%20%3D%20%22confirmed%22%20AND%20name%20%5E%3D%20%22contoso.com%22", body); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_AssetResource_GetAssetResource_ShortVersion() + public void Example_AssetResource_GetAssetResource_AssetsGetAssetResource() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = client.GetAssetResource("", null); + Response response = client.GetAssetResource("aG9zdCQkY29udG9zby5jb20", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("kind").ToString()); @@ -191,13 +119,13 @@ public void Example_AssetResource_GetAssetResource_ShortVersion() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_AssetResource_GetAssetResource_ShortVersion_Async() + public async Task Example_AssetResource_GetAssetResource_AssetsGetAssetResource_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = await client.GetAssetResourceAsync("", null); + Response response = await client.GetAssetResourceAsync("aG9zdCQkY29udG9zby5jb20", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("kind").ToString()); @@ -206,177 +134,177 @@ public async Task Example_AssetResource_GetAssetResource_ShortVersion_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_AssetResource_GetAssetResource_ShortVersion_Convenience() + public void Example_AssetResource_GetAssetResource_AssetsGetAssetResource_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = client.GetAssetResource(""); + Response response = client.GetAssetResource("aG9zdCQkY29udG9zby5jb20"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_AssetResource_GetAssetResource_ShortVersion_Convenience_Async() + public async Task Example_AssetResource_GetAssetResource_AssetsGetAssetResource_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = await client.GetAssetResourceAsync(""); + Response response = await client.GetAssetResourceAsync("aG9zdCQkY29udG9zby5jb20"); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_AssetResource_GetAssetResource_AllParameters() + public void Example_EasmClient_ValidateDataConnection_DataConnectionsValidateDataConnection() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = client.GetAssetResource("", null); + using RequestContent content = RequestContent.Create(new + { + kind = "logAnalytics", + properties = new + { + apiKey = "ThisisApiKey", + workspaceId = "ThisisWorkspaceId", + }, + frequency = "weekly", + frequencyOffset = 1, + name = "ThisisaDataConnection", + }); + Response response = client.ValidateDataConnection(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("uuid").ToString()); - Console.WriteLine(result.GetProperty("createdDate").ToString()); - Console.WriteLine(result.GetProperty("updatedDate").ToString()); - Console.WriteLine(result.GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("externalId").ToString()); - Console.WriteLine(result.GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("wildcard").ToString()); - Console.WriteLine(result.GetProperty("discoGroupName").ToString()); - Console.WriteLine(result.GetProperty("auditTrail")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("auditTrail")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("auditTrail")[0].GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("auditTrail")[0].GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("auditTrail")[0].GetProperty("reason").ToString()); - Console.WriteLine(result.GetProperty("reason").ToString()); + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_AssetResource_GetAssetResource_AllParameters_Async() + public async Task Example_EasmClient_ValidateDataConnection_DataConnectionsValidateDataConnection_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = await client.GetAssetResourceAsync("", null); + using RequestContent content = RequestContent.Create(new + { + kind = "logAnalytics", + properties = new + { + apiKey = "ThisisApiKey", + workspaceId = "ThisisWorkspaceId", + }, + frequency = "weekly", + frequencyOffset = 1, + name = "ThisisaDataConnection", + }); + Response response = await client.ValidateDataConnectionAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("uuid").ToString()); - Console.WriteLine(result.GetProperty("createdDate").ToString()); - Console.WriteLine(result.GetProperty("updatedDate").ToString()); - Console.WriteLine(result.GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("externalId").ToString()); - Console.WriteLine(result.GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("wildcard").ToString()); - Console.WriteLine(result.GetProperty("discoGroupName").ToString()); - Console.WriteLine(result.GetProperty("auditTrail")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("auditTrail")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("auditTrail")[0].GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("auditTrail")[0].GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("auditTrail")[0].GetProperty("reason").ToString()); - Console.WriteLine(result.GetProperty("reason").ToString()); + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_AssetResource_GetAssetResource_AllParameters_Convenience() + public void Example_EasmClient_ValidateDataConnection_DataConnectionsValidateDataConnection_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = client.GetAssetResource(""); + DataConnectionPayload body = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties + { + ApiKey = "ThisisApiKey", + WorkspaceId = "ThisisWorkspaceId", + }) + { + Name = "ThisisaDataConnection", + Frequency = DataConnectionFrequency.Weekly, + FrequencyOffset = 1, + }; + Response response = client.ValidateDataConnection(body); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_AssetResource_GetAssetResource_AllParameters_Convenience_Async() + public async Task Example_EasmClient_ValidateDataConnection_DataConnectionsValidateDataConnection_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = await client.GetAssetResourceAsync(""); + DataConnectionPayload body = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties + { + ApiKey = "ThisisApiKey", + WorkspaceId = "ThisisWorkspaceId", + }) + { + Name = "ThisisaDataConnection", + Frequency = DataConnectionFrequency.Weekly, + FrequencyOffset = 1, + }; + Response response = await client.ValidateDataConnectionAsync(body); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_EasmClient_ValidateDataConnection_ShortVersion() + public void Example_DataConnection_GetDataConnection_DataConnectionsGetDataConnection() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - using RequestContent content = RequestContent.Create(new - { - kind = "logAnalytics", - properties = new object(), - }); - Response response = client.ValidateDataConnection(content); + Response response = client.GetDataConnection("ThisisaDataConnection", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_EasmClient_ValidateDataConnection_ShortVersion_Async() + public async Task Example_DataConnection_GetDataConnection_DataConnectionsGetDataConnection_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - using RequestContent content = RequestContent.Create(new - { - kind = "logAnalytics", - properties = new object(), - }); - Response response = await client.ValidateDataConnectionAsync(content); + Response response = await client.GetDataConnectionAsync("ThisisaDataConnection", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_EasmClient_ValidateDataConnection_ShortVersion_Convenience() + public void Example_DataConnection_GetDataConnection_DataConnectionsGetDataConnection_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - DataConnectionPayload body = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties()); - Response response = client.ValidateDataConnection(body); + Response response = client.GetDataConnection("ThisisaDataConnection"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_EasmClient_ValidateDataConnection_ShortVersion_Convenience_Async() + public async Task Example_DataConnection_GetDataConnection_DataConnectionsGetDataConnection_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - DataConnectionPayload body = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties()); - Response response = await client.ValidateDataConnectionAsync(body); + Response response = await client.GetDataConnectionAsync("ThisisaDataConnection"); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_EasmClient_ValidateDataConnection_AllParameters() + public void Example_DataConnection_CreateOrReplaceDataConnection_DataConnectionsCreateOrReplaceDataConnection() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); @@ -385,29 +313,24 @@ public void Example_EasmClient_ValidateDataConnection_AllParameters() kind = "logAnalytics", properties = new { - apiKey = "", - workspaceId = "", + apiKey = "ThisisApiKey", + workspaceId = "ThisisWorkspaceId", }, - name = "", - content = "assets", - frequency = "daily", - frequencyOffset = 1234, + frequency = "weekly", + frequencyOffset = 1, }); - Response response = client.ValidateDataConnection(content); + Response response = client.CreateOrReplaceDataConnection("ThisisaDataConnection", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_EasmClient_ValidateDataConnection_AllParameters_Async() + public async Task Example_DataConnection_CreateOrReplaceDataConnection_DataConnectionsCreateOrReplaceDataConnection_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); @@ -416,195 +339,184 @@ public async Task Example_EasmClient_ValidateDataConnection_AllParameters_Async( kind = "logAnalytics", properties = new { - apiKey = "", - workspaceId = "", + apiKey = "ThisisApiKey", + workspaceId = "ThisisWorkspaceId", }, - name = "", - content = "assets", - frequency = "daily", - frequencyOffset = 1234, + frequency = "weekly", + frequencyOffset = 1, }); - Response response = await client.ValidateDataConnectionAsync(content); + Response response = await client.CreateOrReplaceDataConnectionAsync("ThisisaDataConnection", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_EasmClient_ValidateDataConnection_AllParameters_Convenience() + public void Example_DataConnection_CreateOrReplaceDataConnection_DataConnectionsCreateOrReplaceDataConnection_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); DataConnectionPayload body = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties { - ApiKey = "", - WorkspaceId = "", + ApiKey = "ThisisApiKey", + WorkspaceId = "ThisisWorkspaceId", }) { - Name = "", - Content = DataConnectionContent.Assets, - Frequency = DataConnectionFrequency.Daily, - FrequencyOffset = 1234, + Frequency = DataConnectionFrequency.Weekly, + FrequencyOffset = 1, }; - Response response = client.ValidateDataConnection(body); + Response response = client.CreateOrReplaceDataConnection("ThisisaDataConnection", body); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_EasmClient_ValidateDataConnection_AllParameters_Convenience_Async() + public async Task Example_DataConnection_CreateOrReplaceDataConnection_DataConnectionsCreateOrReplaceDataConnection_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); DataConnectionPayload body = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties { - ApiKey = "", - WorkspaceId = "", + ApiKey = "ThisisApiKey", + WorkspaceId = "ThisisWorkspaceId", }) { - Name = "", - Content = DataConnectionContent.Assets, - Frequency = DataConnectionFrequency.Daily, - FrequencyOffset = 1234, + Frequency = DataConnectionFrequency.Weekly, + FrequencyOffset = 1, }; - Response response = await client.ValidateDataConnectionAsync(body); + Response response = await client.CreateOrReplaceDataConnectionAsync("ThisisaDataConnection", body); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DataConnection_GetDataConnection_ShortVersion() + public void Example_DataConnection_DeleteDataConnection_DataConnectionsDeleteDataConnection() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = client.GetDataConnection("", null); + Response response = client.DeleteDataConnection("ThisisaDataConnection"); - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DataConnection_GetDataConnection_ShortVersion_Async() + public async Task Example_DataConnection_DeleteDataConnection_DataConnectionsDeleteDataConnection_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = await client.GetDataConnectionAsync("", null); + Response response = await client.DeleteDataConnectionAsync("ThisisaDataConnection"); - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DataConnection_GetDataConnection_ShortVersion_Convenience() + public void Example_EasmClient_ValidateDiscoveryGroup_ShortVersion() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = client.GetDataConnection(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DataConnection_GetDataConnection_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - EasmClient client = new EasmClient(endpoint, credential); + using RequestContent content = RequestContent.Create(new object()); + Response response = client.ValidateDiscoveryGroup(content); - Response response = await client.GetDataConnectionAsync(""); + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DataConnection_GetDataConnection_AllParameters() + public async Task Example_EasmClient_ValidateDiscoveryGroup_ShortVersion_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = client.GetDataConnection("", null); + using RequestContent content = RequestContent.Create(new object()); + Response response = await client.ValidateDiscoveryGroupAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("content").ToString()); - Console.WriteLine(result.GetProperty("createdDate").ToString()); - Console.WriteLine(result.GetProperty("frequency").ToString()); - Console.WriteLine(result.GetProperty("frequencyOffset").ToString()); - Console.WriteLine(result.GetProperty("updatedDate").ToString()); - Console.WriteLine(result.GetProperty("userUpdatedAt").ToString()); - Console.WriteLine(result.GetProperty("active").ToString()); - Console.WriteLine(result.GetProperty("inactiveMessage").ToString()); + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DataConnection_GetDataConnection_AllParameters_Async() + public void Example_EasmClient_ValidateDiscoveryGroup_ShortVersion_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = await client.GetDataConnectionAsync("", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("content").ToString()); - Console.WriteLine(result.GetProperty("createdDate").ToString()); - Console.WriteLine(result.GetProperty("frequency").ToString()); - Console.WriteLine(result.GetProperty("frequencyOffset").ToString()); - Console.WriteLine(result.GetProperty("updatedDate").ToString()); - Console.WriteLine(result.GetProperty("userUpdatedAt").ToString()); - Console.WriteLine(result.GetProperty("active").ToString()); - Console.WriteLine(result.GetProperty("inactiveMessage").ToString()); + DiscoveryGroupPayload body = new DiscoveryGroupPayload(); + Response response = client.ValidateDiscoveryGroup(body); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DataConnection_GetDataConnection_AllParameters_Convenience() + public async Task Example_EasmClient_ValidateDiscoveryGroup_ShortVersion_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = client.GetDataConnection(""); + DiscoveryGroupPayload body = new DiscoveryGroupPayload(); + Response response = await client.ValidateDiscoveryGroupAsync(body); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DataConnection_GetDataConnection_AllParameters_Convenience_Async() + public void Example_EasmClient_ValidateDiscoveryGroup_AllParameters() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = await client.GetDataConnectionAsync(""); + using RequestContent content = RequestContent.Create(new + { + name = "", + description = "", + tier = "", + frequencyMilliseconds = 1234L, + seeds = new object[] + { +new +{ +kind = "as", +name = "", +} + }, + names = new object[] + { +"" + }, + excludes = new object[] + { +null + }, + templateId = "", + }); + Response response = client.ValidateDiscoveryGroup(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("value").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DataConnection_CreateOrReplaceDataConnection_ShortVersion() + public async Task Example_EasmClient_ValidateDiscoveryGroup_AllParameters_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -612,289 +524,293 @@ public void Example_DataConnection_CreateOrReplaceDataConnection_ShortVersion() using RequestContent content = RequestContent.Create(new { - kind = "logAnalytics", - properties = new object(), + name = "", + description = "", + tier = "", + frequencyMilliseconds = 1234L, + seeds = new object[] + { +new +{ +kind = "as", +name = "", +} + }, + names = new object[] + { +"" + }, + excludes = new object[] + { +null + }, + templateId = "", }); - Response response = client.CreateOrReplaceDataConnection("", content); + Response response = await client.ValidateDiscoveryGroupAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("value").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DataConnection_CreateOrReplaceDataConnection_ShortVersion_Async() + public void Example_EasmClient_ValidateDiscoveryGroup_AllParameters_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - using RequestContent content = RequestContent.Create(new + DiscoveryGroupPayload body = new DiscoveryGroupPayload { - kind = "logAnalytics", - properties = new object(), - }); - Response response = await client.CreateOrReplaceDataConnectionAsync("", content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DataConnection_CreateOrReplaceDataConnection_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - EasmClient client = new EasmClient(endpoint, credential); - - DataConnectionPayload body = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties()); - Response response = client.CreateOrReplaceDataConnection("", body); + Name = "", + Description = "", + Tier = "", + FrequencyMilliseconds = 1234L, + Seeds = {new DiscoverySource +{ +Kind = DiscoverySourceKind.As, +Name = "", +}}, + Names = { "" }, + Excludes = { default }, + TemplateId = "", + }; + Response response = client.ValidateDiscoveryGroup(body); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DataConnection_CreateOrReplaceDataConnection_ShortVersion_Convenience_Async() + public async Task Example_EasmClient_ValidateDiscoveryGroup_AllParameters_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - DataConnectionPayload body = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties()); - Response response = await client.CreateOrReplaceDataConnectionAsync("", body); + DiscoveryGroupPayload body = new DiscoveryGroupPayload + { + Name = "", + Description = "", + Tier = "", + FrequencyMilliseconds = 1234L, + Seeds = {new DiscoverySource +{ +Kind = DiscoverySourceKind.As, +Name = "", +}}, + Names = { "" }, + Excludes = { default }, + TemplateId = "", + }; + Response response = await client.ValidateDiscoveryGroupAsync(body); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DataConnection_CreateOrReplaceDataConnection_AllParameters() + public void Example_DiscoGroup_GetDiscoveryGroup_ShortVersion() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - using RequestContent content = RequestContent.Create(new - { - kind = "logAnalytics", - properties = new - { - apiKey = "", - workspaceId = "", - }, - name = "", - content = "assets", - frequency = "daily", - frequencyOffset = 1234, - }); - Response response = client.CreateOrReplaceDataConnection("", content); + Response response = client.GetDiscoveryGroup("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("content").ToString()); - Console.WriteLine(result.GetProperty("createdDate").ToString()); - Console.WriteLine(result.GetProperty("frequency").ToString()); - Console.WriteLine(result.GetProperty("frequencyOffset").ToString()); - Console.WriteLine(result.GetProperty("updatedDate").ToString()); - Console.WriteLine(result.GetProperty("userUpdatedAt").ToString()); - Console.WriteLine(result.GetProperty("active").ToString()); - Console.WriteLine(result.GetProperty("inactiveMessage").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DataConnection_CreateOrReplaceDataConnection_AllParameters_Async() + public async Task Example_DiscoGroup_GetDiscoveryGroup_ShortVersion_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - using RequestContent content = RequestContent.Create(new - { - kind = "logAnalytics", - properties = new - { - apiKey = "", - workspaceId = "", - }, - name = "", - content = "assets", - frequency = "daily", - frequencyOffset = 1234, - }); - Response response = await client.CreateOrReplaceDataConnectionAsync("", content); + Response response = await client.GetDiscoveryGroupAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("content").ToString()); - Console.WriteLine(result.GetProperty("createdDate").ToString()); - Console.WriteLine(result.GetProperty("frequency").ToString()); - Console.WriteLine(result.GetProperty("frequencyOffset").ToString()); - Console.WriteLine(result.GetProperty("updatedDate").ToString()); - Console.WriteLine(result.GetProperty("userUpdatedAt").ToString()); - Console.WriteLine(result.GetProperty("active").ToString()); - Console.WriteLine(result.GetProperty("inactiveMessage").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DataConnection_CreateOrReplaceDataConnection_AllParameters_Convenience() + public void Example_DiscoGroup_GetDiscoveryGroup_ShortVersion_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - DataConnectionPayload body = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties - { - ApiKey = "", - WorkspaceId = "", - }) - { - Name = "", - Content = DataConnectionContent.Assets, - Frequency = DataConnectionFrequency.Daily, - FrequencyOffset = 1234, - }; - Response response = client.CreateOrReplaceDataConnection("", body); + Response response = client.GetDiscoveryGroup(""); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DataConnection_CreateOrReplaceDataConnection_AllParameters_Convenience_Async() + public async Task Example_DiscoGroup_GetDiscoveryGroup_ShortVersion_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - DataConnectionPayload body = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties - { - ApiKey = "", - WorkspaceId = "", - }) - { - Name = "", - Content = DataConnectionContent.Assets, - Frequency = DataConnectionFrequency.Daily, - FrequencyOffset = 1234, - }; - Response response = await client.CreateOrReplaceDataConnectionAsync("", body); + Response response = await client.GetDiscoveryGroupAsync(""); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DataConnection_DeleteDataConnection_ShortVersion() + public void Example_DiscoGroup_GetDiscoveryGroup_AllParameters() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = client.DeleteDataConnection(""); + Response response = client.GetDiscoveryGroup("", null); - Console.WriteLine(response.Status); + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("tier").ToString()); + Console.WriteLine(result.GetProperty("frequencyMilliseconds").ToString()); + Console.WriteLine(result.GetProperty("seeds")[0].GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("seeds")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("names")[0].ToString()); + Console.WriteLine(result.GetProperty("excludes")[0].GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("excludes")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("submittedDate").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("startedDate").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("completedDate").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("tier").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("totalAssetsFoundCount").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("seeds")[0].GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("seeds")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("excludes")[0].GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("excludes")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("names")[0].ToString()); + Console.WriteLine(result.GetProperty("createdDate").ToString()); + Console.WriteLine(result.GetProperty("templateId").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DataConnection_DeleteDataConnection_ShortVersion_Async() + public async Task Example_DiscoGroup_GetDiscoveryGroup_AllParameters_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = await client.DeleteDataConnectionAsync(""); + Response response = await client.GetDiscoveryGroupAsync("", null); - Console.WriteLine(response.Status); + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("tier").ToString()); + Console.WriteLine(result.GetProperty("frequencyMilliseconds").ToString()); + Console.WriteLine(result.GetProperty("seeds")[0].GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("seeds")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("names")[0].ToString()); + Console.WriteLine(result.GetProperty("excludes")[0].GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("excludes")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("submittedDate").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("startedDate").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("completedDate").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("tier").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("totalAssetsFoundCount").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("seeds")[0].GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("seeds")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("excludes")[0].GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("excludes")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("names")[0].ToString()); + Console.WriteLine(result.GetProperty("createdDate").ToString()); + Console.WriteLine(result.GetProperty("templateId").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DataConnection_DeleteDataConnection_AllParameters() + public void Example_DiscoGroup_GetDiscoveryGroup_AllParameters_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = client.DeleteDataConnection(""); - - Console.WriteLine(response.Status); + Response response = client.GetDiscoveryGroup(""); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DataConnection_DeleteDataConnection_AllParameters_Async() + public async Task Example_DiscoGroup_GetDiscoveryGroup_AllParameters_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = await client.DeleteDataConnectionAsync(""); - - Console.WriteLine(response.Status); + Response response = await client.GetDiscoveryGroupAsync(""); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_EasmClient_ValidateDiscoveryGroup_ShortVersion() + public void Example_DiscoGroup_CreateOrReplaceDiscoveryGroup_ShortVersion() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); using RequestContent content = RequestContent.Create(new object()); - Response response = client.ValidateDiscoveryGroup(content); + Response response = client.CreateOrReplaceDiscoveryGroup("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_EasmClient_ValidateDiscoveryGroup_ShortVersion_Async() + public async Task Example_DiscoGroup_CreateOrReplaceDiscoveryGroup_ShortVersion_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); using RequestContent content = RequestContent.Create(new object()); - Response response = await client.ValidateDiscoveryGroupAsync(content); + Response response = await client.CreateOrReplaceDiscoveryGroupAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_EasmClient_ValidateDiscoveryGroup_ShortVersion_Convenience() + public void Example_DiscoGroup_CreateOrReplaceDiscoveryGroup_ShortVersion_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); DiscoveryGroupPayload body = new DiscoveryGroupPayload(); - Response response = client.ValidateDiscoveryGroup(body); + Response response = client.CreateOrReplaceDiscoveryGroup("", body); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_EasmClient_ValidateDiscoveryGroup_ShortVersion_Convenience_Async() + public async Task Example_DiscoGroup_CreateOrReplaceDiscoveryGroup_ShortVersion_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); DiscoveryGroupPayload body = new DiscoveryGroupPayload(); - Response response = await client.ValidateDiscoveryGroupAsync(body); + Response response = await client.CreateOrReplaceDiscoveryGroupAsync("", body); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_EasmClient_ValidateDiscoveryGroup_AllParameters() + public void Example_DiscoGroup_CreateOrReplaceDiscoveryGroup_AllParameters() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -924,19 +840,38 @@ public void Example_EasmClient_ValidateDiscoveryGroup_AllParameters() }, templateId = "", }); - Response response = client.ValidateDiscoveryGroup(content); + Response response = client.CreateOrReplaceDiscoveryGroup("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("tier").ToString()); + Console.WriteLine(result.GetProperty("frequencyMilliseconds").ToString()); + Console.WriteLine(result.GetProperty("seeds")[0].GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("seeds")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("names")[0].ToString()); + Console.WriteLine(result.GetProperty("excludes")[0].GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("excludes")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("submittedDate").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("startedDate").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("completedDate").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("tier").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("totalAssetsFoundCount").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("seeds")[0].GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("seeds")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("excludes")[0].GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("excludes")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("names")[0].ToString()); + Console.WriteLine(result.GetProperty("createdDate").ToString()); + Console.WriteLine(result.GetProperty("templateId").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_EasmClient_ValidateDiscoveryGroup_AllParameters_Async() + public async Task Example_DiscoGroup_CreateOrReplaceDiscoveryGroup_AllParameters_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -966,19 +901,38 @@ public async Task Example_EasmClient_ValidateDiscoveryGroup_AllParameters_Async( }, templateId = "", }); - Response response = await client.ValidateDiscoveryGroupAsync(content); + Response response = await client.CreateOrReplaceDiscoveryGroupAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("tier").ToString()); + Console.WriteLine(result.GetProperty("frequencyMilliseconds").ToString()); + Console.WriteLine(result.GetProperty("seeds")[0].GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("seeds")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("names")[0].ToString()); + Console.WriteLine(result.GetProperty("excludes")[0].GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("excludes")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("submittedDate").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("startedDate").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("completedDate").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("tier").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("totalAssetsFoundCount").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("seeds")[0].GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("seeds")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("excludes")[0].GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("excludes")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("names")[0].ToString()); + Console.WriteLine(result.GetProperty("createdDate").ToString()); + Console.WriteLine(result.GetProperty("templateId").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_EasmClient_ValidateDiscoveryGroup_AllParameters_Convenience() + public void Example_DiscoGroup_CreateOrReplaceDiscoveryGroup_AllParameters_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -999,12 +953,12 @@ public void Example_EasmClient_ValidateDiscoveryGroup_AllParameters_Convenience( Excludes = { default }, TemplateId = "", }; - Response response = client.ValidateDiscoveryGroup(body); + Response response = client.CreateOrReplaceDiscoveryGroup("", body); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_EasmClient_ValidateDiscoveryGroup_AllParameters_Convenience_Async() + public async Task Example_DiscoGroup_CreateOrReplaceDiscoveryGroup_AllParameters_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -1025,1835 +979,731 @@ public async Task Example_EasmClient_ValidateDiscoveryGroup_AllParameters_Conven Excludes = { default }, TemplateId = "", }; - Response response = await client.ValidateDiscoveryGroupAsync(body); + Response response = await client.CreateOrReplaceDiscoveryGroupAsync("", body); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DiscoGroup_GetDiscoveryGroup_ShortVersion() + public void Example_EasmClient_RunDiscoveryGroup_ShortVersion() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = client.GetDiscoveryGroup("", null); + Response response = client.RunDiscoveryGroup(""); - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DiscoGroup_GetDiscoveryGroup_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - EasmClient client = new EasmClient(endpoint, credential); - - Response response = await client.GetDiscoveryGroupAsync("", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DiscoGroup_GetDiscoveryGroup_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - EasmClient client = new EasmClient(endpoint, credential); - - Response response = client.GetDiscoveryGroup(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DiscoGroup_GetDiscoveryGroup_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - EasmClient client = new EasmClient(endpoint, credential); - - Response response = await client.GetDiscoveryGroupAsync(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DiscoGroup_GetDiscoveryGroup_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - EasmClient client = new EasmClient(endpoint, credential); - - Response response = client.GetDiscoveryGroup("", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("tier").ToString()); - Console.WriteLine(result.GetProperty("frequencyMilliseconds").ToString()); - Console.WriteLine(result.GetProperty("seeds")[0].GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("seeds")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("names")[0].ToString()); - Console.WriteLine(result.GetProperty("excludes")[0].GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("excludes")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("submittedDate").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("startedDate").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("completedDate").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("tier").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("totalAssetsFoundCount").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("seeds")[0].GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("seeds")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("excludes")[0].GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("excludes")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("names")[0].ToString()); - Console.WriteLine(result.GetProperty("createdDate").ToString()); - Console.WriteLine(result.GetProperty("templateId").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DiscoGroup_GetDiscoveryGroup_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - EasmClient client = new EasmClient(endpoint, credential); - - Response response = await client.GetDiscoveryGroupAsync("", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("tier").ToString()); - Console.WriteLine(result.GetProperty("frequencyMilliseconds").ToString()); - Console.WriteLine(result.GetProperty("seeds")[0].GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("seeds")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("names")[0].ToString()); - Console.WriteLine(result.GetProperty("excludes")[0].GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("excludes")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("submittedDate").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("startedDate").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("completedDate").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("tier").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("totalAssetsFoundCount").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("seeds")[0].GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("seeds")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("excludes")[0].GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("excludes")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("names")[0].ToString()); - Console.WriteLine(result.GetProperty("createdDate").ToString()); - Console.WriteLine(result.GetProperty("templateId").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DiscoGroup_GetDiscoveryGroup_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - EasmClient client = new EasmClient(endpoint, credential); - - Response response = client.GetDiscoveryGroup(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DiscoGroup_GetDiscoveryGroup_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - EasmClient client = new EasmClient(endpoint, credential); - - Response response = await client.GetDiscoveryGroupAsync(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DiscoGroup_CreateOrReplaceDiscoveryGroup_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - EasmClient client = new EasmClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new object()); - Response response = client.CreateOrReplaceDiscoveryGroup("", 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_DiscoGroup_CreateOrReplaceDiscoveryGroup_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - EasmClient client = new EasmClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new object()); - Response response = await client.CreateOrReplaceDiscoveryGroupAsync("", content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DiscoGroup_CreateOrReplaceDiscoveryGroup_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - EasmClient client = new EasmClient(endpoint, credential); - - DiscoveryGroupPayload body = new DiscoveryGroupPayload(); - Response response = client.CreateOrReplaceDiscoveryGroup("", body); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DiscoGroup_CreateOrReplaceDiscoveryGroup_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - EasmClient client = new EasmClient(endpoint, credential); - - DiscoveryGroupPayload body = new DiscoveryGroupPayload(); - Response response = await client.CreateOrReplaceDiscoveryGroupAsync("", body); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DiscoGroup_CreateOrReplaceDiscoveryGroup_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - EasmClient client = new EasmClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - name = "", - description = "", - tier = "", - frequencyMilliseconds = 1234L, - seeds = new object[] - { -new -{ -kind = "as", -name = "", -} - }, - names = new object[] - { -"" - }, - excludes = new object[] - { -null - }, - templateId = "", - }); - Response response = client.CreateOrReplaceDiscoveryGroup("", content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("tier").ToString()); - Console.WriteLine(result.GetProperty("frequencyMilliseconds").ToString()); - Console.WriteLine(result.GetProperty("seeds")[0].GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("seeds")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("names")[0].ToString()); - Console.WriteLine(result.GetProperty("excludes")[0].GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("excludes")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("submittedDate").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("startedDate").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("completedDate").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("tier").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("totalAssetsFoundCount").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("seeds")[0].GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("seeds")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("excludes")[0].GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("excludes")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("names")[0].ToString()); - Console.WriteLine(result.GetProperty("createdDate").ToString()); - Console.WriteLine(result.GetProperty("templateId").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DiscoGroup_CreateOrReplaceDiscoveryGroup_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - EasmClient client = new EasmClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - name = "", - description = "", - tier = "", - frequencyMilliseconds = 1234L, - seeds = new object[] - { -new -{ -kind = "as", -name = "", -} - }, - names = new object[] - { -"" - }, - excludes = new object[] - { -null - }, - templateId = "", - }); - Response response = await client.CreateOrReplaceDiscoveryGroupAsync("", content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("tier").ToString()); - Console.WriteLine(result.GetProperty("frequencyMilliseconds").ToString()); - Console.WriteLine(result.GetProperty("seeds")[0].GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("seeds")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("names")[0].ToString()); - Console.WriteLine(result.GetProperty("excludes")[0].GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("excludes")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("submittedDate").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("startedDate").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("completedDate").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("tier").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("totalAssetsFoundCount").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("seeds")[0].GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("seeds")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("excludes")[0].GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("excludes")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("names")[0].ToString()); - Console.WriteLine(result.GetProperty("createdDate").ToString()); - Console.WriteLine(result.GetProperty("templateId").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DiscoGroup_CreateOrReplaceDiscoveryGroup_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - EasmClient client = new EasmClient(endpoint, credential); - - DiscoveryGroupPayload body = new DiscoveryGroupPayload - { - Name = "", - Description = "", - Tier = "", - FrequencyMilliseconds = 1234L, - Seeds = {new DiscoverySource -{ -Kind = DiscoverySourceKind.As, -Name = "", -}}, - Names = { "" }, - Excludes = { default }, - TemplateId = "", - }; - Response response = client.CreateOrReplaceDiscoveryGroup("", body); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DiscoGroup_CreateOrReplaceDiscoveryGroup_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - EasmClient client = new EasmClient(endpoint, credential); - - DiscoveryGroupPayload body = new DiscoveryGroupPayload - { - Name = "", - Description = "", - Tier = "", - FrequencyMilliseconds = 1234L, - Seeds = {new DiscoverySource -{ -Kind = DiscoverySourceKind.As, -Name = "", -}}, - Names = { "" }, - Excludes = { default }, - TemplateId = "", - }; - Response response = await client.CreateOrReplaceDiscoveryGroupAsync("", body); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_EasmClient_RunDiscoveryGroup_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - EasmClient client = new EasmClient(endpoint, credential); - - Response response = client.RunDiscoveryGroup(""); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_EasmClient_RunDiscoveryGroup_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - EasmClient client = new EasmClient(endpoint, credential); - - Response response = await client.RunDiscoveryGroupAsync(""); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_EasmClient_RunDiscoveryGroup_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - EasmClient client = new EasmClient(endpoint, credential); - - Response response = client.RunDiscoveryGroup(""); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_EasmClient_RunDiscoveryGroup_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - EasmClient client = new EasmClient(endpoint, credential); - - Response response = await client.RunDiscoveryGroupAsync(""); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DiscoTemplate_GetDiscoveryTemplate_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - EasmClient client = new EasmClient(endpoint, credential); - - Response response = client.GetDiscoveryTemplate("", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DiscoTemplate_GetDiscoveryTemplate_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - EasmClient client = new EasmClient(endpoint, credential); - - Response response = await client.GetDiscoveryTemplateAsync("", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DiscoTemplate_GetDiscoveryTemplate_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - EasmClient client = new EasmClient(endpoint, credential); - - Response response = client.GetDiscoveryTemplate(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DiscoTemplate_GetDiscoveryTemplate_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - EasmClient client = new EasmClient(endpoint, credential); - - Response response = await client.GetDiscoveryTemplateAsync(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DiscoTemplate_GetDiscoveryTemplate_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - EasmClient client = new EasmClient(endpoint, credential); - - Response response = client.GetDiscoveryTemplate("", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("industry").ToString()); - Console.WriteLine(result.GetProperty("region").ToString()); - Console.WriteLine(result.GetProperty("countryCode").ToString()); - Console.WriteLine(result.GetProperty("stateCode").ToString()); - Console.WriteLine(result.GetProperty("city").ToString()); - Console.WriteLine(result.GetProperty("seeds")[0].GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("seeds")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("names")[0].ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DiscoTemplate_GetDiscoveryTemplate_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - EasmClient client = new EasmClient(endpoint, credential); - - Response response = await client.GetDiscoveryTemplateAsync("", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("industry").ToString()); - Console.WriteLine(result.GetProperty("region").ToString()); - Console.WriteLine(result.GetProperty("countryCode").ToString()); - Console.WriteLine(result.GetProperty("stateCode").ToString()); - Console.WriteLine(result.GetProperty("city").ToString()); - Console.WriteLine(result.GetProperty("seeds")[0].GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("seeds")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("names")[0].ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DiscoTemplate_GetDiscoveryTemplate_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - EasmClient client = new EasmClient(endpoint, credential); - - Response response = client.GetDiscoveryTemplate(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DiscoTemplate_GetDiscoveryTemplate_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - EasmClient client = new EasmClient(endpoint, credential); - - Response response = await client.GetDiscoveryTemplateAsync(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_EasmClient_GetBillable_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - EasmClient client = new EasmClient(endpoint, credential); - - Response response = client.GetBillable(null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_EasmClient_GetBillable_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - EasmClient client = new EasmClient(endpoint, credential); - - Response response = await client.GetBillableAsync(null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_EasmClient_GetBillable_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - EasmClient client = new EasmClient(endpoint, credential); - - Response response = client.GetBillable(); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_EasmClient_GetBillable_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - EasmClient client = new EasmClient(endpoint, credential); - - Response response = await client.GetBillableAsync(); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_EasmClient_GetBillable_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - EasmClient client = new EasmClient(endpoint, credential); - - Response response = client.GetBillable(null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("date").ToString()); - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("total").ToString()); - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("assetBreakdown")[0].GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("assetBreakdown")[0].GetProperty("count").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_EasmClient_GetBillable_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - EasmClient client = new EasmClient(endpoint, credential); - - Response response = await client.GetBillableAsync(null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("date").ToString()); - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("total").ToString()); - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("assetBreakdown")[0].GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("assetBreakdown")[0].GetProperty("count").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_EasmClient_GetBillable_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - EasmClient client = new EasmClient(endpoint, credential); - - Response response = client.GetBillable(); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_EasmClient_GetBillable_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - EasmClient client = new EasmClient(endpoint, credential); - - Response response = await client.GetBillableAsync(); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_EasmClient_GetSnapshot_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - EasmClient client = new EasmClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new object()); - Response response = client.GetSnapshot(content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_EasmClient_GetSnapshot_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - EasmClient client = new EasmClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new object()); - Response response = await client.GetSnapshotAsync(content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_EasmClient_GetSnapshot_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - EasmClient client = new EasmClient(endpoint, credential); - - ReportAssetSnapshotPayload body = new ReportAssetSnapshotPayload(); - Response response = client.GetSnapshot(body); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_EasmClient_GetSnapshot_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - EasmClient client = new EasmClient(endpoint, credential); - - ReportAssetSnapshotPayload body = new ReportAssetSnapshotPayload(); - Response response = await client.GetSnapshotAsync(body); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_EasmClient_GetSnapshot_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - EasmClient client = new EasmClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - metric = "", - labelName = "", - size = 1234, - page = 1234, - }); - Response response = client.GetSnapshot(content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("metric").ToString()); - Console.WriteLine(result.GetProperty("labelName").ToString()); - Console.WriteLine(result.GetProperty("updatedAt").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("totalElements").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("mark").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("nextLink").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("uuid").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("createdDate").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("updatedDate").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("externalId").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("wildcard").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("discoGroupName").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("auditTrail")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("auditTrail")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("auditTrail")[0].GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("auditTrail")[0].GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("auditTrail")[0].GetProperty("reason").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("reason").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_EasmClient_GetSnapshot_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - EasmClient client = new EasmClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - metric = "", - labelName = "", - size = 1234, - page = 1234, - }); - Response response = await client.GetSnapshotAsync(content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("metric").ToString()); - Console.WriteLine(result.GetProperty("labelName").ToString()); - Console.WriteLine(result.GetProperty("updatedAt").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("totalElements").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("mark").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("nextLink").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("uuid").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("createdDate").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("updatedDate").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("externalId").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("wildcard").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("discoGroupName").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("auditTrail")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("auditTrail")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("auditTrail")[0].GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("auditTrail")[0].GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("auditTrail")[0].GetProperty("reason").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("reason").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_EasmClient_GetSnapshot_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - EasmClient client = new EasmClient(endpoint, credential); - - ReportAssetSnapshotPayload body = new ReportAssetSnapshotPayload - { - Metric = "", - LabelName = "", - Size = 1234, - Page = 1234, - }; - Response response = client.GetSnapshot(body); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_EasmClient_GetSnapshot_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - EasmClient client = new EasmClient(endpoint, credential); - - ReportAssetSnapshotPayload body = new ReportAssetSnapshotPayload - { - Metric = "", - LabelName = "", - Size = 1234, - Page = 1234, - }; - Response response = await client.GetSnapshotAsync(body); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_EasmClient_GetSummary_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - EasmClient client = new EasmClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new object()); - Response response = client.GetSummary(content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_EasmClient_GetSummary_ShortVersion_Async() + public async Task Example_EasmClient_RunDiscoveryGroup_ShortVersion_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - using RequestContent content = RequestContent.Create(new object()); - Response response = await client.GetSummaryAsync(content); + Response response = await client.RunDiscoveryGroupAsync(""); - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_EasmClient_GetSummary_ShortVersion_Convenience() + public void Example_EasmClient_RunDiscoveryGroup_AllParameters() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - ReportAssetSummaryPayload body = new ReportAssetSummaryPayload(); - Response response = client.GetSummary(body); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_EasmClient_GetSummary_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - EasmClient client = new EasmClient(endpoint, credential); + Response response = client.RunDiscoveryGroup(""); - ReportAssetSummaryPayload body = new ReportAssetSummaryPayload(); - Response response = await client.GetSummaryAsync(body); + Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_EasmClient_GetSummary_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - EasmClient client = new EasmClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - metricCategories = new object[] - { -"" - }, - metrics = new object[] - { -"" - }, - filters = new object[] - { -"" - }, - groupBy = "", - segmentBy = "", - labelName = "", - }); - Response response = client.GetSummary(content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("updatedAt").ToString()); - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("metricCategory").ToString()); - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("metric").ToString()); - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("filter").ToString()); - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("labelName").ToString()); - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("count").ToString()); - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("link").ToString()); - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("children")[0].GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("children")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("children")[0].GetProperty("updatedAt").ToString()); - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("children")[0].GetProperty("metricCategory").ToString()); - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("children")[0].GetProperty("metric").ToString()); - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("children")[0].GetProperty("filter").ToString()); - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("children")[0].GetProperty("labelName").ToString()); - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("children")[0].GetProperty("count").ToString()); - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("children")[0].GetProperty("link").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_EasmClient_GetSummary_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - EasmClient client = new EasmClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - metricCategories = new object[] - { -"" - }, - metrics = new object[] - { -"" - }, - filters = new object[] - { -"" - }, - groupBy = "", - segmentBy = "", - labelName = "", - }); - Response response = await client.GetSummaryAsync(content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("updatedAt").ToString()); - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("metricCategory").ToString()); - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("metric").ToString()); - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("filter").ToString()); - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("labelName").ToString()); - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("count").ToString()); - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("link").ToString()); - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("children")[0].GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("children")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("children")[0].GetProperty("updatedAt").ToString()); - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("children")[0].GetProperty("metricCategory").ToString()); - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("children")[0].GetProperty("metric").ToString()); - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("children")[0].GetProperty("filter").ToString()); - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("children")[0].GetProperty("labelName").ToString()); - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("children")[0].GetProperty("count").ToString()); - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("children")[0].GetProperty("link").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_EasmClient_GetSummary_AllParameters_Convenience() + public async Task Example_EasmClient_RunDiscoveryGroup_AllParameters_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - ReportAssetSummaryPayload body = new ReportAssetSummaryPayload - { - MetricCategories = { "" }, - Metrics = { "" }, - Filters = { "" }, - GroupBy = "", - SegmentBy = "", - LabelName = "", - }; - Response response = client.GetSummary(body); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_EasmClient_GetSummary_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - EasmClient client = new EasmClient(endpoint, credential); + Response response = await client.RunDiscoveryGroupAsync(""); - ReportAssetSummaryPayload body = new ReportAssetSummaryPayload - { - MetricCategories = { "" }, - Metrics = { "" }, - Filters = { "" }, - GroupBy = "", - SegmentBy = "", - LabelName = "", - }; - Response response = await client.GetSummaryAsync(body); + Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_SavedFilter_GetSavedFilter_ShortVersion() + public void Example_DiscoTemplate_GetDiscoveryTemplate_ShortVersion() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = client.GetSavedFilter("", null); + Response response = client.GetDiscoveryTemplate("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_SavedFilter_GetSavedFilter_ShortVersion_Async() + public async Task Example_DiscoTemplate_GetDiscoveryTemplate_ShortVersion_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = await client.GetSavedFilterAsync("", null); + Response response = await client.GetDiscoveryTemplateAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_SavedFilter_GetSavedFilter_ShortVersion_Convenience() + public void Example_DiscoTemplate_GetDiscoveryTemplate_ShortVersion_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = client.GetSavedFilter(""); + Response response = client.GetDiscoveryTemplate(""); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_SavedFilter_GetSavedFilter_ShortVersion_Convenience_Async() + public async Task Example_DiscoTemplate_GetDiscoveryTemplate_ShortVersion_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = await client.GetSavedFilterAsync(""); + Response response = await client.GetDiscoveryTemplateAsync(""); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_SavedFilter_GetSavedFilter_AllParameters() + public void Example_DiscoTemplate_GetDiscoveryTemplate_AllParameters() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = client.GetSavedFilter("", null); + Response response = client.GetDiscoveryTemplate("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("filter").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("industry").ToString()); + Console.WriteLine(result.GetProperty("region").ToString()); + Console.WriteLine(result.GetProperty("countryCode").ToString()); + Console.WriteLine(result.GetProperty("stateCode").ToString()); + Console.WriteLine(result.GetProperty("city").ToString()); + Console.WriteLine(result.GetProperty("seeds")[0].GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("seeds")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("names")[0].ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_SavedFilter_GetSavedFilter_AllParameters_Async() + public async Task Example_DiscoTemplate_GetDiscoveryTemplate_AllParameters_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = await client.GetSavedFilterAsync("", null); + Response response = await client.GetDiscoveryTemplateAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("filter").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("industry").ToString()); + Console.WriteLine(result.GetProperty("region").ToString()); + Console.WriteLine(result.GetProperty("countryCode").ToString()); + Console.WriteLine(result.GetProperty("stateCode").ToString()); + Console.WriteLine(result.GetProperty("city").ToString()); + Console.WriteLine(result.GetProperty("seeds")[0].GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("seeds")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("names")[0].ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_SavedFilter_GetSavedFilter_AllParameters_Convenience() + public void Example_DiscoTemplate_GetDiscoveryTemplate_AllParameters_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = client.GetSavedFilter(""); + Response response = client.GetDiscoveryTemplate(""); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_SavedFilter_GetSavedFilter_AllParameters_Convenience_Async() + public async Task Example_DiscoTemplate_GetDiscoveryTemplate_AllParameters_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = await client.GetSavedFilterAsync(""); + Response response = await client.GetDiscoveryTemplateAsync(""); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_SavedFilter_CreateOrReplaceSavedFilter_ShortVersion() + public void Example_EasmClient_GetBillable_ReportsGetBillable() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - using RequestContent content = RequestContent.Create(new - { - filter = "", - description = "", - }); - Response response = client.CreateOrReplaceSavedFilter("", content); + Response response = client.GetBillable(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_SavedFilter_CreateOrReplaceSavedFilter_ShortVersion_Async() + public async Task Example_EasmClient_GetBillable_ReportsGetBillable_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - using RequestContent content = RequestContent.Create(new - { - filter = "", - description = "", - }); - Response response = await client.CreateOrReplaceSavedFilterAsync("", content); + Response response = await client.GetBillableAsync(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_SavedFilter_CreateOrReplaceSavedFilter_ShortVersion_Convenience() + public void Example_EasmClient_GetBillable_ReportsGetBillable_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - SavedFilterPayload body = new SavedFilterPayload("", ""); - Response response = client.CreateOrReplaceSavedFilter("", body); + Response response = client.GetBillable(); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_SavedFilter_CreateOrReplaceSavedFilter_ShortVersion_Convenience_Async() + public async Task Example_EasmClient_GetBillable_ReportsGetBillable_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - SavedFilterPayload body = new SavedFilterPayload("", ""); - Response response = await client.CreateOrReplaceSavedFilterAsync("", body); + Response response = await client.GetBillableAsync(); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_SavedFilter_CreateOrReplaceSavedFilter_AllParameters() + public void Example_EasmClient_GetSnapshot_ReportsGetSnapshot() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - filter = "", - description = "", + metric = "site_status_active", + page = 0, + size = 5, }); - Response response = client.CreateOrReplaceSavedFilter("", content); + Response response = client.GetSnapshot(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("filter").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_SavedFilter_CreateOrReplaceSavedFilter_AllParameters_Async() + public async Task Example_EasmClient_GetSnapshot_ReportsGetSnapshot_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - filter = "", - description = "", + metric = "site_status_active", + page = 0, + size = 5, }); - Response response = await client.CreateOrReplaceSavedFilterAsync("", content); + Response response = await client.GetSnapshotAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("filter").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_SavedFilter_CreateOrReplaceSavedFilter_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - EasmClient client = new EasmClient(endpoint, credential); - - SavedFilterPayload body = new SavedFilterPayload("", ""); - Response response = client.CreateOrReplaceSavedFilter("", body); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_SavedFilter_CreateOrReplaceSavedFilter_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - EasmClient client = new EasmClient(endpoint, credential); - - SavedFilterPayload body = new SavedFilterPayload("", ""); - Response response = await client.CreateOrReplaceSavedFilterAsync("", body); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_SavedFilter_DeleteSavedFilter_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - EasmClient client = new EasmClient(endpoint, credential); - - Response response = client.DeleteSavedFilter(""); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_SavedFilter_DeleteSavedFilter_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - EasmClient client = new EasmClient(endpoint, credential); - - Response response = await client.DeleteSavedFilterAsync(""); - - Console.WriteLine(response.Status); + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_SavedFilter_DeleteSavedFilter_AllParameters() + public void Example_EasmClient_GetSnapshot_ReportsGetSnapshot_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = client.DeleteSavedFilter(""); - - Console.WriteLine(response.Status); + ReportAssetSnapshotPayload body = new ReportAssetSnapshotPayload + { + Metric = "site_status_active", + Size = 5, + Page = 0, + }; + Response response = client.GetSnapshot(body); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_SavedFilter_DeleteSavedFilter_AllParameters_Async() + public async Task Example_EasmClient_GetSnapshot_ReportsGetSnapshot_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = await client.DeleteSavedFilterAsync(""); - - Console.WriteLine(response.Status); + ReportAssetSnapshotPayload body = new ReportAssetSnapshotPayload + { + Metric = "site_status_active", + Size = 5, + Page = 0, + }; + Response response = await client.GetSnapshotAsync(body); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Task_GetTask_ShortVersion() + public void Example_EasmClient_GetSummary_ReportsGetSummary() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = client.GetTask("", null); + using RequestContent content = RequestContent.Create(new + { + filters = new object[] + { +"state = \"confirmed\" AND kind = \"domain\"", +"state = \"confirmed\" AND kind = \"host\"", +"state = \"confirmed\" AND kind = \"page\"" + }, + }); + Response response = client.GetSummary(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Task_GetTask_ShortVersion_Async() + public async Task Example_EasmClient_GetSummary_ReportsGetSummary_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = await client.GetTaskAsync("", null); + using RequestContent content = RequestContent.Create(new + { + filters = new object[] + { +"state = \"confirmed\" AND kind = \"domain\"", +"state = \"confirmed\" AND kind = \"host\"", +"state = \"confirmed\" AND kind = \"page\"" + }, + }); + Response response = await client.GetSummaryAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Task_GetTask_ShortVersion_Convenience() + public void Example_EasmClient_GetSummary_ReportsGetSummary_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = client.GetTask(""); + ReportAssetSummaryPayload body = new ReportAssetSummaryPayload + { + Filters = { "state = \"confirmed\" AND kind = \"domain\"", "state = \"confirmed\" AND kind = \"host\"", "state = \"confirmed\" AND kind = \"page\"" }, + }; + Response response = client.GetSummary(body); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Task_GetTask_ShortVersion_Convenience_Async() + public async Task Example_EasmClient_GetSummary_ReportsGetSummary_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = await client.GetTaskAsync(""); + ReportAssetSummaryPayload body = new ReportAssetSummaryPayload + { + Filters = { "state = \"confirmed\" AND kind = \"domain\"", "state = \"confirmed\" AND kind = \"host\"", "state = \"confirmed\" AND kind = \"page\"" }, + }; + Response response = await client.GetSummaryAsync(body); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Task_GetTask_AllParameters() + public void Example_SavedFilter_GetSavedFilter_SavedFiltersGetSavedFilter() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = client.GetTask("", null); + Response response = client.GetSavedFilter("ThisisaSavedFilter", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("startedAt").ToString()); - Console.WriteLine(result.GetProperty("completedAt").ToString()); - Console.WriteLine(result.GetProperty("lastPolledAt").ToString()); - Console.WriteLine(result.GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("phase").ToString()); - Console.WriteLine(result.GetProperty("reason").ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Task_GetTask_AllParameters_Async() + public async Task Example_SavedFilter_GetSavedFilter_SavedFiltersGetSavedFilter_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = await client.GetTaskAsync("", null); + Response response = await client.GetSavedFilterAsync("ThisisaSavedFilter", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("startedAt").ToString()); - Console.WriteLine(result.GetProperty("completedAt").ToString()); - Console.WriteLine(result.GetProperty("lastPolledAt").ToString()); - Console.WriteLine(result.GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("phase").ToString()); - Console.WriteLine(result.GetProperty("reason").ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Task_GetTask_AllParameters_Convenience() + public void Example_SavedFilter_GetSavedFilter_SavedFiltersGetSavedFilter_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = client.GetTask(""); + Response response = client.GetSavedFilter("ThisisaSavedFilter"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Task_GetTask_AllParameters_Convenience_Async() + public async Task Example_SavedFilter_GetSavedFilter_SavedFiltersGetSavedFilter_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = await client.GetTaskAsync(""); + Response response = await client.GetSavedFilterAsync("ThisisaSavedFilter"); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_EasmClient_CancelTask_ShortVersion() + public void Example_SavedFilter_CreateOrReplaceSavedFilter_SavedFiltersCreateOrReplaceSavedFilter() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = client.CancelTask("", null); + using RequestContent content = RequestContent.Create(new + { + filter = "state IN (\"confirmed\")", + description = "This is a saved filter", + }); + Response response = client.CreateOrReplaceSavedFilter("ThisisaSavedFilter", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_EasmClient_CancelTask_ShortVersion_Async() + public async Task Example_SavedFilter_CreateOrReplaceSavedFilter_SavedFiltersCreateOrReplaceSavedFilter_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = await client.CancelTaskAsync("", null); + using RequestContent content = RequestContent.Create(new + { + filter = "state IN (\"confirmed\")", + description = "This is a saved filter", + }); + Response response = await client.CreateOrReplaceSavedFilterAsync("ThisisaSavedFilter", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_EasmClient_CancelTask_ShortVersion_Convenience() + public void Example_SavedFilter_CreateOrReplaceSavedFilter_SavedFiltersCreateOrReplaceSavedFilter_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = client.CancelTask(""); + SavedFilterPayload body = new SavedFilterPayload("state IN (\"confirmed\")", "This is a saved filter"); + Response response = client.CreateOrReplaceSavedFilter("ThisisaSavedFilter", body); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_EasmClient_CancelTask_ShortVersion_Convenience_Async() + public async Task Example_SavedFilter_CreateOrReplaceSavedFilter_SavedFiltersCreateOrReplaceSavedFilter_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = await client.CancelTaskAsync(""); + SavedFilterPayload body = new SavedFilterPayload("state IN (\"confirmed\")", "This is a saved filter"); + Response response = await client.CreateOrReplaceSavedFilterAsync("ThisisaSavedFilter", body); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_EasmClient_CancelTask_AllParameters() + public void Example_SavedFilter_DeleteSavedFilter_SavedFiltersDeleteSavedFilter() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = client.CancelTask("", null); + Response response = client.DeleteSavedFilter("ThisisaSavedFilter"); - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("startedAt").ToString()); - Console.WriteLine(result.GetProperty("completedAt").ToString()); - Console.WriteLine(result.GetProperty("lastPolledAt").ToString()); - Console.WriteLine(result.GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("phase").ToString()); - Console.WriteLine(result.GetProperty("reason").ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_EasmClient_CancelTask_AllParameters_Async() + public async Task Example_SavedFilter_DeleteSavedFilter_SavedFiltersDeleteSavedFilter_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = await client.CancelTaskAsync("", null); + Response response = await client.DeleteSavedFilterAsync("ThisisaSavedFilter"); - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("startedAt").ToString()); - Console.WriteLine(result.GetProperty("completedAt").ToString()); - Console.WriteLine(result.GetProperty("lastPolledAt").ToString()); - Console.WriteLine(result.GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("phase").ToString()); - Console.WriteLine(result.GetProperty("reason").ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_EasmClient_CancelTask_AllParameters_Convenience() + public void Example_Task_GetTask_TasksGetTask() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = client.CancelTask(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_EasmClient_CancelTask_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - EasmClient client = new EasmClient(endpoint, credential); + Response response = client.GetTask("ThisisaTaskId", null); - Response response = await client.CancelTaskAsync(""); + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_AssetResource_GetAssetResources_ShortVersion() + public async Task Example_Task_GetTask_TasksGetTask_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - foreach (BinaryData item in client.GetAssetResources(null, null, null, null, null, null)) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_AssetResource_GetAssetResources_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - EasmClient client = new EasmClient(endpoint, credential); + Response response = await client.GetTaskAsync("ThisisaTaskId", null); - await foreach (BinaryData item in client.GetAssetResourcesAsync(null, null, null, null, null, null)) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - } + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_AssetResource_GetAssetResources_ShortVersion_Convenience() + public void Example_Task_GetTask_TasksGetTask_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - foreach (AssetResource item in client.GetAssetResources()) - { - } + Response response = client.GetTask("ThisisaTaskId"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_AssetResource_GetAssetResources_ShortVersion_Convenience_Async() + public async Task Example_Task_GetTask_TasksGetTask_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - await foreach (AssetResource item in client.GetAssetResourcesAsync()) - { - } + Response response = await client.GetTaskAsync("ThisisaTaskId"); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_AssetResource_GetAssetResources_AllParameters() + public void Example_EasmClient_CancelTask_TasksCancelTask() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - foreach (BinaryData item in client.GetAssetResources("", "", 1234, 1234, "", null)) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("uuid").ToString()); - Console.WriteLine(result.GetProperty("createdDate").ToString()); - Console.WriteLine(result.GetProperty("updatedDate").ToString()); - Console.WriteLine(result.GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("externalId").ToString()); - Console.WriteLine(result.GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("wildcard").ToString()); - Console.WriteLine(result.GetProperty("discoGroupName").ToString()); - Console.WriteLine(result.GetProperty("auditTrail")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("auditTrail")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("auditTrail")[0].GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("auditTrail")[0].GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("auditTrail")[0].GetProperty("reason").ToString()); - Console.WriteLine(result.GetProperty("reason").ToString()); - } + Response response = client.CancelTask("ThisisaTaskId", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_AssetResource_GetAssetResources_AllParameters_Async() + public async Task Example_EasmClient_CancelTask_TasksCancelTask_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - await foreach (BinaryData item in client.GetAssetResourcesAsync("", "", 1234, 1234, "", null)) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("uuid").ToString()); - Console.WriteLine(result.GetProperty("createdDate").ToString()); - Console.WriteLine(result.GetProperty("updatedDate").ToString()); - Console.WriteLine(result.GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("externalId").ToString()); - Console.WriteLine(result.GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("wildcard").ToString()); - Console.WriteLine(result.GetProperty("discoGroupName").ToString()); - Console.WriteLine(result.GetProperty("auditTrail")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("auditTrail")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("auditTrail")[0].GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("auditTrail")[0].GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("auditTrail")[0].GetProperty("reason").ToString()); - Console.WriteLine(result.GetProperty("reason").ToString()); - } + Response response = await client.CancelTaskAsync("ThisisaTaskId", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_AssetResource_GetAssetResources_AllParameters_Convenience() + public void Example_EasmClient_CancelTask_TasksCancelTask_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - foreach (AssetResource item in client.GetAssetResources(filter: "", orderby: "", skip: 1234, maxpagesize: 1234, mark: "")) - { - } + Response response = client.CancelTask("ThisisaTaskId"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_AssetResource_GetAssetResources_AllParameters_Convenience_Async() + public async Task Example_EasmClient_CancelTask_TasksCancelTask_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - await foreach (AssetResource item in client.GetAssetResourcesAsync(filter: "", orderby: "", skip: 1234, maxpagesize: 1234, mark: "")) - { - } + Response response = await client.CancelTaskAsync("ThisisaTaskId"); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DataConnection_GetDataConnections_ShortVersion() + public void Example_AssetResource_GetAssetResources_AssetsListAssetResource() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - foreach (BinaryData item in client.GetDataConnections(null, null, null)) + foreach (BinaryData item in client.GetAssetResources("state%20%3D%20%22confirmed%22", null, 0, 5, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); } } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DataConnection_GetDataConnections_ShortVersion_Async() + public async Task Example_AssetResource_GetAssetResources_AssetsListAssetResource_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - await foreach (BinaryData item in client.GetDataConnectionsAsync(null, null, null)) + await foreach (BinaryData item in client.GetAssetResourcesAsync("state%20%3D%20%22confirmed%22", null, 0, 5, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); } } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DataConnection_GetDataConnections_ShortVersion_Convenience() + public void Example_AssetResource_GetAssetResources_AssetsListAssetResource_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - foreach (DataConnection item in client.GetDataConnections()) + foreach (AssetResource item in client.GetAssetResources()) { } } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DataConnection_GetDataConnections_ShortVersion_Convenience_Async() + public async Task Example_AssetResource_GetAssetResources_AssetsListAssetResource_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - await foreach (DataConnection item in client.GetDataConnectionsAsync()) + await foreach (AssetResource item in client.GetAssetResourcesAsync()) { } } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DataConnection_GetDataConnections_AllParameters() + public void Example_DataConnection_GetDataConnections_DataConnectionsListDataConnection() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - foreach (BinaryData item in client.GetDataConnections(1234, 1234, null)) + foreach (BinaryData item in client.GetDataConnections(null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("content").ToString()); - Console.WriteLine(result.GetProperty("createdDate").ToString()); - Console.WriteLine(result.GetProperty("frequency").ToString()); - Console.WriteLine(result.GetProperty("frequencyOffset").ToString()); - Console.WriteLine(result.GetProperty("updatedDate").ToString()); - Console.WriteLine(result.GetProperty("userUpdatedAt").ToString()); - Console.WriteLine(result.GetProperty("active").ToString()); - Console.WriteLine(result.GetProperty("inactiveMessage").ToString()); } } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DataConnection_GetDataConnections_AllParameters_Async() + public async Task Example_DataConnection_GetDataConnections_DataConnectionsListDataConnection_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - await foreach (BinaryData item in client.GetDataConnectionsAsync(1234, 1234, null)) + await foreach (BinaryData item in client.GetDataConnectionsAsync(null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("content").ToString()); - Console.WriteLine(result.GetProperty("createdDate").ToString()); - Console.WriteLine(result.GetProperty("frequency").ToString()); - Console.WriteLine(result.GetProperty("frequencyOffset").ToString()); - Console.WriteLine(result.GetProperty("updatedDate").ToString()); - Console.WriteLine(result.GetProperty("userUpdatedAt").ToString()); - Console.WriteLine(result.GetProperty("active").ToString()); - Console.WriteLine(result.GetProperty("inactiveMessage").ToString()); } } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DataConnection_GetDataConnections_AllParameters_Convenience() + public void Example_DataConnection_GetDataConnections_DataConnectionsListDataConnection_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - foreach (DataConnection item in client.GetDataConnections(skip: 1234, maxpagesize: 1234)) + foreach (DataConnection item in client.GetDataConnections()) { } } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DataConnection_GetDataConnections_AllParameters_Convenience_Async() + public async Task Example_DataConnection_GetDataConnections_DataConnectionsListDataConnection_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - await foreach (DataConnection item in client.GetDataConnectionsAsync(skip: 1234, maxpagesize: 1234)) + await foreach (DataConnection item in client.GetDataConnectionsAsync()) { } } @@ -3282,9 +2132,9 @@ public async Task Example_DiscoTemplate_GetDiscoveryTemplates_AllParameters_Conv [Test] [Ignore("Only validating compilation of examples")] - public void Example_SavedFilter_GetSavedFilters_ShortVersion() + public void Example_SavedFilter_GetSavedFilters_SavedFiltersListSavedFilter() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); @@ -3297,9 +2147,9 @@ public void Example_SavedFilter_GetSavedFilters_ShortVersion() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_SavedFilter_GetSavedFilters_ShortVersion_Async() + public async Task Example_SavedFilter_GetSavedFilters_SavedFiltersListSavedFilter_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); @@ -3312,9 +2162,9 @@ public async Task Example_SavedFilter_GetSavedFilters_ShortVersion_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_SavedFilter_GetSavedFilters_ShortVersion_Convenience() + public void Example_SavedFilter_GetSavedFilters_SavedFiltersListSavedFilter_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); @@ -3325,9 +2175,9 @@ public void Example_SavedFilter_GetSavedFilters_ShortVersion_Convenience() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_SavedFilter_GetSavedFilters_ShortVersion_Convenience_Async() + public async Task Example_SavedFilter_GetSavedFilters_SavedFiltersListSavedFilter_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); @@ -3338,73 +2188,9 @@ public async Task Example_SavedFilter_GetSavedFilters_ShortVersion_Convenience_A [Test] [Ignore("Only validating compilation of examples")] - public void Example_SavedFilter_GetSavedFilters_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - EasmClient client = new EasmClient(endpoint, credential); - - foreach (BinaryData item in client.GetSavedFilters("", 1234, 1234, null)) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("filter").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_SavedFilter_GetSavedFilters_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - EasmClient client = new EasmClient(endpoint, credential); - - await foreach (BinaryData item in client.GetSavedFiltersAsync("", 1234, 1234, null)) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("filter").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_SavedFilter_GetSavedFilters_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - EasmClient client = new EasmClient(endpoint, credential); - - foreach (SavedFilter item in client.GetSavedFilters(filter: "", skip: 1234, maxpagesize: 1234)) - { - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_SavedFilter_GetSavedFilters_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - EasmClient client = new EasmClient(endpoint, credential); - - await foreach (SavedFilter item in client.GetSavedFiltersAsync(filter: "", skip: 1234, maxpagesize: 1234)) - { - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Task_GetTasks_ShortVersion() + public void Example_Task_GetTasks_TasksListTask() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); @@ -3417,9 +2203,9 @@ public void Example_Task_GetTasks_ShortVersion() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Task_GetTasks_ShortVersion_Async() + public async Task Example_Task_GetTasks_TasksListTask_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); @@ -3432,9 +2218,9 @@ public async Task Example_Task_GetTasks_ShortVersion_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Task_GetTasks_ShortVersion_Convenience() + public void Example_Task_GetTasks_TasksListTask_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); @@ -3445,9 +2231,9 @@ public void Example_Task_GetTasks_ShortVersion_Convenience() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Task_GetTasks_ShortVersion_Convenience_Async() + public async Task Example_Task_GetTasks_TasksListTask_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); @@ -3455,75 +2241,5 @@ public async Task Example_Task_GetTasks_ShortVersion_Convenience_Async() { } } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Task_GetTasks_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - EasmClient client = new EasmClient(endpoint, credential); - - foreach (BinaryData item in client.GetTasks("", "", 1234, 1234, null)) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("startedAt").ToString()); - Console.WriteLine(result.GetProperty("completedAt").ToString()); - Console.WriteLine(result.GetProperty("lastPolledAt").ToString()); - Console.WriteLine(result.GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("phase").ToString()); - Console.WriteLine(result.GetProperty("reason").ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Task_GetTasks_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - EasmClient client = new EasmClient(endpoint, credential); - - await foreach (BinaryData item in client.GetTasksAsync("", "", 1234, 1234, null)) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("startedAt").ToString()); - Console.WriteLine(result.GetProperty("completedAt").ToString()); - Console.WriteLine(result.GetProperty("lastPolledAt").ToString()); - Console.WriteLine(result.GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("phase").ToString()); - Console.WriteLine(result.GetProperty("reason").ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Task_GetTasks_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - EasmClient client = new EasmClient(endpoint, credential); - - foreach (TaskResource item in client.GetTasks(filter: "", orderby: "", skip: 1234, maxpagesize: 1234)) - { - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Task_GetTasks_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - EasmClient client = new EasmClient(endpoint, credential); - - await foreach (TaskResource item in client.GetTasksAsync(filter: "", orderby: "", skip: 1234, maxpagesize: 1234)) - { - } - } } } diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/samples/Generated/Samples/Sample_FabricCapacityCollection.cs b/sdk/fabric/Azure.ResourceManager.Fabric/samples/Generated/Samples/Sample_FabricCapacityCollection.cs new file mode 100644 index 000000000000..798e19a81460 --- /dev/null +++ b/sdk/fabric/Azure.ResourceManager.Fabric/samples/Generated/Samples/Sample_FabricCapacityCollection.cs @@ -0,0 +1,200 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.Fabric.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.Fabric.Samples +{ + public partial class Sample_FabricCapacityCollection + { + // Get a capacity + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetACapacity() + { + // Generated from example definition: 2023-11-01/FabricCapacities_Get.json + // this example is just showing the usage of "FabricCapacities_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "548B7FB7-3B2A-4F46-BB02-66473F1FC22C"; + string resourceGroupName = "TestRG"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this FabricCapacityResource + FabricCapacityCollection collection = resourceGroupResource.GetFabricCapacities(); + + // invoke the operation + string capacityName = "azsdktest"; + FabricCapacityResource result = await collection.GetAsync(capacityName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + FabricCapacityData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get a capacity + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetACapacity() + { + // Generated from example definition: 2023-11-01/FabricCapacities_Get.json + // this example is just showing the usage of "FabricCapacities_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "548B7FB7-3B2A-4F46-BB02-66473F1FC22C"; + string resourceGroupName = "TestRG"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this FabricCapacityResource + FabricCapacityCollection collection = resourceGroupResource.GetFabricCapacities(); + + // invoke the operation + string capacityName = "azsdktest"; + bool result = await collection.ExistsAsync(capacityName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Get a capacity + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetACapacity() + { + // Generated from example definition: 2023-11-01/FabricCapacities_Get.json + // this example is just showing the usage of "FabricCapacities_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "548B7FB7-3B2A-4F46-BB02-66473F1FC22C"; + string resourceGroupName = "TestRG"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this FabricCapacityResource + FabricCapacityCollection collection = resourceGroupResource.GetFabricCapacities(); + + // invoke the operation + string capacityName = "azsdktest"; + NullableResponse response = await collection.GetIfExistsAsync(capacityName); + FabricCapacityResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + FabricCapacityData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // Create or update a capacity + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CreateOrUpdateACapacity() + { + // Generated from example definition: 2023-11-01/FabricCapacities_CreateOrUpdate.json + // this example is just showing the usage of "FabricCapacities_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "548B7FB7-3B2A-4F46-BB02-66473F1FC22C"; + string resourceGroupName = "TestRG"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this FabricCapacityResource + FabricCapacityCollection collection = resourceGroupResource.GetFabricCapacities(); + + // invoke the operation + string capacityName = "azsdktest"; + FabricCapacityData data = new FabricCapacityData(new AzureLocation("westcentralus"), new FabricCapacityProperties(new FabricCapacityAdministration(new string[] + { +"azsdktest@microsoft.com","azsdktest2@microsoft.com" + })), new FabricSku("F2", FabricSkuTier.Fabric)); + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, capacityName, data); + FabricCapacityResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + FabricCapacityData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // List capacities by resource group + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ListCapacitiesByResourceGroup() + { + // Generated from example definition: 2023-11-01/FabricCapacities_ListByResourceGroup.json + // this example is just showing the usage of "FabricCapacity_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "548B7FB7-3B2A-4F46-BB02-66473F1FC22C"; + string resourceGroupName = "TestRG"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this FabricCapacityResource + FabricCapacityCollection collection = resourceGroupResource.GetFabricCapacities(); + + // invoke the operation and iterate over the result + await foreach (FabricCapacityResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + FabricCapacityData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/samples/Generated/Samples/Sample_FabricCapacityResource.cs b/sdk/fabric/Azure.ResourceManager.Fabric/samples/Generated/Samples/Sample_FabricCapacityResource.cs new file mode 100644 index 000000000000..93c91ce39a99 --- /dev/null +++ b/sdk/fabric/Azure.ResourceManager.Fabric/samples/Generated/Samples/Sample_FabricCapacityResource.cs @@ -0,0 +1,265 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.Fabric.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.Fabric.Samples +{ + public partial class Sample_FabricCapacityResource + { + // Get a capacity + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetACapacity() + { + // Generated from example definition: 2023-11-01/FabricCapacities_Get.json + // this example is just showing the usage of "FabricCapacities_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this FabricCapacityResource created on azure + // for more information of creating FabricCapacityResource, please refer to the document of FabricCapacityResource + string subscriptionId = "548B7FB7-3B2A-4F46-BB02-66473F1FC22C"; + string resourceGroupName = "TestRG"; + string capacityName = "azsdktest"; + ResourceIdentifier fabricCapacityResourceId = FabricCapacityResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, capacityName); + FabricCapacityResource fabricCapacity = client.GetFabricCapacityResource(fabricCapacityResourceId); + + // invoke the operation + FabricCapacityResource result = await fabricCapacity.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + FabricCapacityData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Update capacity properties + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_UpdateCapacityProperties() + { + // Generated from example definition: 2023-11-01/FabricCapacities_Update.json + // this example is just showing the usage of "FabricCapacities_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this FabricCapacityResource created on azure + // for more information of creating FabricCapacityResource, please refer to the document of FabricCapacityResource + string subscriptionId = "548B7FB7-3B2A-4F46-BB02-66473F1FC22C"; + string resourceGroupName = "TestRG"; + string capacityName = "azsdktest"; + ResourceIdentifier fabricCapacityResourceId = FabricCapacityResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, capacityName); + FabricCapacityResource fabricCapacity = client.GetFabricCapacityResource(fabricCapacityResourceId); + + // invoke the operation + FabricCapacityPatch patch = new FabricCapacityPatch() + { + Sku = new FabricSku("F8", FabricSkuTier.Fabric), + Tags = +{ +["testKey"] = "testValue", +}, + AdministrationMembers = +{ +"azsdktest2@microsoft.com" +}, + }; + ArmOperation lro = await fabricCapacity.UpdateAsync(WaitUntil.Completed, patch); + FabricCapacityResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + FabricCapacityData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Delete a capacity + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_DeleteACapacity() + { + // Generated from example definition: 2023-11-01/FabricCapacities_Delete.json + // this example is just showing the usage of "FabricCapacities_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this FabricCapacityResource created on azure + // for more information of creating FabricCapacityResource, please refer to the document of FabricCapacityResource + string subscriptionId = "548B7FB7-3B2A-4F46-BB02-66473F1FC22C"; + string resourceGroupName = "TestRG"; + string capacityName = "azsdktest"; + ResourceIdentifier fabricCapacityResourceId = FabricCapacityResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, capacityName); + FabricCapacityResource fabricCapacity = client.GetFabricCapacityResource(fabricCapacityResourceId); + + // invoke the operation + await fabricCapacity.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + + // List capacities by subscription + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetFabricCapacities_ListCapacitiesBySubscription() + { + // Generated from example definition: 2023-11-01/FabricCapacities_ListBySubscription.json + // this example is just showing the usage of "FabricCapacity_ListBySubscription" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "548B7FB7-3B2A-4F46-BB02-66473F1FC22C"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + await foreach (FabricCapacityResource item in subscriptionResource.GetFabricCapacitiesAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + FabricCapacityData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Resume capacity + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Resume_ResumeCapacity() + { + // Generated from example definition: 2023-11-01/FabricCapacities_Resume.json + // this example is just showing the usage of "FabricCapacities_Resume" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this FabricCapacityResource created on azure + // for more information of creating FabricCapacityResource, please refer to the document of FabricCapacityResource + string subscriptionId = "548B7FB7-3B2A-4F46-BB02-66473F1FC22C"; + string resourceGroupName = "TestRG"; + string capacityName = "azsdktest"; + ResourceIdentifier fabricCapacityResourceId = FabricCapacityResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, capacityName); + FabricCapacityResource fabricCapacity = client.GetFabricCapacityResource(fabricCapacityResourceId); + + // invoke the operation + await fabricCapacity.ResumeAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + + // Suspend capacity + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Suspend_SuspendCapacity() + { + // Generated from example definition: 2023-11-01/FabricCapacities_Suspend.json + // this example is just showing the usage of "FabricCapacities_Suspend" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this FabricCapacityResource created on azure + // for more information of creating FabricCapacityResource, please refer to the document of FabricCapacityResource + string subscriptionId = "548B7FB7-3B2A-4F46-BB02-66473F1FC22C"; + string resourceGroupName = "TestRG"; + string capacityName = "azsdktest"; + ResourceIdentifier fabricCapacityResourceId = FabricCapacityResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, capacityName); + FabricCapacityResource fabricCapacity = client.GetFabricCapacityResource(fabricCapacityResourceId); + + // invoke the operation + await fabricCapacity.SuspendAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + + // List eligible SKUs for an existing capacity + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetSkusForCapacity_ListEligibleSKUsForAnExistingCapacity() + { + // Generated from example definition: 2023-11-01/FabricCapacities_ListSkusForCapacity.json + // this example is just showing the usage of "FabricCapacities_ListSkusForCapacity" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this FabricCapacityResource created on azure + // for more information of creating FabricCapacityResource, please refer to the document of FabricCapacityResource + string subscriptionId = "548B7FB7-3B2A-4F46-BB02-66473F1FC22C"; + string resourceGroupName = "TestRG"; + string capacityName = "azsdktest"; + ResourceIdentifier fabricCapacityResourceId = FabricCapacityResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, capacityName); + FabricCapacityResource fabricCapacity = client.GetFabricCapacityResource(fabricCapacityResourceId); + + // invoke the operation and iterate over the result + await foreach (FabricSkuDetailsForExistingCapacity item in fabricCapacity.GetSkusForCapacityAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine($"Succeeded"); + } + + // List eligible SKUs for a new capacity + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetSkusFabricCapacities_ListEligibleSKUsForANewCapacity() + { + // Generated from example definition: 2023-11-01/FabricCapacities_ListSkus.json + // this example is just showing the usage of "FabricCapacities_ListSkus" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "548B7FB7-3B2A-4F46-BB02-66473F1FC22C"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + await foreach (FabricSkuDetailsForNewCapacity item in subscriptionResource.GetSkusFabricCapacitiesAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/face/Azure.AI.Vision.Face/src/Generated/AIVisionFaceModelFactory.cs b/sdk/face/Azure.AI.Vision.Face/src/Generated/AIVisionFaceModelFactory.cs index 4c9a126522ef..f85eca044688 100644 --- a/sdk/face/Azure.AI.Vision.Face/src/Generated/AIVisionFaceModelFactory.cs +++ b/sdk/face/Azure.AI.Vision.Face/src/Generated/AIVisionFaceModelFactory.cs @@ -277,26 +277,33 @@ public static FaceGroupingResult FaceGroupingResult(IEnumerable> gro return new FaceGroupingResult(groups?.ToList(), messyGroup?.ToList(), serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The unique ID to reference this session. - /// DateTime when this session was created. - /// DateTime when this session was started by the client. - /// Whether or not the session is expired. + /// Initializes a new instance of . + /// Type of liveness mode the client should follow. + /// Whether or not to allow a '200 - Success' response body to be sent to the client, which may be undesirable for security reasons. Default is false, clients will receive a '204 - NoContent' empty body response. Regardless of selection, calling Session GetResult will always contain a response body enabling business logic to be implemented. + /// Whether or not to allow client to set their own 'deviceCorrelationId' via the Vision SDK. Default is false, and 'deviceCorrelationId' must be set in this request body. /// Unique Guid per each end-user device. This is to provide rate limiting and anti-hammering. If 'deviceCorrelationIdSetInClient' is true in this request, this 'deviceCorrelationId' must be null. /// Seconds the session should last for. Range is 60 to 86400 seconds. Default value is 600. - /// A new instance for mocking. - public static LivenessSessionItem LivenessSessionItem(string id = null, DateTimeOffset createdDateTime = default, DateTimeOffset? sessionStartDateTime = null, bool sessionExpired = default, string deviceCorrelationId = null, int? authTokenTimeToLiveInSeconds = null) + /// A new instance for mocking. + public static CreateLivenessSessionContent CreateLivenessSessionContent(LivenessOperationMode livenessOperationMode = default, bool? sendResultsToClient = null, bool? deviceCorrelationIdSetInClient = null, string deviceCorrelationId = null, int? authTokenTimeToLiveInSeconds = null) { - return new LivenessSessionItem( - id, - createdDateTime, - sessionStartDateTime, - sessionExpired, + return new CreateLivenessSessionContent( + livenessOperationMode, + sendResultsToClient, + deviceCorrelationIdSetInClient, deviceCorrelationId, authTokenTimeToLiveInSeconds, serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// The unique session ID of the created session. It will expire 48 hours after it was created or may be deleted sooner using the corresponding Session DELETE operation. + /// Bearer token to provide authentication for the Vision SDK running on a client application. This Bearer token has limited permissions to perform only the required action and expires after the TTL time. It is also auditable. + /// A new instance for mocking. + public static CreateLivenessSessionResult CreateLivenessSessionResult(string sessionId = null, string authToken = null) + { + return new CreateLivenessSessionResult(sessionId, authToken, serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The unique ID to reference this session. /// DateTime when this session was created. @@ -417,31 +424,34 @@ public static LivenessWithVerifyImage LivenessWithVerifyImage(FaceRectangle face return new LivenessWithVerifyImage(faceRectangle, qualityForRecognition, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// Type of liveness mode the client should follow. - /// Whether or not to allow a '200 - Success' response body to be sent to the client, which may be undesirable for security reasons. Default is false, clients will receive a '204 - NoContent' empty body response. Regardless of selection, calling Session GetResult will always contain a response body enabling business logic to be implemented. - /// Whether or not to allow client to set their own 'deviceCorrelationId' via the Vision SDK. Default is false, and 'deviceCorrelationId' must be set in this request body. + /// Initializes a new instance of . + /// The unique ID to reference this session. + /// DateTime when this session was created. + /// DateTime when this session was started by the client. + /// Whether or not the session is expired. /// Unique Guid per each end-user device. This is to provide rate limiting and anti-hammering. If 'deviceCorrelationIdSetInClient' is true in this request, this 'deviceCorrelationId' must be null. /// Seconds the session should last for. Range is 60 to 86400 seconds. Default value is 600. - /// A new instance for mocking. - public static CreateLivenessSessionContent CreateLivenessSessionContent(LivenessOperationMode livenessOperationMode = default, bool? sendResultsToClient = null, bool? deviceCorrelationIdSetInClient = null, string deviceCorrelationId = null, int? authTokenTimeToLiveInSeconds = null) + /// A new instance for mocking. + public static LivenessSessionItem LivenessSessionItem(string id = null, DateTimeOffset createdDateTime = default, DateTimeOffset? sessionStartDateTime = null, bool sessionExpired = default, string deviceCorrelationId = null, int? authTokenTimeToLiveInSeconds = null) { - return new CreateLivenessSessionContent( - livenessOperationMode, - sendResultsToClient, - deviceCorrelationIdSetInClient, + return new LivenessSessionItem( + id, + createdDateTime, + sessionStartDateTime, + sessionExpired, deviceCorrelationId, authTokenTimeToLiveInSeconds, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The unique session ID of the created session. It will expire 48 hours after it was created or may be deleted sooner using the corresponding Session DELETE operation. /// Bearer token to provide authentication for the Vision SDK running on a client application. This Bearer token has limited permissions to perform only the required action and expires after the TTL time. It is also auditable. - /// A new instance for mocking. - public static CreateLivenessSessionResult CreateLivenessSessionResult(string sessionId = null, string authToken = null) + /// The detail of face for verification. + /// A new instance for mocking. + public static CreateLivenessWithVerifySessionResult CreateLivenessWithVerifySessionResult(string sessionId = null, string authToken = null, LivenessWithVerifyImage verifyImage = null) { - return new CreateLivenessSessionResult(sessionId, authToken, serializedAdditionalRawData: null); + return new CreateLivenessWithVerifySessionResult(sessionId, authToken, verifyImage, serializedAdditionalRawData: null); } /// Initializes a new instance of . @@ -467,15 +477,5 @@ public static LivenessWithVerifySession LivenessWithVerifySession(string id = nu result, serializedAdditionalRawData: null); } - - /// Initializes a new instance of . - /// The unique session ID of the created session. It will expire 48 hours after it was created or may be deleted sooner using the corresponding Session DELETE operation. - /// Bearer token to provide authentication for the Vision SDK running on a client application. This Bearer token has limited permissions to perform only the required action and expires after the TTL time. It is also auditable. - /// The detail of face for verification. - /// A new instance for mocking. - public static CreateLivenessWithVerifySessionResult CreateLivenessWithVerifySessionResult(string sessionId = null, string authToken = null, LivenessWithVerifyImage verifyImage = null) - { - return new CreateLivenessWithVerifySessionResult(sessionId, authToken, verifyImage, serializedAdditionalRawData: null); - } } } diff --git a/sdk/face/Azure.AI.Vision.Face/src/Generated/Docs/FaceClient.xml b/sdk/face/Azure.AI.Vision.Face/src/Generated/Docs/FaceClient.xml index f2ad2a266d22..14e05d4067a3 100644 --- a/sdk/face/Azure.AI.Vision.Face/src/Generated/Docs/FaceClient.xml +++ b/sdk/face/Azure.AI.Vision.Face/src/Generated/Docs/FaceClient.xml @@ -5,197 +5,108 @@ This sample shows how to call FindSimilarAsync. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceClient client = new FaceClient(endpoint, credential); -Response> response = await client.FindSimilarAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), new Guid[] { Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a") }); -]]> -This sample shows how to call FindSimilarAsync with all parameters. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -FaceClient client = new FaceClient(endpoint, credential); - -Response> response = await client.FindSimilarAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), new Guid[] { Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a") }, maxNumOfCandidatesReturned: 1234, mode: FindSimilarMatchMode.MatchPerson); +Response> response = await client.FindSimilarAsync(Guid.Parse("c5c24a82-6845-4031-9d5d-978df9175426"), new Guid[] { Guid.Parse("015839fb-fbd9-4f79-ace9-7675fc2f1dd9"), Guid.Parse("be386ab3-af91-4104-9e6d-4dae4c9fddb7") }); ]]> This sample shows how to call FindSimilar. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -FaceClient client = new FaceClient(endpoint, credential); - -Response> response = client.FindSimilar(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), new Guid[] { Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a") }); -]]> -This sample shows how to call FindSimilar with all parameters. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceClient client = new FaceClient(endpoint, credential); -Response> response = client.FindSimilar(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), new Guid[] { Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a") }, maxNumOfCandidatesReturned: 1234, mode: FindSimilarMatchMode.MatchPerson); +Response> response = client.FindSimilar(Guid.Parse("c5c24a82-6845-4031-9d5d-978df9175426"), new Guid[] { Guid.Parse("015839fb-fbd9-4f79-ace9-7675fc2f1dd9"), Guid.Parse("be386ab3-af91-4104-9e6d-4dae4c9fddb7") }); ]]> This sample shows how to call FindSimilarAsync and parse the result. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceClient client = new FaceClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - faceId = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", - faceIds = new object[] - { - "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a" - }, -}); -Response response = await client.FindSimilarAsync(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result[0].GetProperty("confidence").ToString()); -]]> -This sample shows how to call FindSimilarAsync with all request content and parse the result. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -FaceClient client = new FaceClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - faceId = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", - maxNumOfCandidatesReturned = 1234, + faceId = "c5c24a82-6845-4031-9d5d-978df9175426", + maxNumOfCandidatesReturned = 3, mode = "matchPerson", faceIds = new object[] { - "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a" + "015839fb-fbd9-4f79-ace9-7675fc2f1dd9", + "be386ab3-af91-4104-9e6d-4dae4c9fddb7" }, }); Response response = await client.FindSimilarAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].GetProperty("confidence").ToString()); -Console.WriteLine(result[0].GetProperty("faceId").ToString()); -Console.WriteLine(result[0].GetProperty("persistedFaceId").ToString()); ]]> This sample shows how to call FindSimilar and parse the result. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceClient client = new FaceClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - faceId = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", - faceIds = new object[] - { - "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a" - }, -}); -Response response = client.FindSimilar(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result[0].GetProperty("confidence").ToString()); -]]> -This sample shows how to call FindSimilar with all request content and parse the result. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -FaceClient client = new FaceClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - faceId = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", - maxNumOfCandidatesReturned = 1234, + faceId = "c5c24a82-6845-4031-9d5d-978df9175426", + maxNumOfCandidatesReturned = 3, mode = "matchPerson", faceIds = new object[] { - "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a" + "015839fb-fbd9-4f79-ace9-7675fc2f1dd9", + "be386ab3-af91-4104-9e6d-4dae4c9fddb7" }, }); Response response = client.FindSimilar(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].GetProperty("confidence").ToString()); -Console.WriteLine(result[0].GetProperty("faceId").ToString()); -Console.WriteLine(result[0].GetProperty("persistedFaceId").ToString()); ]]> This sample shows how to call VerifyFaceToFaceAsync. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -FaceClient client = new FaceClient(endpoint, credential); - -Response response = await client.VerifyFaceToFaceAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); -]]> -This sample shows how to call VerifyFaceToFaceAsync with all parameters. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceClient client = new FaceClient(endpoint, credential); -Response response = await client.VerifyFaceToFaceAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); +Response response = await client.VerifyFaceToFaceAsync(Guid.Parse("c5c24a82-6845-4031-9d5d-978df9175426"), Guid.Parse("3aa87e30-b380-48eb-ad9e-1aa54fc52bd3")); ]]> This sample shows how to call VerifyFaceToFace. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceClient client = new FaceClient(endpoint, credential); -Response response = client.VerifyFaceToFace(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); -]]> -This sample shows how to call VerifyFaceToFace with all parameters. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -FaceClient client = new FaceClient(endpoint, credential); - -Response response = client.VerifyFaceToFace(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); +Response response = client.VerifyFaceToFace(Guid.Parse("c5c24a82-6845-4031-9d5d-978df9175426"), Guid.Parse("3aa87e30-b380-48eb-ad9e-1aa54fc52bd3")); ]]> This sample shows how to call VerifyFaceToFaceAsync and parse the result. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -FaceClient client = new FaceClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - faceId1 = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", - faceId2 = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", -}); -Response response = await client.VerifyFaceToFaceAsync(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("isIdentical").ToString()); -Console.WriteLine(result.GetProperty("confidence").ToString()); -]]> -This sample shows how to call VerifyFaceToFaceAsync with all request content and parse the result. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceClient client = new FaceClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - faceId1 = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", - faceId2 = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", + faceId1 = "c5c24a82-6845-4031-9d5d-978df9175426", + faceId2 = "3aa87e30-b380-48eb-ad9e-1aa54fc52bd3", }); Response response = await client.VerifyFaceToFaceAsync(content); @@ -208,31 +119,14 @@ Console.WriteLine(result.GetProperty("confidence").ToString()); This sample shows how to call VerifyFaceToFace and parse the result. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceClient client = new FaceClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - faceId1 = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", - faceId2 = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", -}); -Response response = client.VerifyFaceToFace(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("isIdentical").ToString()); -Console.WriteLine(result.GetProperty("confidence").ToString()); -]]> -This sample shows how to call VerifyFaceToFace with all request content and parse the result. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -FaceClient client = new FaceClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - faceId1 = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", - faceId2 = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", + faceId1 = "c5c24a82-6845-4031-9d5d-978df9175426", + faceId2 = "3aa87e30-b380-48eb-ad9e-1aa54fc52bd3", }); Response response = client.VerifyFaceToFace(content); @@ -245,45 +139,29 @@ Console.WriteLine(result.GetProperty("confidence").ToString()); This sample shows how to call GroupAsync. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceClient client = new FaceClient(endpoint, credential); -Response response = await client.GroupAsync(new Guid[] { Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a") }); -]]> -This sample shows how to call GroupAsync with all parameters. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -FaceClient client = new FaceClient(endpoint, credential); - -Response response = await client.GroupAsync(new Guid[] { Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a") }); +Response response = await client.GroupAsync(new Guid[] { Guid.Parse("c5c24a82-6845-4031-9d5d-978df9175426"), Guid.Parse("015839fb-fbd9-4f79-ace9-7675fc2f1dd9"), Guid.Parse("65d083d4-9447-47d1-af30-b626144bf0fb"), Guid.Parse("fce92aed-d578-4d2e-8114-068f8af4492e"), Guid.Parse("30ea1073-cc9e-4652-b1e3-d08fb7b95315"), Guid.Parse("be386ab3-af91-4104-9e6d-4dae4c9fddb7"), Guid.Parse("fbd2a038-dbff-452c-8e79-2ee81b1aa84e"), Guid.Parse("b64d5e15-8257-4af2-b20a-5a750f8940e7") }); ]]> This sample shows how to call Group. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceClient client = new FaceClient(endpoint, credential); -Response response = client.Group(new Guid[] { Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a") }); -]]> -This sample shows how to call Group with all parameters. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -FaceClient client = new FaceClient(endpoint, credential); - -Response response = client.Group(new Guid[] { Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a") }); +Response response = client.Group(new Guid[] { Guid.Parse("c5c24a82-6845-4031-9d5d-978df9175426"), Guid.Parse("015839fb-fbd9-4f79-ace9-7675fc2f1dd9"), Guid.Parse("65d083d4-9447-47d1-af30-b626144bf0fb"), Guid.Parse("fce92aed-d578-4d2e-8114-068f8af4492e"), Guid.Parse("30ea1073-cc9e-4652-b1e3-d08fb7b95315"), Guid.Parse("be386ab3-af91-4104-9e6d-4dae4c9fddb7"), Guid.Parse("fbd2a038-dbff-452c-8e79-2ee81b1aa84e"), Guid.Parse("b64d5e15-8257-4af2-b20a-5a750f8940e7") }); ]]> This sample shows how to call GroupAsync and parse the result. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceClient client = new FaceClient(endpoint, credential); @@ -291,26 +169,14 @@ using RequestContent content = RequestContent.Create(new { faceIds = new object[] { - "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a" - }, -}); -Response response = await client.GroupAsync(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("groups")[0][0].ToString()); -Console.WriteLine(result.GetProperty("messyGroup")[0].ToString()); -]]> -This sample shows how to call GroupAsync with all request content and parse the result. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -FaceClient client = new FaceClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - faceIds = new object[] - { - "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a" + "c5c24a82-6845-4031-9d5d-978df9175426", + "015839fb-fbd9-4f79-ace9-7675fc2f1dd9", + "65d083d4-9447-47d1-af30-b626144bf0fb", + "fce92aed-d578-4d2e-8114-068f8af4492e", + "30ea1073-cc9e-4652-b1e3-d08fb7b95315", + "be386ab3-af91-4104-9e6d-4dae4c9fddb7", + "fbd2a038-dbff-452c-8e79-2ee81b1aa84e", + "b64d5e15-8257-4af2-b20a-5a750f8940e7" }, }); Response response = await client.GroupAsync(content); @@ -324,26 +190,7 @@ Console.WriteLine(result.GetProperty("messyGroup")[0].ToString()); This sample shows how to call Group and parse the result. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -FaceClient client = new FaceClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - faceIds = new object[] - { - "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a" - }, -}); -Response response = client.Group(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("groups")[0][0].ToString()); -Console.WriteLine(result.GetProperty("messyGroup")[0].ToString()); -]]> -This sample shows how to call Group with all request content and parse the result. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceClient client = new FaceClient(endpoint, credential); @@ -351,7 +198,14 @@ using RequestContent content = RequestContent.Create(new { faceIds = new object[] { - "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a" + "c5c24a82-6845-4031-9d5d-978df9175426", + "015839fb-fbd9-4f79-ace9-7675fc2f1dd9", + "65d083d4-9447-47d1-af30-b626144bf0fb", + "fce92aed-d578-4d2e-8114-068f8af4492e", + "30ea1073-cc9e-4652-b1e3-d08fb7b95315", + "be386ab3-af91-4104-9e6d-4dae4c9fddb7", + "fbd2a038-dbff-452c-8e79-2ee81b1aa84e", + "b64d5e15-8257-4af2-b20a-5a750f8940e7" }, }); Response response = client.Group(content); diff --git a/sdk/face/Azure.AI.Vision.Face/src/Generated/Docs/FaceSessionClient.xml b/sdk/face/Azure.AI.Vision.Face/src/Generated/Docs/FaceSessionClient.xml index d3172ec4d1d1..3ab65974a572 100644 --- a/sdk/face/Azure.AI.Vision.Face/src/Generated/Docs/FaceSessionClient.xml +++ b/sdk/face/Azure.AI.Vision.Face/src/Generated/Docs/FaceSessionClient.xml @@ -5,16 +5,7 @@ This sample shows how to call CreateLivenessSessionAsync. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -FaceSessionClient client = new FaceSessionClient(endpoint, credential); - -CreateLivenessSessionContent body = new CreateLivenessSessionContent(LivenessOperationMode.Passive); -Response response = await client.CreateLivenessSessionAsync(body); -]]> -This sample shows how to call CreateLivenessSessionAsync with all parameters. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceSessionClient client = new FaceSessionClient(endpoint, credential); @@ -22,8 +13,8 @@ CreateLivenessSessionContent body = new CreateLivenessSessionContent(LivenessOpe { SendResultsToClient = true, DeviceCorrelationIdSetInClient = true, - DeviceCorrelationId = "", - AuthTokenTimeToLiveInSeconds = 1234, + DeviceCorrelationId = "your_device_correlation_id", + AuthTokenTimeToLiveInSeconds = 60, }; Response response = await client.CreateLivenessSessionAsync(body); ]]> @@ -32,16 +23,7 @@ Response response = await client.CreateLivenessSess This sample shows how to call CreateLivenessSession. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -FaceSessionClient client = new FaceSessionClient(endpoint, credential); - -CreateLivenessSessionContent body = new CreateLivenessSessionContent(LivenessOperationMode.Passive); -Response response = client.CreateLivenessSession(body); -]]> -This sample shows how to call CreateLivenessSession with all parameters. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceSessionClient client = new FaceSessionClient(endpoint, credential); @@ -49,8 +31,8 @@ CreateLivenessSessionContent body = new CreateLivenessSessionContent(LivenessOpe { SendResultsToClient = true, DeviceCorrelationIdSetInClient = true, - DeviceCorrelationId = "", - AuthTokenTimeToLiveInSeconds = 1234, + DeviceCorrelationId = "your_device_correlation_id", + AuthTokenTimeToLiveInSeconds = 60, }; Response response = client.CreateLivenessSession(body); ]]> @@ -59,23 +41,7 @@ Response response = client.CreateLivenessSession(bo This sample shows how to call CreateLivenessSessionAsync and parse the result. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -FaceSessionClient client = new FaceSessionClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - livenessOperationMode = "Passive", -}); -Response response = await client.CreateLivenessSessionAsync(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("sessionId").ToString()); -Console.WriteLine(result.GetProperty("authToken").ToString()); -]]> -This sample shows how to call CreateLivenessSessionAsync with all request content and parse the result. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceSessionClient client = new FaceSessionClient(endpoint, credential); @@ -84,8 +50,8 @@ using RequestContent content = RequestContent.Create(new livenessOperationMode = "Passive", sendResultsToClient = true, deviceCorrelationIdSetInClient = true, - deviceCorrelationId = "", - authTokenTimeToLiveInSeconds = 1234, + deviceCorrelationId = "your_device_correlation_id", + authTokenTimeToLiveInSeconds = 60, }); Response response = await client.CreateLivenessSessionAsync(content); @@ -98,23 +64,7 @@ Console.WriteLine(result.GetProperty("authToken").ToString()); This sample shows how to call CreateLivenessSession and parse the result. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -FaceSessionClient client = new FaceSessionClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - livenessOperationMode = "Passive", -}); -Response response = client.CreateLivenessSession(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("sessionId").ToString()); -Console.WriteLine(result.GetProperty("authToken").ToString()); -]]> -This sample shows how to call CreateLivenessSession with all request content and parse the result. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceSessionClient client = new FaceSessionClient(endpoint, credential); @@ -123,8 +73,8 @@ using RequestContent content = RequestContent.Create(new livenessOperationMode = "Passive", sendResultsToClient = true, deviceCorrelationIdSetInClient = true, - deviceCorrelationId = "", - authTokenTimeToLiveInSeconds = 1234, + deviceCorrelationId = "your_device_correlation_id", + authTokenTimeToLiveInSeconds = 60, }); Response response = client.CreateLivenessSession(content); @@ -137,21 +87,11 @@ Console.WriteLine(result.GetProperty("authToken").ToString()); This sample shows how to call DeleteLivenessSessionAsync. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -FaceSessionClient client = new FaceSessionClient(endpoint, credential); - -Response response = await client.DeleteLivenessSessionAsync(""); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call DeleteLivenessSessionAsync with all parameters. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceSessionClient client = new FaceSessionClient(endpoint, credential); -Response response = await client.DeleteLivenessSessionAsync(""); +Response response = await client.DeleteLivenessSessionAsync("b12e033e-bda7-4b83-a211-e721c661f30e"); Console.WriteLine(response.Status); ]]> @@ -160,21 +100,11 @@ Console.WriteLine(response.Status); This sample shows how to call DeleteLivenessSession. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -FaceSessionClient client = new FaceSessionClient(endpoint, credential); - -Response response = client.DeleteLivenessSession(""); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call DeleteLivenessSession with all parameters. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceSessionClient client = new FaceSessionClient(endpoint, credential); -Response response = client.DeleteLivenessSession(""); +Response response = client.DeleteLivenessSession("b12e033e-bda7-4b83-a211-e721c661f30e"); Console.WriteLine(response.Status); ]]> @@ -183,315 +113,143 @@ Console.WriteLine(response.Status); This sample shows how to call GetLivenessSessionResultAsync. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceSessionClient client = new FaceSessionClient(endpoint, credential); -Response response = await client.GetLivenessSessionResultAsync(""); -]]> -This sample shows how to call GetLivenessSessionResultAsync with all parameters. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -FaceSessionClient client = new FaceSessionClient(endpoint, credential); - -Response response = await client.GetLivenessSessionResultAsync(""); +Response response = await client.GetLivenessSessionResultAsync("b12e033e-bda7-4b83-a211-e721c661f30e"); ]]> This sample shows how to call GetLivenessSessionResult. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -FaceSessionClient client = new FaceSessionClient(endpoint, credential); - -Response response = client.GetLivenessSessionResult(""); -]]> -This sample shows how to call GetLivenessSessionResult with all parameters. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceSessionClient client = new FaceSessionClient(endpoint, credential); -Response response = client.GetLivenessSessionResult(""); +Response response = client.GetLivenessSessionResult("b12e033e-bda7-4b83-a211-e721c661f30e"); ]]> This sample shows how to call GetLivenessSessionResultAsync and parse the result. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -FaceSessionClient client = new FaceSessionClient(endpoint, credential); - -Response response = await client.GetLivenessSessionResultAsync("", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("createdDateTime").ToString()); -Console.WriteLine(result.GetProperty("sessionExpired").ToString()); -Console.WriteLine(result.GetProperty("status").ToString()); -]]> -This sample shows how to call GetLivenessSessionResultAsync with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceSessionClient client = new FaceSessionClient(endpoint, credential); -Response response = await client.GetLivenessSessionResultAsync("", null); +Response response = await client.GetLivenessSessionResultAsync("b12e033e-bda7-4b83-a211-e721c661f30e", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); -Console.WriteLine(result.GetProperty("sessionStartDateTime").ToString()); Console.WriteLine(result.GetProperty("sessionExpired").ToString()); -Console.WriteLine(result.GetProperty("deviceCorrelationId").ToString()); -Console.WriteLine(result.GetProperty("authTokenTimeToLiveInSeconds").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("sessionId").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("requestId").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("clientRequestId").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("receivedDateTime").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("request").GetProperty("url").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("request").GetProperty("method").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("request").GetProperty("contentLength").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("request").GetProperty("contentType").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("request").GetProperty("userAgent").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("livenessDecision").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("faceRectangle").GetProperty("top").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("faceRectangle").GetProperty("left").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("faceRectangle").GetProperty("width").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("faceRectangle").GetProperty("height").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("fileName").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("timeOffsetWithinFile").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("imageType").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("modelVersionUsed").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("faceRectangle").GetProperty("top").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("faceRectangle").GetProperty("left").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("faceRectangle").GetProperty("width").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("faceRectangle").GetProperty("height").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("qualityForRecognition").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("matchConfidence").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("isIdentical").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("statusCode").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("latencyInMilliseconds").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("digest").ToString()); ]]> This sample shows how to call GetLivenessSessionResult and parse the result. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -FaceSessionClient client = new FaceSessionClient(endpoint, credential); - -Response response = client.GetLivenessSessionResult("", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("createdDateTime").ToString()); -Console.WriteLine(result.GetProperty("sessionExpired").ToString()); -Console.WriteLine(result.GetProperty("status").ToString()); -]]> -This sample shows how to call GetLivenessSessionResult with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceSessionClient client = new FaceSessionClient(endpoint, credential); -Response response = client.GetLivenessSessionResult("", null); +Response response = client.GetLivenessSessionResult("b12e033e-bda7-4b83-a211-e721c661f30e", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); -Console.WriteLine(result.GetProperty("sessionStartDateTime").ToString()); Console.WriteLine(result.GetProperty("sessionExpired").ToString()); -Console.WriteLine(result.GetProperty("deviceCorrelationId").ToString()); -Console.WriteLine(result.GetProperty("authTokenTimeToLiveInSeconds").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("sessionId").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("requestId").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("clientRequestId").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("receivedDateTime").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("request").GetProperty("url").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("request").GetProperty("method").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("request").GetProperty("contentLength").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("request").GetProperty("contentType").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("request").GetProperty("userAgent").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("livenessDecision").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("faceRectangle").GetProperty("top").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("faceRectangle").GetProperty("left").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("faceRectangle").GetProperty("width").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("faceRectangle").GetProperty("height").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("fileName").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("timeOffsetWithinFile").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("imageType").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("modelVersionUsed").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("faceRectangle").GetProperty("top").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("faceRectangle").GetProperty("left").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("faceRectangle").GetProperty("width").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("faceRectangle").GetProperty("height").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("qualityForRecognition").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("matchConfidence").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("isIdentical").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("statusCode").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("latencyInMilliseconds").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("digest").ToString()); ]]> This sample shows how to call GetLivenessSessionsAsync. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceSessionClient client = new FaceSessionClient(endpoint, credential); Response> response = await client.GetLivenessSessionsAsync(); -]]> -This sample shows how to call GetLivenessSessionsAsync with all parameters. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -FaceSessionClient client = new FaceSessionClient(endpoint, credential); - -Response> response = await client.GetLivenessSessionsAsync(start: "", top: 1234); ]]> This sample shows how to call GetLivenessSessions. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceSessionClient client = new FaceSessionClient(endpoint, credential); Response> response = client.GetLivenessSessions(); -]]> -This sample shows how to call GetLivenessSessions with all parameters. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -FaceSessionClient client = new FaceSessionClient(endpoint, credential); - -Response> response = client.GetLivenessSessions(start: "", top: 1234); ]]> This sample shows how to call GetLivenessSessionsAsync and parse the result. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -FaceSessionClient client = new FaceSessionClient(endpoint, credential); - -Response response = await client.GetLivenessSessionsAsync(null, null, null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result[0].GetProperty("id").ToString()); -Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); -Console.WriteLine(result[0].GetProperty("sessionExpired").ToString()); -]]> -This sample shows how to call GetLivenessSessionsAsync with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceSessionClient client = new FaceSessionClient(endpoint, credential); -Response response = await client.GetLivenessSessionsAsync("", 1234, null); +Response response = await client.GetLivenessSessionsAsync("00000000-0000-0000-0000-000000000000", 20, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].GetProperty("id").ToString()); Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); -Console.WriteLine(result[0].GetProperty("sessionStartDateTime").ToString()); Console.WriteLine(result[0].GetProperty("sessionExpired").ToString()); -Console.WriteLine(result[0].GetProperty("deviceCorrelationId").ToString()); -Console.WriteLine(result[0].GetProperty("authTokenTimeToLiveInSeconds").ToString()); ]]> This sample shows how to call GetLivenessSessions and parse the result. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceSessionClient client = new FaceSessionClient(endpoint, credential); -Response response = client.GetLivenessSessions(null, null, null); +Response response = client.GetLivenessSessions("00000000-0000-0000-0000-000000000000", 20, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].GetProperty("id").ToString()); Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); Console.WriteLine(result[0].GetProperty("sessionExpired").ToString()); -]]> -This sample shows how to call GetLivenessSessions with all parameters and parse the result. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -FaceSessionClient client = new FaceSessionClient(endpoint, credential); - -Response response = client.GetLivenessSessions("", 1234, null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result[0].GetProperty("id").ToString()); -Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); -Console.WriteLine(result[0].GetProperty("sessionStartDateTime").ToString()); -Console.WriteLine(result[0].GetProperty("sessionExpired").ToString()); -Console.WriteLine(result[0].GetProperty("deviceCorrelationId").ToString()); -Console.WriteLine(result[0].GetProperty("authTokenTimeToLiveInSeconds").ToString()); ]]> This sample shows how to call GetLivenessSessionAuditEntriesAsync. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -FaceSessionClient client = new FaceSessionClient(endpoint, credential); - -Response> response = await client.GetLivenessSessionAuditEntriesAsync(""); -]]> -This sample shows how to call GetLivenessSessionAuditEntriesAsync with all parameters. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceSessionClient client = new FaceSessionClient(endpoint, credential); -Response> response = await client.GetLivenessSessionAuditEntriesAsync("", start: "", top: 1234); +Response> response = await client.GetLivenessSessionAuditEntriesAsync("b12e033e-bda7-4b83-a211-e721c661f30e"); ]]> This sample shows how to call GetLivenessSessionAuditEntries. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -FaceSessionClient client = new FaceSessionClient(endpoint, credential); - -Response> response = client.GetLivenessSessionAuditEntries(""); -]]> -This sample shows how to call GetLivenessSessionAuditEntries with all parameters. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceSessionClient client = new FaceSessionClient(endpoint, credential); -Response> response = client.GetLivenessSessionAuditEntries("", start: "", top: 1234); +Response> response = client.GetLivenessSessionAuditEntries("b12e033e-bda7-4b83-a211-e721c661f30e"); ]]> This sample shows how to call GetLivenessSessionAuditEntriesAsync and parse the result. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceSessionClient client = new FaceSessionClient(endpoint, credential); -Response response = await client.GetLivenessSessionAuditEntriesAsync("", null, null, null); +Response response = await client.GetLivenessSessionAuditEntriesAsync("b12e033e-bda7-4b83-a211-e721c661f30e", "0", 20, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].GetProperty("id").ToString()); @@ -506,56 +264,17 @@ Console.WriteLine(result[0].GetProperty("response").GetProperty("body").ToString Console.WriteLine(result[0].GetProperty("response").GetProperty("statusCode").ToString()); Console.WriteLine(result[0].GetProperty("response").GetProperty("latencyInMilliseconds").ToString()); Console.WriteLine(result[0].GetProperty("digest").ToString()); -]]> -This sample shows how to call GetLivenessSessionAuditEntriesAsync with all parameters and parse the result. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -FaceSessionClient client = new FaceSessionClient(endpoint, credential); - -Response response = await client.GetLivenessSessionAuditEntriesAsync("", "", 1234, null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result[0].GetProperty("id").ToString()); -Console.WriteLine(result[0].GetProperty("sessionId").ToString()); -Console.WriteLine(result[0].GetProperty("requestId").ToString()); -Console.WriteLine(result[0].GetProperty("clientRequestId").ToString()); -Console.WriteLine(result[0].GetProperty("receivedDateTime").ToString()); -Console.WriteLine(result[0].GetProperty("request").GetProperty("url").ToString()); -Console.WriteLine(result[0].GetProperty("request").GetProperty("method").ToString()); -Console.WriteLine(result[0].GetProperty("request").GetProperty("contentLength").ToString()); -Console.WriteLine(result[0].GetProperty("request").GetProperty("contentType").ToString()); -Console.WriteLine(result[0].GetProperty("request").GetProperty("userAgent").ToString()); -Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("livenessDecision").ToString()); -Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("faceRectangle").GetProperty("top").ToString()); -Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("faceRectangle").GetProperty("left").ToString()); -Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("faceRectangle").GetProperty("width").ToString()); -Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("faceRectangle").GetProperty("height").ToString()); -Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("fileName").ToString()); -Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("timeOffsetWithinFile").ToString()); -Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("imageType").ToString()); -Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("modelVersionUsed").ToString()); -Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("faceRectangle").GetProperty("top").ToString()); -Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("faceRectangle").GetProperty("left").ToString()); -Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("faceRectangle").GetProperty("width").ToString()); -Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("faceRectangle").GetProperty("height").ToString()); -Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("qualityForRecognition").ToString()); -Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("matchConfidence").ToString()); -Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("isIdentical").ToString()); -Console.WriteLine(result[0].GetProperty("response").GetProperty("statusCode").ToString()); -Console.WriteLine(result[0].GetProperty("response").GetProperty("latencyInMilliseconds").ToString()); -Console.WriteLine(result[0].GetProperty("digest").ToString()); ]]> This sample shows how to call GetLivenessSessionAuditEntries and parse the result. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceSessionClient client = new FaceSessionClient(endpoint, credential); -Response response = client.GetLivenessSessionAuditEntries("", null, null, null); +Response response = client.GetLivenessSessionAuditEntries("b12e033e-bda7-4b83-a211-e721c661f30e", "0", 20, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].GetProperty("id").ToString()); @@ -570,66 +289,17 @@ Console.WriteLine(result[0].GetProperty("response").GetProperty("body").ToString Console.WriteLine(result[0].GetProperty("response").GetProperty("statusCode").ToString()); Console.WriteLine(result[0].GetProperty("response").GetProperty("latencyInMilliseconds").ToString()); Console.WriteLine(result[0].GetProperty("digest").ToString()); -]]> -This sample shows how to call GetLivenessSessionAuditEntries with all parameters and parse the result. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -FaceSessionClient client = new FaceSessionClient(endpoint, credential); - -Response response = client.GetLivenessSessionAuditEntries("", "", 1234, null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result[0].GetProperty("id").ToString()); -Console.WriteLine(result[0].GetProperty("sessionId").ToString()); -Console.WriteLine(result[0].GetProperty("requestId").ToString()); -Console.WriteLine(result[0].GetProperty("clientRequestId").ToString()); -Console.WriteLine(result[0].GetProperty("receivedDateTime").ToString()); -Console.WriteLine(result[0].GetProperty("request").GetProperty("url").ToString()); -Console.WriteLine(result[0].GetProperty("request").GetProperty("method").ToString()); -Console.WriteLine(result[0].GetProperty("request").GetProperty("contentLength").ToString()); -Console.WriteLine(result[0].GetProperty("request").GetProperty("contentType").ToString()); -Console.WriteLine(result[0].GetProperty("request").GetProperty("userAgent").ToString()); -Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("livenessDecision").ToString()); -Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("faceRectangle").GetProperty("top").ToString()); -Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("faceRectangle").GetProperty("left").ToString()); -Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("faceRectangle").GetProperty("width").ToString()); -Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("faceRectangle").GetProperty("height").ToString()); -Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("fileName").ToString()); -Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("timeOffsetWithinFile").ToString()); -Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("imageType").ToString()); -Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("modelVersionUsed").ToString()); -Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("faceRectangle").GetProperty("top").ToString()); -Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("faceRectangle").GetProperty("left").ToString()); -Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("faceRectangle").GetProperty("width").ToString()); -Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("faceRectangle").GetProperty("height").ToString()); -Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("qualityForRecognition").ToString()); -Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("matchConfidence").ToString()); -Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("isIdentical").ToString()); -Console.WriteLine(result[0].GetProperty("response").GetProperty("statusCode").ToString()); -Console.WriteLine(result[0].GetProperty("response").GetProperty("latencyInMilliseconds").ToString()); -Console.WriteLine(result[0].GetProperty("digest").ToString()); ]]> This sample shows how to call DeleteLivenessWithVerifySessionAsync. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -FaceSessionClient client = new FaceSessionClient(endpoint, credential); - -Response response = await client.DeleteLivenessWithVerifySessionAsync(""); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call DeleteLivenessWithVerifySessionAsync with all parameters. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceSessionClient client = new FaceSessionClient(endpoint, credential); -Response response = await client.DeleteLivenessWithVerifySessionAsync(""); +Response response = await client.DeleteLivenessWithVerifySessionAsync("b12e033e-bda7-4b83-a211-e721c661f30e"); Console.WriteLine(response.Status); ]]> @@ -638,21 +308,11 @@ Console.WriteLine(response.Status); This sample shows how to call DeleteLivenessWithVerifySession. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceSessionClient client = new FaceSessionClient(endpoint, credential); -Response response = client.DeleteLivenessWithVerifySession(""); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call DeleteLivenessWithVerifySession with all parameters. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -FaceSessionClient client = new FaceSessionClient(endpoint, credential); - -Response response = client.DeleteLivenessWithVerifySession(""); +Response response = client.DeleteLivenessWithVerifySession("b12e033e-bda7-4b83-a211-e721c661f30e"); Console.WriteLine(response.Status); ]]> @@ -661,315 +321,143 @@ Console.WriteLine(response.Status); This sample shows how to call GetLivenessWithVerifySessionResultAsync. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceSessionClient client = new FaceSessionClient(endpoint, credential); -Response response = await client.GetLivenessWithVerifySessionResultAsync(""); -]]> -This sample shows how to call GetLivenessWithVerifySessionResultAsync with all parameters. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -FaceSessionClient client = new FaceSessionClient(endpoint, credential); - -Response response = await client.GetLivenessWithVerifySessionResultAsync(""); +Response response = await client.GetLivenessWithVerifySessionResultAsync("b12e033e-bda7-4b83-a211-e721c661f30e"); ]]> This sample shows how to call GetLivenessWithVerifySessionResult. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -FaceSessionClient client = new FaceSessionClient(endpoint, credential); - -Response response = client.GetLivenessWithVerifySessionResult(""); -]]> -This sample shows how to call GetLivenessWithVerifySessionResult with all parameters. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceSessionClient client = new FaceSessionClient(endpoint, credential); -Response response = client.GetLivenessWithVerifySessionResult(""); +Response response = client.GetLivenessWithVerifySessionResult("b12e033e-bda7-4b83-a211-e721c661f30e"); ]]> This sample shows how to call GetLivenessWithVerifySessionResultAsync and parse the result. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -FaceSessionClient client = new FaceSessionClient(endpoint, credential); - -Response response = await client.GetLivenessWithVerifySessionResultAsync("", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("createdDateTime").ToString()); -Console.WriteLine(result.GetProperty("sessionExpired").ToString()); -Console.WriteLine(result.GetProperty("status").ToString()); -]]> -This sample shows how to call GetLivenessWithVerifySessionResultAsync with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceSessionClient client = new FaceSessionClient(endpoint, credential); -Response response = await client.GetLivenessWithVerifySessionResultAsync("", null); +Response response = await client.GetLivenessWithVerifySessionResultAsync("b12e033e-bda7-4b83-a211-e721c661f30e", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); -Console.WriteLine(result.GetProperty("sessionStartDateTime").ToString()); Console.WriteLine(result.GetProperty("sessionExpired").ToString()); -Console.WriteLine(result.GetProperty("deviceCorrelationId").ToString()); -Console.WriteLine(result.GetProperty("authTokenTimeToLiveInSeconds").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("sessionId").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("requestId").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("clientRequestId").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("receivedDateTime").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("request").GetProperty("url").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("request").GetProperty("method").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("request").GetProperty("contentLength").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("request").GetProperty("contentType").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("request").GetProperty("userAgent").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("livenessDecision").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("faceRectangle").GetProperty("top").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("faceRectangle").GetProperty("left").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("faceRectangle").GetProperty("width").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("faceRectangle").GetProperty("height").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("fileName").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("timeOffsetWithinFile").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("imageType").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("modelVersionUsed").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("faceRectangle").GetProperty("top").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("faceRectangle").GetProperty("left").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("faceRectangle").GetProperty("width").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("faceRectangle").GetProperty("height").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("qualityForRecognition").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("matchConfidence").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("isIdentical").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("statusCode").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("latencyInMilliseconds").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("digest").ToString()); ]]> This sample shows how to call GetLivenessWithVerifySessionResult and parse the result. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceSessionClient client = new FaceSessionClient(endpoint, credential); -Response response = client.GetLivenessWithVerifySessionResult("", null); +Response response = client.GetLivenessWithVerifySessionResult("b12e033e-bda7-4b83-a211-e721c661f30e", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("sessionExpired").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); -]]> -This sample shows how to call GetLivenessWithVerifySessionResult with all parameters and parse the result. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -FaceSessionClient client = new FaceSessionClient(endpoint, credential); - -Response response = client.GetLivenessWithVerifySessionResult("", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("createdDateTime").ToString()); -Console.WriteLine(result.GetProperty("sessionStartDateTime").ToString()); -Console.WriteLine(result.GetProperty("sessionExpired").ToString()); -Console.WriteLine(result.GetProperty("deviceCorrelationId").ToString()); -Console.WriteLine(result.GetProperty("authTokenTimeToLiveInSeconds").ToString()); -Console.WriteLine(result.GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("sessionId").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("requestId").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("clientRequestId").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("receivedDateTime").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("request").GetProperty("url").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("request").GetProperty("method").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("request").GetProperty("contentLength").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("request").GetProperty("contentType").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("request").GetProperty("userAgent").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("livenessDecision").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("faceRectangle").GetProperty("top").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("faceRectangle").GetProperty("left").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("faceRectangle").GetProperty("width").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("faceRectangle").GetProperty("height").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("fileName").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("timeOffsetWithinFile").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("imageType").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("modelVersionUsed").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("faceRectangle").GetProperty("top").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("faceRectangle").GetProperty("left").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("faceRectangle").GetProperty("width").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("faceRectangle").GetProperty("height").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("qualityForRecognition").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("matchConfidence").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("isIdentical").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("statusCode").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("latencyInMilliseconds").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("digest").ToString()); ]]> This sample shows how to call GetLivenessWithVerifySessionsAsync. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceSessionClient client = new FaceSessionClient(endpoint, credential); Response> response = await client.GetLivenessWithVerifySessionsAsync(); -]]> -This sample shows how to call GetLivenessWithVerifySessionsAsync with all parameters. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -FaceSessionClient client = new FaceSessionClient(endpoint, credential); - -Response> response = await client.GetLivenessWithVerifySessionsAsync(start: "", top: 1234); ]]> This sample shows how to call GetLivenessWithVerifySessions. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceSessionClient client = new FaceSessionClient(endpoint, credential); Response> response = client.GetLivenessWithVerifySessions(); -]]> -This sample shows how to call GetLivenessWithVerifySessions with all parameters. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -FaceSessionClient client = new FaceSessionClient(endpoint, credential); - -Response> response = client.GetLivenessWithVerifySessions(start: "", top: 1234); ]]> This sample shows how to call GetLivenessWithVerifySessionsAsync and parse the result. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -FaceSessionClient client = new FaceSessionClient(endpoint, credential); - -Response response = await client.GetLivenessWithVerifySessionsAsync(null, null, null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result[0].GetProperty("id").ToString()); -Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); -Console.WriteLine(result[0].GetProperty("sessionExpired").ToString()); -]]> -This sample shows how to call GetLivenessWithVerifySessionsAsync with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceSessionClient client = new FaceSessionClient(endpoint, credential); -Response response = await client.GetLivenessWithVerifySessionsAsync("", 1234, null); +Response response = await client.GetLivenessWithVerifySessionsAsync("00000000-0000-0000-0000-000000000000", 20, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].GetProperty("id").ToString()); Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); -Console.WriteLine(result[0].GetProperty("sessionStartDateTime").ToString()); Console.WriteLine(result[0].GetProperty("sessionExpired").ToString()); -Console.WriteLine(result[0].GetProperty("deviceCorrelationId").ToString()); -Console.WriteLine(result[0].GetProperty("authTokenTimeToLiveInSeconds").ToString()); ]]> This sample shows how to call GetLivenessWithVerifySessions and parse the result. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -FaceSessionClient client = new FaceSessionClient(endpoint, credential); - -Response response = client.GetLivenessWithVerifySessions(null, null, null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result[0].GetProperty("id").ToString()); -Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); -Console.WriteLine(result[0].GetProperty("sessionExpired").ToString()); -]]> -This sample shows how to call GetLivenessWithVerifySessions with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceSessionClient client = new FaceSessionClient(endpoint, credential); -Response response = client.GetLivenessWithVerifySessions("", 1234, null); +Response response = client.GetLivenessWithVerifySessions("00000000-0000-0000-0000-000000000000", 20, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].GetProperty("id").ToString()); Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); -Console.WriteLine(result[0].GetProperty("sessionStartDateTime").ToString()); Console.WriteLine(result[0].GetProperty("sessionExpired").ToString()); -Console.WriteLine(result[0].GetProperty("deviceCorrelationId").ToString()); -Console.WriteLine(result[0].GetProperty("authTokenTimeToLiveInSeconds").ToString()); ]]> This sample shows how to call GetLivenessWithVerifySessionAuditEntriesAsync. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -FaceSessionClient client = new FaceSessionClient(endpoint, credential); - -Response> response = await client.GetLivenessWithVerifySessionAuditEntriesAsync(""); -]]> -This sample shows how to call GetLivenessWithVerifySessionAuditEntriesAsync with all parameters. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceSessionClient client = new FaceSessionClient(endpoint, credential); -Response> response = await client.GetLivenessWithVerifySessionAuditEntriesAsync("", start: "", top: 1234); +Response> response = await client.GetLivenessWithVerifySessionAuditEntriesAsync("b12e033e-bda7-4b83-a211-e721c661f30e"); ]]> This sample shows how to call GetLivenessWithVerifySessionAuditEntries. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -FaceSessionClient client = new FaceSessionClient(endpoint, credential); - -Response> response = client.GetLivenessWithVerifySessionAuditEntries(""); -]]> -This sample shows how to call GetLivenessWithVerifySessionAuditEntries with all parameters. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceSessionClient client = new FaceSessionClient(endpoint, credential); -Response> response = client.GetLivenessWithVerifySessionAuditEntries("", start: "", top: 1234); +Response> response = client.GetLivenessWithVerifySessionAuditEntries("b12e033e-bda7-4b83-a211-e721c661f30e"); ]]> This sample shows how to call GetLivenessWithVerifySessionAuditEntriesAsync and parse the result. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceSessionClient client = new FaceSessionClient(endpoint, credential); -Response response = await client.GetLivenessWithVerifySessionAuditEntriesAsync("", null, null, null); +Response response = await client.GetLivenessWithVerifySessionAuditEntriesAsync("b12e033e-bda7-4b83-a211-e721c661f30e", "0", 20, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].GetProperty("id").ToString()); @@ -984,56 +472,17 @@ Console.WriteLine(result[0].GetProperty("response").GetProperty("body").ToString Console.WriteLine(result[0].GetProperty("response").GetProperty("statusCode").ToString()); Console.WriteLine(result[0].GetProperty("response").GetProperty("latencyInMilliseconds").ToString()); Console.WriteLine(result[0].GetProperty("digest").ToString()); -]]> -This sample shows how to call GetLivenessWithVerifySessionAuditEntriesAsync with all parameters and parse the result. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -FaceSessionClient client = new FaceSessionClient(endpoint, credential); - -Response response = await client.GetLivenessWithVerifySessionAuditEntriesAsync("", "", 1234, null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result[0].GetProperty("id").ToString()); -Console.WriteLine(result[0].GetProperty("sessionId").ToString()); -Console.WriteLine(result[0].GetProperty("requestId").ToString()); -Console.WriteLine(result[0].GetProperty("clientRequestId").ToString()); -Console.WriteLine(result[0].GetProperty("receivedDateTime").ToString()); -Console.WriteLine(result[0].GetProperty("request").GetProperty("url").ToString()); -Console.WriteLine(result[0].GetProperty("request").GetProperty("method").ToString()); -Console.WriteLine(result[0].GetProperty("request").GetProperty("contentLength").ToString()); -Console.WriteLine(result[0].GetProperty("request").GetProperty("contentType").ToString()); -Console.WriteLine(result[0].GetProperty("request").GetProperty("userAgent").ToString()); -Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("livenessDecision").ToString()); -Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("faceRectangle").GetProperty("top").ToString()); -Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("faceRectangle").GetProperty("left").ToString()); -Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("faceRectangle").GetProperty("width").ToString()); -Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("faceRectangle").GetProperty("height").ToString()); -Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("fileName").ToString()); -Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("timeOffsetWithinFile").ToString()); -Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("imageType").ToString()); -Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("modelVersionUsed").ToString()); -Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("faceRectangle").GetProperty("top").ToString()); -Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("faceRectangle").GetProperty("left").ToString()); -Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("faceRectangle").GetProperty("width").ToString()); -Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("faceRectangle").GetProperty("height").ToString()); -Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("qualityForRecognition").ToString()); -Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("matchConfidence").ToString()); -Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("isIdentical").ToString()); -Console.WriteLine(result[0].GetProperty("response").GetProperty("statusCode").ToString()); -Console.WriteLine(result[0].GetProperty("response").GetProperty("latencyInMilliseconds").ToString()); -Console.WriteLine(result[0].GetProperty("digest").ToString()); ]]> This sample shows how to call GetLivenessWithVerifySessionAuditEntries and parse the result. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceSessionClient client = new FaceSessionClient(endpoint, credential); -Response response = client.GetLivenessWithVerifySessionAuditEntries("", null, null, null); +Response response = client.GetLivenessWithVerifySessionAuditEntries("b12e033e-bda7-4b83-a211-e721c661f30e", "0", 20, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].GetProperty("id").ToString()); @@ -1048,45 +497,6 @@ Console.WriteLine(result[0].GetProperty("response").GetProperty("body").ToString Console.WriteLine(result[0].GetProperty("response").GetProperty("statusCode").ToString()); Console.WriteLine(result[0].GetProperty("response").GetProperty("latencyInMilliseconds").ToString()); Console.WriteLine(result[0].GetProperty("digest").ToString()); -]]> -This sample shows how to call GetLivenessWithVerifySessionAuditEntries with all parameters and parse the result. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -FaceSessionClient client = new FaceSessionClient(endpoint, credential); - -Response response = client.GetLivenessWithVerifySessionAuditEntries("", "", 1234, null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result[0].GetProperty("id").ToString()); -Console.WriteLine(result[0].GetProperty("sessionId").ToString()); -Console.WriteLine(result[0].GetProperty("requestId").ToString()); -Console.WriteLine(result[0].GetProperty("clientRequestId").ToString()); -Console.WriteLine(result[0].GetProperty("receivedDateTime").ToString()); -Console.WriteLine(result[0].GetProperty("request").GetProperty("url").ToString()); -Console.WriteLine(result[0].GetProperty("request").GetProperty("method").ToString()); -Console.WriteLine(result[0].GetProperty("request").GetProperty("contentLength").ToString()); -Console.WriteLine(result[0].GetProperty("request").GetProperty("contentType").ToString()); -Console.WriteLine(result[0].GetProperty("request").GetProperty("userAgent").ToString()); -Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("livenessDecision").ToString()); -Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("faceRectangle").GetProperty("top").ToString()); -Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("faceRectangle").GetProperty("left").ToString()); -Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("faceRectangle").GetProperty("width").ToString()); -Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("faceRectangle").GetProperty("height").ToString()); -Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("fileName").ToString()); -Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("timeOffsetWithinFile").ToString()); -Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("imageType").ToString()); -Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("modelVersionUsed").ToString()); -Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("faceRectangle").GetProperty("top").ToString()); -Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("faceRectangle").GetProperty("left").ToString()); -Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("faceRectangle").GetProperty("width").ToString()); -Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("faceRectangle").GetProperty("height").ToString()); -Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("qualityForRecognition").ToString()); -Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("matchConfidence").ToString()); -Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("isIdentical").ToString()); -Console.WriteLine(result[0].GetProperty("response").GetProperty("statusCode").ToString()); -Console.WriteLine(result[0].GetProperty("response").GetProperty("latencyInMilliseconds").ToString()); -Console.WriteLine(result[0].GetProperty("digest").ToString()); ]]> diff --git a/sdk/face/Azure.AI.Vision.Face/tests/Generated/Samples/Samples_FaceClient.cs b/sdk/face/Azure.AI.Vision.Face/tests/Generated/Samples/Samples_FaceClient.cs index ef9f771ab590..0e9369d88787 100644 --- a/sdk/face/Azure.AI.Vision.Face/tests/Generated/Samples/Samples_FaceClient.cs +++ b/sdk/face/Azure.AI.Vision.Face/tests/Generated/Samples/Samples_FaceClient.cs @@ -19,218 +19,88 @@ public partial class Samples_FaceClient { [Test] [Ignore("Only validating compilation of examples")] - public void Example_FaceClient_FindSimilar_ShortVersion() + public void Example_FaceClient_FindSimilar_FindSimilarAmongFaceIDs() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceClient client = new FaceClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - faceId = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", - faceIds = new object[] - { -"73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a" - }, - }); - Response response = client.FindSimilar(content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result[0].GetProperty("confidence").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FaceClient_FindSimilar_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - FaceClient client = new FaceClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - faceId = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", - faceIds = new object[] - { -"73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a" - }, - }); - Response response = await client.FindSimilarAsync(content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result[0].GetProperty("confidence").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FaceClient_FindSimilar_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - FaceClient client = new FaceClient(endpoint, credential); - - Response> response = client.FindSimilar(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), new Guid[] { Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a") }); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FaceClient_FindSimilar_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - FaceClient client = new FaceClient(endpoint, credential); - - Response> response = await client.FindSimilarAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), new Guid[] { Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a") }); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FaceClient_FindSimilar_AllParameters() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - FaceClient client = new FaceClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - faceId = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", - maxNumOfCandidatesReturned = 1234, + faceId = "c5c24a82-6845-4031-9d5d-978df9175426", + maxNumOfCandidatesReturned = 3, mode = "matchPerson", faceIds = new object[] { -"73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a" +"015839fb-fbd9-4f79-ace9-7675fc2f1dd9", +"be386ab3-af91-4104-9e6d-4dae4c9fddb7" }, }); Response response = client.FindSimilar(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].GetProperty("confidence").ToString()); - Console.WriteLine(result[0].GetProperty("faceId").ToString()); - Console.WriteLine(result[0].GetProperty("persistedFaceId").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_FaceClient_FindSimilar_AllParameters_Async() + public async Task Example_FaceClient_FindSimilar_FindSimilarAmongFaceIDs_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceClient client = new FaceClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - faceId = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", - maxNumOfCandidatesReturned = 1234, + faceId = "c5c24a82-6845-4031-9d5d-978df9175426", + maxNumOfCandidatesReturned = 3, mode = "matchPerson", faceIds = new object[] { -"73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a" +"015839fb-fbd9-4f79-ace9-7675fc2f1dd9", +"be386ab3-af91-4104-9e6d-4dae4c9fddb7" }, }); Response response = await client.FindSimilarAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].GetProperty("confidence").ToString()); - Console.WriteLine(result[0].GetProperty("faceId").ToString()); - Console.WriteLine(result[0].GetProperty("persistedFaceId").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FaceClient_FindSimilar_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - FaceClient client = new FaceClient(endpoint, credential); - - Response> response = client.FindSimilar(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), new Guid[] { Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a") }, maxNumOfCandidatesReturned: 1234, mode: FindSimilarMatchMode.MatchPerson); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FaceClient_FindSimilar_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - FaceClient client = new FaceClient(endpoint, credential); - - Response> response = await client.FindSimilarAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), new Guid[] { Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a") }, maxNumOfCandidatesReturned: 1234, mode: FindSimilarMatchMode.MatchPerson); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FaceClient_VerifyFaceToFace_ShortVersion() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - FaceClient client = new FaceClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - faceId1 = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", - faceId2 = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", - }); - Response response = client.VerifyFaceToFace(content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("isIdentical").ToString()); - Console.WriteLine(result.GetProperty("confidence").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_FaceClient_VerifyFaceToFace_ShortVersion_Async() + public void Example_FaceClient_FindSimilar_FindSimilarAmongFaceIDs_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceClient client = new FaceClient(endpoint, credential); - using RequestContent content = RequestContent.Create(new - { - faceId1 = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", - faceId2 = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", - }); - Response response = await client.VerifyFaceToFaceAsync(content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("isIdentical").ToString()); - Console.WriteLine(result.GetProperty("confidence").ToString()); + Response> response = client.FindSimilar(Guid.Parse("c5c24a82-6845-4031-9d5d-978df9175426"), new Guid[] { Guid.Parse("015839fb-fbd9-4f79-ace9-7675fc2f1dd9"), Guid.Parse("be386ab3-af91-4104-9e6d-4dae4c9fddb7") }); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_FaceClient_VerifyFaceToFace_ShortVersion_Convenience() + public async Task Example_FaceClient_FindSimilar_FindSimilarAmongFaceIDs_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceClient client = new FaceClient(endpoint, credential); - Response response = client.VerifyFaceToFace(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); + Response> response = await client.FindSimilarAsync(Guid.Parse("c5c24a82-6845-4031-9d5d-978df9175426"), new Guid[] { Guid.Parse("015839fb-fbd9-4f79-ace9-7675fc2f1dd9"), Guid.Parse("be386ab3-af91-4104-9e6d-4dae4c9fddb7") }); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_FaceClient_VerifyFaceToFace_ShortVersion_Convenience_Async() + public void Example_FaceClient_VerifyFaceToFace_VerifyFaceToFace() { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - FaceClient client = new FaceClient(endpoint, credential); - - Response response = await client.VerifyFaceToFaceAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FaceClient_VerifyFaceToFace_AllParameters() - { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceClient client = new FaceClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - faceId1 = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", - faceId2 = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", + faceId1 = "c5c24a82-6845-4031-9d5d-978df9175426", + faceId2 = "3aa87e30-b380-48eb-ad9e-1aa54fc52bd3", }); Response response = client.VerifyFaceToFace(content); @@ -241,16 +111,16 @@ public void Example_FaceClient_VerifyFaceToFace_AllParameters() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_FaceClient_VerifyFaceToFace_AllParameters_Async() + public async Task Example_FaceClient_VerifyFaceToFace_VerifyFaceToFace_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceClient client = new FaceClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - faceId1 = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", - faceId2 = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", + faceId1 = "c5c24a82-6845-4031-9d5d-978df9175426", + faceId2 = "3aa87e30-b380-48eb-ad9e-1aa54fc52bd3", }); Response response = await client.VerifyFaceToFaceAsync(content); @@ -261,97 +131,31 @@ public async Task Example_FaceClient_VerifyFaceToFace_AllParameters_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_FaceClient_VerifyFaceToFace_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - FaceClient client = new FaceClient(endpoint, credential); - - Response response = client.VerifyFaceToFace(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FaceClient_VerifyFaceToFace_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - FaceClient client = new FaceClient(endpoint, credential); - - Response response = await client.VerifyFaceToFaceAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FaceClient_Group_ShortVersion() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - FaceClient client = new FaceClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - faceIds = new object[] - { -"73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a" - }, - }); - Response response = client.Group(content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("groups")[0][0].ToString()); - Console.WriteLine(result.GetProperty("messyGroup")[0].ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FaceClient_Group_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - FaceClient client = new FaceClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - faceIds = new object[] - { -"73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a" - }, - }); - Response response = await client.GroupAsync(content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("groups")[0][0].ToString()); - Console.WriteLine(result.GetProperty("messyGroup")[0].ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FaceClient_Group_ShortVersion_Convenience() + public void Example_FaceClient_VerifyFaceToFace_VerifyFaceToFace_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceClient client = new FaceClient(endpoint, credential); - Response response = client.Group(new Guid[] { Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a") }); + Response response = client.VerifyFaceToFace(Guid.Parse("c5c24a82-6845-4031-9d5d-978df9175426"), Guid.Parse("3aa87e30-b380-48eb-ad9e-1aa54fc52bd3")); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_FaceClient_Group_ShortVersion_Convenience_Async() + public async Task Example_FaceClient_VerifyFaceToFace_VerifyFaceToFace_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceClient client = new FaceClient(endpoint, credential); - Response response = await client.GroupAsync(new Guid[] { Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a") }); + Response response = await client.VerifyFaceToFaceAsync(Guid.Parse("c5c24a82-6845-4031-9d5d-978df9175426"), Guid.Parse("3aa87e30-b380-48eb-ad9e-1aa54fc52bd3")); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_FaceClient_Group_AllParameters() + public void Example_FaceClient_Group_GroupFaceIDs() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceClient client = new FaceClient(endpoint, credential); @@ -359,7 +163,14 @@ public void Example_FaceClient_Group_AllParameters() { faceIds = new object[] { -"73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a" +"c5c24a82-6845-4031-9d5d-978df9175426", +"015839fb-fbd9-4f79-ace9-7675fc2f1dd9", +"65d083d4-9447-47d1-af30-b626144bf0fb", +"fce92aed-d578-4d2e-8114-068f8af4492e", +"30ea1073-cc9e-4652-b1e3-d08fb7b95315", +"be386ab3-af91-4104-9e6d-4dae4c9fddb7", +"fbd2a038-dbff-452c-8e79-2ee81b1aa84e", +"b64d5e15-8257-4af2-b20a-5a750f8940e7" }, }); Response response = client.Group(content); @@ -371,9 +182,9 @@ public void Example_FaceClient_Group_AllParameters() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_FaceClient_Group_AllParameters_Async() + public async Task Example_FaceClient_Group_GroupFaceIDs_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceClient client = new FaceClient(endpoint, credential); @@ -381,7 +192,14 @@ public async Task Example_FaceClient_Group_AllParameters_Async() { faceIds = new object[] { -"73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a" +"c5c24a82-6845-4031-9d5d-978df9175426", +"015839fb-fbd9-4f79-ace9-7675fc2f1dd9", +"65d083d4-9447-47d1-af30-b626144bf0fb", +"fce92aed-d578-4d2e-8114-068f8af4492e", +"30ea1073-cc9e-4652-b1e3-d08fb7b95315", +"be386ab3-af91-4104-9e6d-4dae4c9fddb7", +"fbd2a038-dbff-452c-8e79-2ee81b1aa84e", +"b64d5e15-8257-4af2-b20a-5a750f8940e7" }, }); Response response = await client.GroupAsync(content); @@ -393,24 +211,24 @@ public async Task Example_FaceClient_Group_AllParameters_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_FaceClient_Group_AllParameters_Convenience() + public void Example_FaceClient_Group_GroupFaceIDs_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceClient client = new FaceClient(endpoint, credential); - Response response = client.Group(new Guid[] { Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a") }); + Response response = client.Group(new Guid[] { Guid.Parse("c5c24a82-6845-4031-9d5d-978df9175426"), Guid.Parse("015839fb-fbd9-4f79-ace9-7675fc2f1dd9"), Guid.Parse("65d083d4-9447-47d1-af30-b626144bf0fb"), Guid.Parse("fce92aed-d578-4d2e-8114-068f8af4492e"), Guid.Parse("30ea1073-cc9e-4652-b1e3-d08fb7b95315"), Guid.Parse("be386ab3-af91-4104-9e6d-4dae4c9fddb7"), Guid.Parse("fbd2a038-dbff-452c-8e79-2ee81b1aa84e"), Guid.Parse("b64d5e15-8257-4af2-b20a-5a750f8940e7") }); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_FaceClient_Group_AllParameters_Convenience_Async() + public async Task Example_FaceClient_Group_GroupFaceIDs_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceClient client = new FaceClient(endpoint, credential); - Response response = await client.GroupAsync(new Guid[] { Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a") }); + Response response = await client.GroupAsync(new Guid[] { Guid.Parse("c5c24a82-6845-4031-9d5d-978df9175426"), Guid.Parse("015839fb-fbd9-4f79-ace9-7675fc2f1dd9"), Guid.Parse("65d083d4-9447-47d1-af30-b626144bf0fb"), Guid.Parse("fce92aed-d578-4d2e-8114-068f8af4492e"), Guid.Parse("30ea1073-cc9e-4652-b1e3-d08fb7b95315"), Guid.Parse("be386ab3-af91-4104-9e6d-4dae4c9fddb7"), Guid.Parse("fbd2a038-dbff-452c-8e79-2ee81b1aa84e"), Guid.Parse("b64d5e15-8257-4af2-b20a-5a750f8940e7") }); } } } diff --git a/sdk/face/Azure.AI.Vision.Face/tests/Generated/Samples/Samples_FaceSessionClient.cs b/sdk/face/Azure.AI.Vision.Face/tests/Generated/Samples/Samples_FaceSessionClient.cs index e5709b38ab0e..533e4ac10132 100644 --- a/sdk/face/Azure.AI.Vision.Face/tests/Generated/Samples/Samples_FaceSessionClient.cs +++ b/sdk/face/Azure.AI.Vision.Face/tests/Generated/Samples/Samples_FaceSessionClient.cs @@ -19,71 +19,9 @@ public partial class Samples_FaceSessionClient { [Test] [Ignore("Only validating compilation of examples")] - public void Example_LivenessSession_CreateLivenessSession_ShortVersion() + public void Example_LivenessSession_CreateLivenessSession_CreateLivenessSession() { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - FaceSessionClient client = new FaceSessionClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - livenessOperationMode = "Passive", - }); - Response response = client.CreateLivenessSession(content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("sessionId").ToString()); - Console.WriteLine(result.GetProperty("authToken").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_LivenessSession_CreateLivenessSession_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - FaceSessionClient client = new FaceSessionClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - livenessOperationMode = "Passive", - }); - Response response = await client.CreateLivenessSessionAsync(content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("sessionId").ToString()); - Console.WriteLine(result.GetProperty("authToken").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_LivenessSession_CreateLivenessSession_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - FaceSessionClient client = new FaceSessionClient(endpoint, credential); - - CreateLivenessSessionContent body = new CreateLivenessSessionContent(LivenessOperationMode.Passive); - Response response = client.CreateLivenessSession(body); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_LivenessSession_CreateLivenessSession_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - FaceSessionClient client = new FaceSessionClient(endpoint, credential); - - CreateLivenessSessionContent body = new CreateLivenessSessionContent(LivenessOperationMode.Passive); - Response response = await client.CreateLivenessSessionAsync(body); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_LivenessSession_CreateLivenessSession_AllParameters() - { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceSessionClient client = new FaceSessionClient(endpoint, credential); @@ -92,8 +30,8 @@ public void Example_LivenessSession_CreateLivenessSession_AllParameters() livenessOperationMode = "Passive", sendResultsToClient = true, deviceCorrelationIdSetInClient = true, - deviceCorrelationId = "", - authTokenTimeToLiveInSeconds = 1234, + deviceCorrelationId = "your_device_correlation_id", + authTokenTimeToLiveInSeconds = 60, }); Response response = client.CreateLivenessSession(content); @@ -104,9 +42,9 @@ public void Example_LivenessSession_CreateLivenessSession_AllParameters() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_LivenessSession_CreateLivenessSession_AllParameters_Async() + public async Task Example_LivenessSession_CreateLivenessSession_CreateLivenessSession_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceSessionClient client = new FaceSessionClient(endpoint, credential); @@ -115,8 +53,8 @@ public async Task Example_LivenessSession_CreateLivenessSession_AllParameters_As livenessOperationMode = "Passive", sendResultsToClient = true, deviceCorrelationIdSetInClient = true, - deviceCorrelationId = "", - authTokenTimeToLiveInSeconds = 1234, + deviceCorrelationId = "your_device_correlation_id", + authTokenTimeToLiveInSeconds = 60, }); Response response = await client.CreateLivenessSessionAsync(content); @@ -127,9 +65,9 @@ public async Task Example_LivenessSession_CreateLivenessSession_AllParameters_As [Test] [Ignore("Only validating compilation of examples")] - public void Example_LivenessSession_CreateLivenessSession_AllParameters_Convenience() + public void Example_LivenessSession_CreateLivenessSession_CreateLivenessSession_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceSessionClient client = new FaceSessionClient(endpoint, credential); @@ -137,17 +75,17 @@ public void Example_LivenessSession_CreateLivenessSession_AllParameters_Convenie { SendResultsToClient = true, DeviceCorrelationIdSetInClient = true, - DeviceCorrelationId = "", - AuthTokenTimeToLiveInSeconds = 1234, + DeviceCorrelationId = "your_device_correlation_id", + AuthTokenTimeToLiveInSeconds = 60, }; Response response = client.CreateLivenessSession(body); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_LivenessSession_CreateLivenessSession_AllParameters_Convenience_Async() + public async Task Example_LivenessSession_CreateLivenessSession_CreateLivenessSession_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceSessionClient client = new FaceSessionClient(endpoint, credential); @@ -155,249 +93,103 @@ public async Task Example_LivenessSession_CreateLivenessSession_AllParameters_Co { SendResultsToClient = true, DeviceCorrelationIdSetInClient = true, - DeviceCorrelationId = "", - AuthTokenTimeToLiveInSeconds = 1234, + DeviceCorrelationId = "your_device_correlation_id", + AuthTokenTimeToLiveInSeconds = 60, }; Response response = await client.CreateLivenessSessionAsync(body); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_LivenessSession_DeleteLivenessSession_ShortVersion() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - FaceSessionClient client = new FaceSessionClient(endpoint, credential); - - Response response = client.DeleteLivenessSession(""); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_LivenessSession_DeleteLivenessSession_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - FaceSessionClient client = new FaceSessionClient(endpoint, credential); - - Response response = await client.DeleteLivenessSessionAsync(""); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_LivenessSession_DeleteLivenessSession_AllParameters() + public void Example_LivenessSession_DeleteLivenessSession_DeleteLivenessSession() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceSessionClient client = new FaceSessionClient(endpoint, credential); - Response response = client.DeleteLivenessSession(""); + Response response = client.DeleteLivenessSession("b12e033e-bda7-4b83-a211-e721c661f30e"); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_LivenessSession_DeleteLivenessSession_AllParameters_Async() + public async Task Example_LivenessSession_DeleteLivenessSession_DeleteLivenessSession_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceSessionClient client = new FaceSessionClient(endpoint, credential); - Response response = await client.DeleteLivenessSessionAsync(""); + Response response = await client.DeleteLivenessSessionAsync("b12e033e-bda7-4b83-a211-e721c661f30e"); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_LivenessSession_GetLivenessSessionResult_ShortVersion() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - FaceSessionClient client = new FaceSessionClient(endpoint, credential); - - Response response = client.GetLivenessSessionResult("", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("sessionExpired").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_LivenessSession_GetLivenessSessionResult_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - FaceSessionClient client = new FaceSessionClient(endpoint, credential); - - Response response = await client.GetLivenessSessionResultAsync("", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("sessionExpired").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_LivenessSession_GetLivenessSessionResult_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - FaceSessionClient client = new FaceSessionClient(endpoint, credential); - - Response response = client.GetLivenessSessionResult(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_LivenessSession_GetLivenessSessionResult_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - FaceSessionClient client = new FaceSessionClient(endpoint, credential); - - Response response = await client.GetLivenessSessionResultAsync(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_LivenessSession_GetLivenessSessionResult_AllParameters() + public void Example_LivenessSession_GetLivenessSessionResult_GetLivenessSessionResult() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceSessionClient client = new FaceSessionClient(endpoint, credential); - Response response = client.GetLivenessSessionResult("", null); + Response response = client.GetLivenessSessionResult("b12e033e-bda7-4b83-a211-e721c661f30e", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("sessionStartDateTime").ToString()); Console.WriteLine(result.GetProperty("sessionExpired").ToString()); - Console.WriteLine(result.GetProperty("deviceCorrelationId").ToString()); - Console.WriteLine(result.GetProperty("authTokenTimeToLiveInSeconds").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("sessionId").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("requestId").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("clientRequestId").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("receivedDateTime").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("request").GetProperty("url").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("request").GetProperty("method").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("request").GetProperty("contentLength").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("request").GetProperty("contentType").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("request").GetProperty("userAgent").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("livenessDecision").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("faceRectangle").GetProperty("top").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("faceRectangle").GetProperty("left").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("faceRectangle").GetProperty("width").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("faceRectangle").GetProperty("height").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("fileName").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("timeOffsetWithinFile").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("imageType").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("modelVersionUsed").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("faceRectangle").GetProperty("top").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("faceRectangle").GetProperty("left").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("faceRectangle").GetProperty("width").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("faceRectangle").GetProperty("height").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("qualityForRecognition").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("matchConfidence").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("isIdentical").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("statusCode").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("latencyInMilliseconds").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("digest").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_LivenessSession_GetLivenessSessionResult_AllParameters_Async() + public async Task Example_LivenessSession_GetLivenessSessionResult_GetLivenessSessionResult_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceSessionClient client = new FaceSessionClient(endpoint, credential); - Response response = await client.GetLivenessSessionResultAsync("", null); + Response response = await client.GetLivenessSessionResultAsync("b12e033e-bda7-4b83-a211-e721c661f30e", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("sessionStartDateTime").ToString()); Console.WriteLine(result.GetProperty("sessionExpired").ToString()); - Console.WriteLine(result.GetProperty("deviceCorrelationId").ToString()); - Console.WriteLine(result.GetProperty("authTokenTimeToLiveInSeconds").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("sessionId").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("requestId").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("clientRequestId").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("receivedDateTime").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("request").GetProperty("url").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("request").GetProperty("method").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("request").GetProperty("contentLength").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("request").GetProperty("contentType").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("request").GetProperty("userAgent").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("livenessDecision").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("faceRectangle").GetProperty("top").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("faceRectangle").GetProperty("left").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("faceRectangle").GetProperty("width").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("faceRectangle").GetProperty("height").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("fileName").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("timeOffsetWithinFile").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("imageType").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("modelVersionUsed").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("faceRectangle").GetProperty("top").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("faceRectangle").GetProperty("left").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("faceRectangle").GetProperty("width").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("faceRectangle").GetProperty("height").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("qualityForRecognition").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("matchConfidence").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("isIdentical").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("statusCode").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("latencyInMilliseconds").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("digest").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_LivenessSession_GetLivenessSessionResult_AllParameters_Convenience() + public void Example_LivenessSession_GetLivenessSessionResult_GetLivenessSessionResult_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceSessionClient client = new FaceSessionClient(endpoint, credential); - Response response = client.GetLivenessSessionResult(""); + Response response = client.GetLivenessSessionResult("b12e033e-bda7-4b83-a211-e721c661f30e"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_LivenessSession_GetLivenessSessionResult_AllParameters_Convenience_Async() + public async Task Example_LivenessSession_GetLivenessSessionResult_GetLivenessSessionResult_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceSessionClient client = new FaceSessionClient(endpoint, credential); - Response response = await client.GetLivenessSessionResultAsync(""); + Response response = await client.GetLivenessSessionResultAsync("b12e033e-bda7-4b83-a211-e721c661f30e"); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_LivenessSession_GetLivenessSessions_ShortVersion() + public void Example_LivenessSession_GetLivenessSessions_GetLivenessSessions() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceSessionClient client = new FaceSessionClient(endpoint, credential); - Response response = client.GetLivenessSessions(null, null, null); + Response response = client.GetLivenessSessions("00000000-0000-0000-0000-000000000000", 20, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].GetProperty("id").ToString()); @@ -407,13 +199,13 @@ public void Example_LivenessSession_GetLivenessSessions_ShortVersion() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_LivenessSession_GetLivenessSessions_ShortVersion_Async() + public async Task Example_LivenessSession_GetLivenessSessions_GetLivenessSessions_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceSessionClient client = new FaceSessionClient(endpoint, credential); - Response response = await client.GetLivenessSessionsAsync(null, null, null); + Response response = await client.GetLivenessSessionsAsync("00000000-0000-0000-0000-000000000000", 20, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].GetProperty("id").ToString()); @@ -423,9 +215,9 @@ public async Task Example_LivenessSession_GetLivenessSessions_ShortVersion_Async [Test] [Ignore("Only validating compilation of examples")] - public void Example_LivenessSession_GetLivenessSessions_ShortVersion_Convenience() + public void Example_LivenessSession_GetLivenessSessions_GetLivenessSessions_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceSessionClient client = new FaceSessionClient(endpoint, credential); @@ -434,9 +226,9 @@ public void Example_LivenessSession_GetLivenessSessions_ShortVersion_Convenience [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_LivenessSession_GetLivenessSessions_ShortVersion_Convenience_Async() + public async Task Example_LivenessSession_GetLivenessSessions_GetLivenessSessions_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceSessionClient client = new FaceSessionClient(endpoint, credential); @@ -445,73 +237,13 @@ public async Task Example_LivenessSession_GetLivenessSessions_ShortVersion_Conve [Test] [Ignore("Only validating compilation of examples")] - public void Example_LivenessSession_GetLivenessSessions_AllParameters() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - FaceSessionClient client = new FaceSessionClient(endpoint, credential); - - Response response = client.GetLivenessSessions("", 1234, null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); - Console.WriteLine(result[0].GetProperty("sessionStartDateTime").ToString()); - Console.WriteLine(result[0].GetProperty("sessionExpired").ToString()); - Console.WriteLine(result[0].GetProperty("deviceCorrelationId").ToString()); - Console.WriteLine(result[0].GetProperty("authTokenTimeToLiveInSeconds").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_LivenessSession_GetLivenessSessions_AllParameters_Async() + public void Example_FaceSessionClient_GetLivenessSessionAuditEntries_GetLivenessSessionAuditEntries() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceSessionClient client = new FaceSessionClient(endpoint, credential); - Response response = await client.GetLivenessSessionsAsync("", 1234, null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); - Console.WriteLine(result[0].GetProperty("sessionStartDateTime").ToString()); - Console.WriteLine(result[0].GetProperty("sessionExpired").ToString()); - Console.WriteLine(result[0].GetProperty("deviceCorrelationId").ToString()); - Console.WriteLine(result[0].GetProperty("authTokenTimeToLiveInSeconds").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_LivenessSession_GetLivenessSessions_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - FaceSessionClient client = new FaceSessionClient(endpoint, credential); - - Response> response = client.GetLivenessSessions(start: "", top: 1234); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_LivenessSession_GetLivenessSessions_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - FaceSessionClient client = new FaceSessionClient(endpoint, credential); - - Response> response = await client.GetLivenessSessionsAsync(start: "", top: 1234); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FaceSessionClient_GetLivenessSessionAuditEntries_ShortVersion() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - FaceSessionClient client = new FaceSessionClient(endpoint, credential); - - Response response = client.GetLivenessSessionAuditEntries("", null, null, null); + Response response = client.GetLivenessSessionAuditEntries("b12e033e-bda7-4b83-a211-e721c661f30e", "0", 20, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].GetProperty("id").ToString()); @@ -530,13 +262,13 @@ public void Example_FaceSessionClient_GetLivenessSessionAuditEntries_ShortVersio [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_FaceSessionClient_GetLivenessSessionAuditEntries_ShortVersion_Async() + public async Task Example_FaceSessionClient_GetLivenessSessionAuditEntries_GetLivenessSessionAuditEntries_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceSessionClient client = new FaceSessionClient(endpoint, credential); - Response response = await client.GetLivenessSessionAuditEntriesAsync("", null, null, null); + Response response = await client.GetLivenessSessionAuditEntriesAsync("b12e033e-bda7-4b83-a211-e721c661f30e", "0", 20, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].GetProperty("id").ToString()); @@ -555,193 +287,61 @@ public async Task Example_FaceSessionClient_GetLivenessSessionAuditEntries_Short [Test] [Ignore("Only validating compilation of examples")] - public void Example_FaceSessionClient_GetLivenessSessionAuditEntries_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - FaceSessionClient client = new FaceSessionClient(endpoint, credential); - - Response> response = client.GetLivenessSessionAuditEntries(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FaceSessionClient_GetLivenessSessionAuditEntries_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - FaceSessionClient client = new FaceSessionClient(endpoint, credential); - - Response> response = await client.GetLivenessSessionAuditEntriesAsync(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FaceSessionClient_GetLivenessSessionAuditEntries_AllParameters() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - FaceSessionClient client = new FaceSessionClient(endpoint, credential); - - Response response = client.GetLivenessSessionAuditEntries("", "", 1234, null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("sessionId").ToString()); - Console.WriteLine(result[0].GetProperty("requestId").ToString()); - Console.WriteLine(result[0].GetProperty("clientRequestId").ToString()); - Console.WriteLine(result[0].GetProperty("receivedDateTime").ToString()); - Console.WriteLine(result[0].GetProperty("request").GetProperty("url").ToString()); - Console.WriteLine(result[0].GetProperty("request").GetProperty("method").ToString()); - Console.WriteLine(result[0].GetProperty("request").GetProperty("contentLength").ToString()); - Console.WriteLine(result[0].GetProperty("request").GetProperty("contentType").ToString()); - Console.WriteLine(result[0].GetProperty("request").GetProperty("userAgent").ToString()); - Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("livenessDecision").ToString()); - Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("faceRectangle").GetProperty("top").ToString()); - Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("faceRectangle").GetProperty("left").ToString()); - Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("faceRectangle").GetProperty("width").ToString()); - Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("faceRectangle").GetProperty("height").ToString()); - Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("fileName").ToString()); - Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("timeOffsetWithinFile").ToString()); - Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("imageType").ToString()); - Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("modelVersionUsed").ToString()); - Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("faceRectangle").GetProperty("top").ToString()); - Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("faceRectangle").GetProperty("left").ToString()); - Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("faceRectangle").GetProperty("width").ToString()); - Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("faceRectangle").GetProperty("height").ToString()); - Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("qualityForRecognition").ToString()); - Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("matchConfidence").ToString()); - Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("isIdentical").ToString()); - Console.WriteLine(result[0].GetProperty("response").GetProperty("statusCode").ToString()); - Console.WriteLine(result[0].GetProperty("response").GetProperty("latencyInMilliseconds").ToString()); - Console.WriteLine(result[0].GetProperty("digest").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FaceSessionClient_GetLivenessSessionAuditEntries_AllParameters_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - FaceSessionClient client = new FaceSessionClient(endpoint, credential); - - Response response = await client.GetLivenessSessionAuditEntriesAsync("", "", 1234, null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("sessionId").ToString()); - Console.WriteLine(result[0].GetProperty("requestId").ToString()); - Console.WriteLine(result[0].GetProperty("clientRequestId").ToString()); - Console.WriteLine(result[0].GetProperty("receivedDateTime").ToString()); - Console.WriteLine(result[0].GetProperty("request").GetProperty("url").ToString()); - Console.WriteLine(result[0].GetProperty("request").GetProperty("method").ToString()); - Console.WriteLine(result[0].GetProperty("request").GetProperty("contentLength").ToString()); - Console.WriteLine(result[0].GetProperty("request").GetProperty("contentType").ToString()); - Console.WriteLine(result[0].GetProperty("request").GetProperty("userAgent").ToString()); - Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("livenessDecision").ToString()); - Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("faceRectangle").GetProperty("top").ToString()); - Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("faceRectangle").GetProperty("left").ToString()); - Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("faceRectangle").GetProperty("width").ToString()); - Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("faceRectangle").GetProperty("height").ToString()); - Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("fileName").ToString()); - Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("timeOffsetWithinFile").ToString()); - Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("imageType").ToString()); - Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("modelVersionUsed").ToString()); - Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("faceRectangle").GetProperty("top").ToString()); - Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("faceRectangle").GetProperty("left").ToString()); - Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("faceRectangle").GetProperty("width").ToString()); - Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("faceRectangle").GetProperty("height").ToString()); - Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("qualityForRecognition").ToString()); - Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("matchConfidence").ToString()); - Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("isIdentical").ToString()); - Console.WriteLine(result[0].GetProperty("response").GetProperty("statusCode").ToString()); - Console.WriteLine(result[0].GetProperty("response").GetProperty("latencyInMilliseconds").ToString()); - Console.WriteLine(result[0].GetProperty("digest").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FaceSessionClient_GetLivenessSessionAuditEntries_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - FaceSessionClient client = new FaceSessionClient(endpoint, credential); - - Response> response = client.GetLivenessSessionAuditEntries("", start: "", top: 1234); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FaceSessionClient_GetLivenessSessionAuditEntries_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - FaceSessionClient client = new FaceSessionClient(endpoint, credential); - - Response> response = await client.GetLivenessSessionAuditEntriesAsync("", start: "", top: 1234); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_LivenessWithVerifySession_DeleteLivenessWithVerifySession_ShortVersion() + public void Example_FaceSessionClient_GetLivenessSessionAuditEntries_GetLivenessSessionAuditEntries_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceSessionClient client = new FaceSessionClient(endpoint, credential); - Response response = client.DeleteLivenessWithVerifySession(""); - - Console.WriteLine(response.Status); + Response> response = client.GetLivenessSessionAuditEntries("b12e033e-bda7-4b83-a211-e721c661f30e"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_LivenessWithVerifySession_DeleteLivenessWithVerifySession_ShortVersion_Async() + public async Task Example_FaceSessionClient_GetLivenessSessionAuditEntries_GetLivenessSessionAuditEntries_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceSessionClient client = new FaceSessionClient(endpoint, credential); - Response response = await client.DeleteLivenessWithVerifySessionAsync(""); - - Console.WriteLine(response.Status); + Response> response = await client.GetLivenessSessionAuditEntriesAsync("b12e033e-bda7-4b83-a211-e721c661f30e"); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_LivenessWithVerifySession_DeleteLivenessWithVerifySession_AllParameters() + public void Example_LivenessWithVerifySession_DeleteLivenessWithVerifySession_DeleteLivenessWithVerifySession() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceSessionClient client = new FaceSessionClient(endpoint, credential); - Response response = client.DeleteLivenessWithVerifySession(""); + Response response = client.DeleteLivenessWithVerifySession("b12e033e-bda7-4b83-a211-e721c661f30e"); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_LivenessWithVerifySession_DeleteLivenessWithVerifySession_AllParameters_Async() + public async Task Example_LivenessWithVerifySession_DeleteLivenessWithVerifySession_DeleteLivenessWithVerifySession_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceSessionClient client = new FaceSessionClient(endpoint, credential); - Response response = await client.DeleteLivenessWithVerifySessionAsync(""); + Response response = await client.DeleteLivenessWithVerifySessionAsync("b12e033e-bda7-4b83-a211-e721c661f30e"); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_LivenessWithVerifySession_GetLivenessWithVerifySessionResult_ShortVersion() + public void Example_LivenessWithVerifySession_GetLivenessWithVerifySessionResult_GetLivenessWithVerifySessionResult() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceSessionClient client = new FaceSessionClient(endpoint, credential); - Response response = client.GetLivenessWithVerifySessionResult("", null); + Response response = client.GetLivenessWithVerifySessionResult("b12e033e-bda7-4b83-a211-e721c661f30e", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); @@ -752,13 +352,13 @@ public void Example_LivenessWithVerifySession_GetLivenessWithVerifySessionResult [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_LivenessWithVerifySession_GetLivenessWithVerifySessionResult_ShortVersion_Async() + public async Task Example_LivenessWithVerifySession_GetLivenessWithVerifySessionResult_GetLivenessWithVerifySessionResult_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceSessionClient client = new FaceSessionClient(endpoint, credential); - Response response = await client.GetLivenessWithVerifySessionResultAsync("", null); + Response response = await client.GetLivenessWithVerifySessionResultAsync("b12e033e-bda7-4b83-a211-e721c661f30e", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); @@ -769,155 +369,35 @@ public async Task Example_LivenessWithVerifySession_GetLivenessWithVerifySession [Test] [Ignore("Only validating compilation of examples")] - public void Example_LivenessWithVerifySession_GetLivenessWithVerifySessionResult_ShortVersion_Convenience() + public void Example_LivenessWithVerifySession_GetLivenessWithVerifySessionResult_GetLivenessWithVerifySessionResult_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceSessionClient client = new FaceSessionClient(endpoint, credential); - Response response = client.GetLivenessWithVerifySessionResult(""); + Response response = client.GetLivenessWithVerifySessionResult("b12e033e-bda7-4b83-a211-e721c661f30e"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_LivenessWithVerifySession_GetLivenessWithVerifySessionResult_ShortVersion_Convenience_Async() + public async Task Example_LivenessWithVerifySession_GetLivenessWithVerifySessionResult_GetLivenessWithVerifySessionResult_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceSessionClient client = new FaceSessionClient(endpoint, credential); - Response response = await client.GetLivenessWithVerifySessionResultAsync(""); + Response response = await client.GetLivenessWithVerifySessionResultAsync("b12e033e-bda7-4b83-a211-e721c661f30e"); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_LivenessWithVerifySession_GetLivenessWithVerifySessionResult_AllParameters() + public void Example_LivenessWithVerifySession_GetLivenessWithVerifySessions_GetLivenessWithVerifySessions() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceSessionClient client = new FaceSessionClient(endpoint, credential); - Response response = client.GetLivenessWithVerifySessionResult("", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("sessionStartDateTime").ToString()); - Console.WriteLine(result.GetProperty("sessionExpired").ToString()); - Console.WriteLine(result.GetProperty("deviceCorrelationId").ToString()); - Console.WriteLine(result.GetProperty("authTokenTimeToLiveInSeconds").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("sessionId").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("requestId").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("clientRequestId").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("receivedDateTime").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("request").GetProperty("url").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("request").GetProperty("method").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("request").GetProperty("contentLength").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("request").GetProperty("contentType").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("request").GetProperty("userAgent").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("livenessDecision").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("faceRectangle").GetProperty("top").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("faceRectangle").GetProperty("left").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("faceRectangle").GetProperty("width").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("faceRectangle").GetProperty("height").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("fileName").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("timeOffsetWithinFile").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("imageType").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("modelVersionUsed").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("faceRectangle").GetProperty("top").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("faceRectangle").GetProperty("left").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("faceRectangle").GetProperty("width").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("faceRectangle").GetProperty("height").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("qualityForRecognition").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("matchConfidence").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("isIdentical").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("statusCode").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("latencyInMilliseconds").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("digest").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_LivenessWithVerifySession_GetLivenessWithVerifySessionResult_AllParameters_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - FaceSessionClient client = new FaceSessionClient(endpoint, credential); - - Response response = await client.GetLivenessWithVerifySessionResultAsync("", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("sessionStartDateTime").ToString()); - Console.WriteLine(result.GetProperty("sessionExpired").ToString()); - Console.WriteLine(result.GetProperty("deviceCorrelationId").ToString()); - Console.WriteLine(result.GetProperty("authTokenTimeToLiveInSeconds").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("sessionId").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("requestId").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("clientRequestId").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("receivedDateTime").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("request").GetProperty("url").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("request").GetProperty("method").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("request").GetProperty("contentLength").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("request").GetProperty("contentType").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("request").GetProperty("userAgent").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("livenessDecision").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("faceRectangle").GetProperty("top").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("faceRectangle").GetProperty("left").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("faceRectangle").GetProperty("width").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("faceRectangle").GetProperty("height").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("fileName").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("timeOffsetWithinFile").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("imageType").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("modelVersionUsed").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("faceRectangle").GetProperty("top").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("faceRectangle").GetProperty("left").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("faceRectangle").GetProperty("width").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("faceRectangle").GetProperty("height").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("qualityForRecognition").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("matchConfidence").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("isIdentical").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("statusCode").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("response").GetProperty("latencyInMilliseconds").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("digest").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_LivenessWithVerifySession_GetLivenessWithVerifySessionResult_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - FaceSessionClient client = new FaceSessionClient(endpoint, credential); - - Response response = client.GetLivenessWithVerifySessionResult(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_LivenessWithVerifySession_GetLivenessWithVerifySessionResult_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - FaceSessionClient client = new FaceSessionClient(endpoint, credential); - - Response response = await client.GetLivenessWithVerifySessionResultAsync(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_LivenessWithVerifySession_GetLivenessWithVerifySessions_ShortVersion() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - FaceSessionClient client = new FaceSessionClient(endpoint, credential); - - Response response = client.GetLivenessWithVerifySessions(null, null, null); + Response response = client.GetLivenessWithVerifySessions("00000000-0000-0000-0000-000000000000", 20, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].GetProperty("id").ToString()); @@ -927,13 +407,13 @@ public void Example_LivenessWithVerifySession_GetLivenessWithVerifySessions_Shor [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_LivenessWithVerifySession_GetLivenessWithVerifySessions_ShortVersion_Async() + public async Task Example_LivenessWithVerifySession_GetLivenessWithVerifySessions_GetLivenessWithVerifySessions_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceSessionClient client = new FaceSessionClient(endpoint, credential); - Response response = await client.GetLivenessWithVerifySessionsAsync(null, null, null); + Response response = await client.GetLivenessWithVerifySessionsAsync("00000000-0000-0000-0000-000000000000", 20, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].GetProperty("id").ToString()); @@ -943,9 +423,9 @@ public async Task Example_LivenessWithVerifySession_GetLivenessWithVerifySession [Test] [Ignore("Only validating compilation of examples")] - public void Example_LivenessWithVerifySession_GetLivenessWithVerifySessions_ShortVersion_Convenience() + public void Example_LivenessWithVerifySession_GetLivenessWithVerifySessions_GetLivenessWithVerifySessions_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceSessionClient client = new FaceSessionClient(endpoint, credential); @@ -954,9 +434,9 @@ public void Example_LivenessWithVerifySession_GetLivenessWithVerifySessions_Shor [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_LivenessWithVerifySession_GetLivenessWithVerifySessions_ShortVersion_Convenience_Async() + public async Task Example_LivenessWithVerifySession_GetLivenessWithVerifySessions_GetLivenessWithVerifySessions_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceSessionClient client = new FaceSessionClient(endpoint, credential); @@ -965,73 +445,13 @@ public async Task Example_LivenessWithVerifySession_GetLivenessWithVerifySession [Test] [Ignore("Only validating compilation of examples")] - public void Example_LivenessWithVerifySession_GetLivenessWithVerifySessions_AllParameters() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - FaceSessionClient client = new FaceSessionClient(endpoint, credential); - - Response response = client.GetLivenessWithVerifySessions("", 1234, null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); - Console.WriteLine(result[0].GetProperty("sessionStartDateTime").ToString()); - Console.WriteLine(result[0].GetProperty("sessionExpired").ToString()); - Console.WriteLine(result[0].GetProperty("deviceCorrelationId").ToString()); - Console.WriteLine(result[0].GetProperty("authTokenTimeToLiveInSeconds").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_LivenessWithVerifySession_GetLivenessWithVerifySessions_AllParameters_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - FaceSessionClient client = new FaceSessionClient(endpoint, credential); - - Response response = await client.GetLivenessWithVerifySessionsAsync("", 1234, null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); - Console.WriteLine(result[0].GetProperty("sessionStartDateTime").ToString()); - Console.WriteLine(result[0].GetProperty("sessionExpired").ToString()); - Console.WriteLine(result[0].GetProperty("deviceCorrelationId").ToString()); - Console.WriteLine(result[0].GetProperty("authTokenTimeToLiveInSeconds").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_LivenessWithVerifySession_GetLivenessWithVerifySessions_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - FaceSessionClient client = new FaceSessionClient(endpoint, credential); - - Response> response = client.GetLivenessWithVerifySessions(start: "", top: 1234); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_LivenessWithVerifySession_GetLivenessWithVerifySessions_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - FaceSessionClient client = new FaceSessionClient(endpoint, credential); - - Response> response = await client.GetLivenessWithVerifySessionsAsync(start: "", top: 1234); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FaceSessionClient_GetLivenessWithVerifySessionAuditEntries_ShortVersion() + public void Example_FaceSessionClient_GetLivenessWithVerifySessionAuditEntries_GetLivenessWithVerifySessionAuditEntries() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceSessionClient client = new FaceSessionClient(endpoint, credential); - Response response = client.GetLivenessWithVerifySessionAuditEntries("", null, null, null); + Response response = client.GetLivenessWithVerifySessionAuditEntries("b12e033e-bda7-4b83-a211-e721c661f30e", "0", 20, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].GetProperty("id").ToString()); @@ -1050,13 +470,13 @@ public void Example_FaceSessionClient_GetLivenessWithVerifySessionAuditEntries_S [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_FaceSessionClient_GetLivenessWithVerifySessionAuditEntries_ShortVersion_Async() + public async Task Example_FaceSessionClient_GetLivenessWithVerifySessionAuditEntries_GetLivenessWithVerifySessionAuditEntries_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceSessionClient client = new FaceSessionClient(endpoint, credential); - Response response = await client.GetLivenessWithVerifySessionAuditEntriesAsync("", null, null, null); + Response response = await client.GetLivenessWithVerifySessionAuditEntriesAsync("b12e033e-bda7-4b83-a211-e721c661f30e", "0", 20, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].GetProperty("id").ToString()); @@ -1075,130 +495,24 @@ public async Task Example_FaceSessionClient_GetLivenessWithVerifySessionAuditEnt [Test] [Ignore("Only validating compilation of examples")] - public void Example_FaceSessionClient_GetLivenessWithVerifySessionAuditEntries_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - FaceSessionClient client = new FaceSessionClient(endpoint, credential); - - Response> response = client.GetLivenessWithVerifySessionAuditEntries(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FaceSessionClient_GetLivenessWithVerifySessionAuditEntries_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - FaceSessionClient client = new FaceSessionClient(endpoint, credential); - - Response> response = await client.GetLivenessWithVerifySessionAuditEntriesAsync(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FaceSessionClient_GetLivenessWithVerifySessionAuditEntries_AllParameters() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - FaceSessionClient client = new FaceSessionClient(endpoint, credential); - - Response response = client.GetLivenessWithVerifySessionAuditEntries("", "", 1234, null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("sessionId").ToString()); - Console.WriteLine(result[0].GetProperty("requestId").ToString()); - Console.WriteLine(result[0].GetProperty("clientRequestId").ToString()); - Console.WriteLine(result[0].GetProperty("receivedDateTime").ToString()); - Console.WriteLine(result[0].GetProperty("request").GetProperty("url").ToString()); - Console.WriteLine(result[0].GetProperty("request").GetProperty("method").ToString()); - Console.WriteLine(result[0].GetProperty("request").GetProperty("contentLength").ToString()); - Console.WriteLine(result[0].GetProperty("request").GetProperty("contentType").ToString()); - Console.WriteLine(result[0].GetProperty("request").GetProperty("userAgent").ToString()); - Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("livenessDecision").ToString()); - Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("faceRectangle").GetProperty("top").ToString()); - Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("faceRectangle").GetProperty("left").ToString()); - Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("faceRectangle").GetProperty("width").ToString()); - Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("faceRectangle").GetProperty("height").ToString()); - Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("fileName").ToString()); - Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("timeOffsetWithinFile").ToString()); - Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("imageType").ToString()); - Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("modelVersionUsed").ToString()); - Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("faceRectangle").GetProperty("top").ToString()); - Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("faceRectangle").GetProperty("left").ToString()); - Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("faceRectangle").GetProperty("width").ToString()); - Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("faceRectangle").GetProperty("height").ToString()); - Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("qualityForRecognition").ToString()); - Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("matchConfidence").ToString()); - Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("isIdentical").ToString()); - Console.WriteLine(result[0].GetProperty("response").GetProperty("statusCode").ToString()); - Console.WriteLine(result[0].GetProperty("response").GetProperty("latencyInMilliseconds").ToString()); - Console.WriteLine(result[0].GetProperty("digest").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FaceSessionClient_GetLivenessWithVerifySessionAuditEntries_AllParameters_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - FaceSessionClient client = new FaceSessionClient(endpoint, credential); - - Response response = await client.GetLivenessWithVerifySessionAuditEntriesAsync("", "", 1234, null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("sessionId").ToString()); - Console.WriteLine(result[0].GetProperty("requestId").ToString()); - Console.WriteLine(result[0].GetProperty("clientRequestId").ToString()); - Console.WriteLine(result[0].GetProperty("receivedDateTime").ToString()); - Console.WriteLine(result[0].GetProperty("request").GetProperty("url").ToString()); - Console.WriteLine(result[0].GetProperty("request").GetProperty("method").ToString()); - Console.WriteLine(result[0].GetProperty("request").GetProperty("contentLength").ToString()); - Console.WriteLine(result[0].GetProperty("request").GetProperty("contentType").ToString()); - Console.WriteLine(result[0].GetProperty("request").GetProperty("userAgent").ToString()); - Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("livenessDecision").ToString()); - Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("faceRectangle").GetProperty("top").ToString()); - Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("faceRectangle").GetProperty("left").ToString()); - Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("faceRectangle").GetProperty("width").ToString()); - Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("faceRectangle").GetProperty("height").ToString()); - Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("fileName").ToString()); - Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("timeOffsetWithinFile").ToString()); - Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("imageType").ToString()); - Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("modelVersionUsed").ToString()); - Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("faceRectangle").GetProperty("top").ToString()); - Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("faceRectangle").GetProperty("left").ToString()); - Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("faceRectangle").GetProperty("width").ToString()); - Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("faceRectangle").GetProperty("height").ToString()); - Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("qualityForRecognition").ToString()); - Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("matchConfidence").ToString()); - Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("isIdentical").ToString()); - Console.WriteLine(result[0].GetProperty("response").GetProperty("statusCode").ToString()); - Console.WriteLine(result[0].GetProperty("response").GetProperty("latencyInMilliseconds").ToString()); - Console.WriteLine(result[0].GetProperty("digest").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FaceSessionClient_GetLivenessWithVerifySessionAuditEntries_AllParameters_Convenience() + public void Example_FaceSessionClient_GetLivenessWithVerifySessionAuditEntries_GetLivenessWithVerifySessionAuditEntries_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceSessionClient client = new FaceSessionClient(endpoint, credential); - Response> response = client.GetLivenessWithVerifySessionAuditEntries("", start: "", top: 1234); + Response> response = client.GetLivenessWithVerifySessionAuditEntries("b12e033e-bda7-4b83-a211-e721c661f30e"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_FaceSessionClient_GetLivenessWithVerifySessionAuditEntries_AllParameters_Convenience_Async() + public async Task Example_FaceSessionClient_GetLivenessWithVerifySessionAuditEntries_GetLivenessWithVerifySessionAuditEntries_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceSessionClient client = new FaceSessionClient(endpoint, credential); - Response> response = await client.GetLivenessWithVerifySessionAuditEntriesAsync("", start: "", top: 1234); + Response> response = await client.GetLivenessWithVerifySessionAuditEntriesAsync("b12e033e-bda7-4b83-a211-e721c661f30e"); } } } diff --git a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/Docs/DeidentificationClient.xml b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/Docs/DeidentificationClient.xml index 5ee3cc2323bd..cc0b825e8a96 100644 --- a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/Docs/DeidentificationClient.xml +++ b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/Docs/DeidentificationClient.xml @@ -5,102 +5,54 @@ This sample shows how to call GetJobAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeidentificationClient client = new DeidentificationClient(endpoint, credential); -Response response = await client.GetJobAsync(""); -]]> -This sample shows how to call GetJobAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -DeidentificationClient client = new DeidentificationClient(endpoint, credential); - -Response response = await client.GetJobAsync(""); +Response response = await client.GetJobAsync("documents_smith_1"); ]]> This sample shows how to call GetJob. "); -TokenCredential credential = new DefaultAzureCredential(); -DeidentificationClient client = new DeidentificationClient(endpoint, credential); - -Response response = client.GetJob(""); -]]> -This sample shows how to call GetJob with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeidentificationClient client = new DeidentificationClient(endpoint, credential); -Response response = client.GetJob(""); +Response response = client.GetJob("documents_smith_1"); ]]> This sample shows how to call GetJobAsync and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -DeidentificationClient client = new DeidentificationClient(endpoint, credential); - -Response response = await client.GetJobAsync("", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("location").ToString()); -Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("prefix").ToString()); -Console.WriteLine(result.GetProperty("targetLocation").GetProperty("location").ToString()); -Console.WriteLine(result.GetProperty("targetLocation").GetProperty("prefix").ToString()); -Console.WriteLine(result.GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("lastUpdatedAt").ToString()); -Console.WriteLine(result.GetProperty("createdAt").ToString()); -]]> -This sample shows how to call GetJobAsync with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeidentificationClient client = new DeidentificationClient(endpoint, credential); -Response response = await client.GetJobAsync("", null); +Response response = await client.GetJobAsync("documents_smith_1", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("location").ToString()); Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("prefix").ToString()); -Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("extensions")[0].ToString()); Console.WriteLine(result.GetProperty("targetLocation").GetProperty("location").ToString()); Console.WriteLine(result.GetProperty("targetLocation").GetProperty("prefix").ToString()); -Console.WriteLine(result.GetProperty("operation").ToString()); -Console.WriteLine(result.GetProperty("dataType").ToString()); -Console.WriteLine(result.GetProperty("redactionFormat").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("lastUpdatedAt").ToString()); Console.WriteLine(result.GetProperty("createdAt").ToString()); -Console.WriteLine(result.GetProperty("startedAt").ToString()); -Console.WriteLine(result.GetProperty("summary").GetProperty("successful").ToString()); -Console.WriteLine(result.GetProperty("summary").GetProperty("failed").ToString()); -Console.WriteLine(result.GetProperty("summary").GetProperty("canceled").ToString()); -Console.WriteLine(result.GetProperty("summary").GetProperty("total").ToString()); -Console.WriteLine(result.GetProperty("summary").GetProperty("bytesProcessed").ToString()); ]]> This sample shows how to call GetJob and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeidentificationClient client = new DeidentificationClient(endpoint, credential); -Response response = client.GetJob("", null); +Response response = client.GetJob("documents_smith_1", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); @@ -111,87 +63,39 @@ Console.WriteLine(result.GetProperty("targetLocation").GetProperty("prefix").ToS Console.WriteLine(result.GetProperty("status").ToString()); Console.WriteLine(result.GetProperty("lastUpdatedAt").ToString()); Console.WriteLine(result.GetProperty("createdAt").ToString()); -]]> -This sample shows how to call GetJob with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -DeidentificationClient client = new DeidentificationClient(endpoint, credential); - -Response response = client.GetJob("", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("location").ToString()); -Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("prefix").ToString()); -Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("extensions")[0].ToString()); -Console.WriteLine(result.GetProperty("targetLocation").GetProperty("location").ToString()); -Console.WriteLine(result.GetProperty("targetLocation").GetProperty("prefix").ToString()); -Console.WriteLine(result.GetProperty("operation").ToString()); -Console.WriteLine(result.GetProperty("dataType").ToString()); -Console.WriteLine(result.GetProperty("redactionFormat").ToString()); -Console.WriteLine(result.GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); -Console.WriteLine(result.GetProperty("lastUpdatedAt").ToString()); -Console.WriteLine(result.GetProperty("createdAt").ToString()); -Console.WriteLine(result.GetProperty("startedAt").ToString()); -Console.WriteLine(result.GetProperty("summary").GetProperty("successful").ToString()); -Console.WriteLine(result.GetProperty("summary").GetProperty("failed").ToString()); -Console.WriteLine(result.GetProperty("summary").GetProperty("canceled").ToString()); -Console.WriteLine(result.GetProperty("summary").GetProperty("total").ToString()); -Console.WriteLine(result.GetProperty("summary").GetProperty("bytesProcessed").ToString()); ]]> This sample shows how to call CancelJobAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -DeidentificationClient client = new DeidentificationClient(endpoint, credential); - -Response response = await client.CancelJobAsync(""); -]]> -This sample shows how to call CancelJobAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeidentificationClient client = new DeidentificationClient(endpoint, credential); -Response response = await client.CancelJobAsync(""); +Response response = await client.CancelJobAsync("documents_smith_1"); ]]> This sample shows how to call CancelJob. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeidentificationClient client = new DeidentificationClient(endpoint, credential); -Response response = client.CancelJob(""); -]]> -This sample shows how to call CancelJob with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -DeidentificationClient client = new DeidentificationClient(endpoint, credential); - -Response response = client.CancelJob(""); +Response response = client.CancelJob("documents_smith_1"); ]]> This sample shows how to call CancelJobAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeidentificationClient client = new DeidentificationClient(endpoint, credential); -Response response = await client.CancelJobAsync("", null); +Response response = await client.CancelJobAsync("documents_smith_1", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); @@ -202,112 +106,38 @@ Console.WriteLine(result.GetProperty("targetLocation").GetProperty("prefix").ToS Console.WriteLine(result.GetProperty("status").ToString()); Console.WriteLine(result.GetProperty("lastUpdatedAt").ToString()); Console.WriteLine(result.GetProperty("createdAt").ToString()); -]]> -This sample shows how to call CancelJobAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -DeidentificationClient client = new DeidentificationClient(endpoint, credential); - -Response response = await client.CancelJobAsync("", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("location").ToString()); -Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("prefix").ToString()); -Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("extensions")[0].ToString()); -Console.WriteLine(result.GetProperty("targetLocation").GetProperty("location").ToString()); -Console.WriteLine(result.GetProperty("targetLocation").GetProperty("prefix").ToString()); -Console.WriteLine(result.GetProperty("operation").ToString()); -Console.WriteLine(result.GetProperty("dataType").ToString()); -Console.WriteLine(result.GetProperty("redactionFormat").ToString()); -Console.WriteLine(result.GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); -Console.WriteLine(result.GetProperty("lastUpdatedAt").ToString()); -Console.WriteLine(result.GetProperty("createdAt").ToString()); -Console.WriteLine(result.GetProperty("startedAt").ToString()); -Console.WriteLine(result.GetProperty("summary").GetProperty("successful").ToString()); -Console.WriteLine(result.GetProperty("summary").GetProperty("failed").ToString()); -Console.WriteLine(result.GetProperty("summary").GetProperty("canceled").ToString()); -Console.WriteLine(result.GetProperty("summary").GetProperty("total").ToString()); -Console.WriteLine(result.GetProperty("summary").GetProperty("bytesProcessed").ToString()); ]]> This sample shows how to call CancelJob and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -DeidentificationClient client = new DeidentificationClient(endpoint, credential); - -Response response = client.CancelJob("", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("location").ToString()); -Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("prefix").ToString()); -Console.WriteLine(result.GetProperty("targetLocation").GetProperty("location").ToString()); -Console.WriteLine(result.GetProperty("targetLocation").GetProperty("prefix").ToString()); -Console.WriteLine(result.GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("lastUpdatedAt").ToString()); -Console.WriteLine(result.GetProperty("createdAt").ToString()); -]]> -This sample shows how to call CancelJob with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeidentificationClient client = new DeidentificationClient(endpoint, credential); -Response response = client.CancelJob("", null); +Response response = client.CancelJob("documents_smith_1", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("location").ToString()); Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("prefix").ToString()); -Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("extensions")[0].ToString()); Console.WriteLine(result.GetProperty("targetLocation").GetProperty("location").ToString()); Console.WriteLine(result.GetProperty("targetLocation").GetProperty("prefix").ToString()); -Console.WriteLine(result.GetProperty("operation").ToString()); -Console.WriteLine(result.GetProperty("dataType").ToString()); -Console.WriteLine(result.GetProperty("redactionFormat").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("lastUpdatedAt").ToString()); Console.WriteLine(result.GetProperty("createdAt").ToString()); -Console.WriteLine(result.GetProperty("startedAt").ToString()); -Console.WriteLine(result.GetProperty("summary").GetProperty("successful").ToString()); -Console.WriteLine(result.GetProperty("summary").GetProperty("failed").ToString()); -Console.WriteLine(result.GetProperty("summary").GetProperty("canceled").ToString()); -Console.WriteLine(result.GetProperty("summary").GetProperty("total").ToString()); -Console.WriteLine(result.GetProperty("summary").GetProperty("bytesProcessed").ToString()); ]]> This sample shows how to call DeleteJobAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -DeidentificationClient client = new DeidentificationClient(endpoint, credential); - -Response response = await client.DeleteJobAsync(""); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call DeleteJobAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeidentificationClient client = new DeidentificationClient(endpoint, credential); -Response response = await client.DeleteJobAsync(""); +Response response = await client.DeleteJobAsync("documents_smith_1"); Console.WriteLine(response.Status); ]]> @@ -316,21 +146,11 @@ Console.WriteLine(response.Status); This sample shows how to call DeleteJob. "); -TokenCredential credential = new DefaultAzureCredential(); -DeidentificationClient client = new DeidentificationClient(endpoint, credential); - -Response response = client.DeleteJob(""); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call DeleteJob with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeidentificationClient client = new DeidentificationClient(endpoint, credential); -Response response = client.DeleteJob(""); +Response response = client.DeleteJob("documents_smith_1"); Console.WriteLine(response.Status); ]]> @@ -339,24 +159,15 @@ Console.WriteLine(response.Status); This sample shows how to call DeidentifyAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -DeidentificationClient client = new DeidentificationClient(endpoint, credential); - -DeidentificationContent body = new DeidentificationContent(""); -Response response = await client.DeidentifyAsync(body); -]]> -This sample shows how to call DeidentifyAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeidentificationClient client = new DeidentificationClient(endpoint, credential); -DeidentificationContent body = new DeidentificationContent("") +DeidentificationContent body = new DeidentificationContent("Hello my name is John Smith.") { Operation = OperationType.Redact, DataType = DocumentDataType.Plaintext, - RedactionFormat = "", + RedactionFormat = "[{type}]", }; Response response = await client.DeidentifyAsync(body); ]]> @@ -365,24 +176,15 @@ Response response = await client.DeidentifyAsync(body); This sample shows how to call Deidentify. "); -TokenCredential credential = new DefaultAzureCredential(); -DeidentificationClient client = new DeidentificationClient(endpoint, credential); - -DeidentificationContent body = new DeidentificationContent(""); -Response response = client.Deidentify(body); -]]> -This sample shows how to call Deidentify with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeidentificationClient client = new DeidentificationClient(endpoint, credential); -DeidentificationContent body = new DeidentificationContent("") +DeidentificationContent body = new DeidentificationContent("Hello my name is John Smith.") { Operation = OperationType.Redact, DataType = DocumentDataType.Plaintext, - RedactionFormat = "", + RedactionFormat = "[{type}]", }; Response response = client.Deidentify(body); ]]> @@ -391,194 +193,89 @@ Response response = client.Deidentify(body); This sample shows how to call DeidentifyAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeidentificationClient client = new DeidentificationClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - inputText = "", -}); -Response response = await client.DeidentifyAsync(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.ToString()); -]]> -This sample shows how to call DeidentifyAsync with all request content and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -DeidentificationClient client = new DeidentificationClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - inputText = "", + inputText = "Hello my name is John Smith.", operation = "Redact", dataType = "Plaintext", - redactionFormat = "", + redactionFormat = "[{type}]", }); Response response = await client.DeidentifyAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("outputText").ToString()); -Console.WriteLine(result.GetProperty("taggerResult").GetProperty("entities")[0].GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("taggerResult").GetProperty("entities")[0].GetProperty("offset").GetProperty("utf8").ToString()); -Console.WriteLine(result.GetProperty("taggerResult").GetProperty("entities")[0].GetProperty("offset").GetProperty("utf16").ToString()); -Console.WriteLine(result.GetProperty("taggerResult").GetProperty("entities")[0].GetProperty("offset").GetProperty("codePoint").ToString()); -Console.WriteLine(result.GetProperty("taggerResult").GetProperty("entities")[0].GetProperty("length").GetProperty("utf8").ToString()); -Console.WriteLine(result.GetProperty("taggerResult").GetProperty("entities")[0].GetProperty("length").GetProperty("utf16").ToString()); -Console.WriteLine(result.GetProperty("taggerResult").GetProperty("entities")[0].GetProperty("length").GetProperty("codePoint").ToString()); -Console.WriteLine(result.GetProperty("taggerResult").GetProperty("entities")[0].GetProperty("text").ToString()); -Console.WriteLine(result.GetProperty("taggerResult").GetProperty("entities")[0].GetProperty("confidenceScore").ToString()); -Console.WriteLine(result.GetProperty("taggerResult").GetProperty("path").ToString()); -Console.WriteLine(result.GetProperty("taggerResult").GetProperty("etag").ToString()); +Console.WriteLine(result.ToString()); ]]> This sample shows how to call Deidentify and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeidentificationClient client = new DeidentificationClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - inputText = "", -}); -Response response = client.Deidentify(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.ToString()); -]]> -This sample shows how to call Deidentify with all request content and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -DeidentificationClient client = new DeidentificationClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - inputText = "", + inputText = "Hello my name is John Smith.", operation = "Redact", dataType = "Plaintext", - redactionFormat = "", + redactionFormat = "[{type}]", }); Response response = client.Deidentify(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("outputText").ToString()); -Console.WriteLine(result.GetProperty("taggerResult").GetProperty("entities")[0].GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("taggerResult").GetProperty("entities")[0].GetProperty("offset").GetProperty("utf8").ToString()); -Console.WriteLine(result.GetProperty("taggerResult").GetProperty("entities")[0].GetProperty("offset").GetProperty("utf16").ToString()); -Console.WriteLine(result.GetProperty("taggerResult").GetProperty("entities")[0].GetProperty("offset").GetProperty("codePoint").ToString()); -Console.WriteLine(result.GetProperty("taggerResult").GetProperty("entities")[0].GetProperty("length").GetProperty("utf8").ToString()); -Console.WriteLine(result.GetProperty("taggerResult").GetProperty("entities")[0].GetProperty("length").GetProperty("utf16").ToString()); -Console.WriteLine(result.GetProperty("taggerResult").GetProperty("entities")[0].GetProperty("length").GetProperty("codePoint").ToString()); -Console.WriteLine(result.GetProperty("taggerResult").GetProperty("entities")[0].GetProperty("text").ToString()); -Console.WriteLine(result.GetProperty("taggerResult").GetProperty("entities")[0].GetProperty("confidenceScore").ToString()); -Console.WriteLine(result.GetProperty("taggerResult").GetProperty("path").ToString()); -Console.WriteLine(result.GetProperty("taggerResult").GetProperty("etag").ToString()); +Console.WriteLine(result.ToString()); ]]> This sample shows how to call GetJobsAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeidentificationClient client = new DeidentificationClient(endpoint, credential); await foreach (DeidentificationJob item in client.GetJobsAsync()) { } -]]> -This sample shows how to call GetJobsAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -DeidentificationClient client = new DeidentificationClient(endpoint, credential); - -await foreach (DeidentificationJob item in client.GetJobsAsync(maxpagesize: 1234, continuationToken: "")) -{ -} ]]> This sample shows how to call GetJobs. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeidentificationClient client = new DeidentificationClient(endpoint, credential); foreach (DeidentificationJob item in client.GetJobs()) { } -]]> -This sample shows how to call GetJobs with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -DeidentificationClient client = new DeidentificationClient(endpoint, credential); - -foreach (DeidentificationJob item in client.GetJobs(maxpagesize: 1234, continuationToken: "")) -{ -} ]]> This sample shows how to call GetJobsAsync and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -DeidentificationClient client = new DeidentificationClient(endpoint, credential); - -await foreach (BinaryData item in client.GetJobsAsync(null, null, null)) -{ - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("location").ToString()); - Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("prefix").ToString()); - Console.WriteLine(result.GetProperty("targetLocation").GetProperty("location").ToString()); - Console.WriteLine(result.GetProperty("targetLocation").GetProperty("prefix").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("lastUpdatedAt").ToString()); - Console.WriteLine(result.GetProperty("createdAt").ToString()); -} -]]> -This sample shows how to call GetJobsAsync with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeidentificationClient client = new DeidentificationClient(endpoint, credential); -await foreach (BinaryData item in client.GetJobsAsync(1234, "", null)) +await foreach (BinaryData item in client.GetJobsAsync(10, "K1JJRDpzOEtaQWZabUQrQUNBQUFBQUFBQUFBQT09I1JUOjEjVFJDOjEwI0ZQQzpBZ0VBQUFBTUFDUUFBQUFBQUE9PQ==", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("location").ToString()); Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("prefix").ToString()); - Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("extensions")[0].ToString()); Console.WriteLine(result.GetProperty("targetLocation").GetProperty("location").ToString()); Console.WriteLine(result.GetProperty("targetLocation").GetProperty("prefix").ToString()); - Console.WriteLine(result.GetProperty("operation").ToString()); - Console.WriteLine(result.GetProperty("dataType").ToString()); - Console.WriteLine(result.GetProperty("redactionFormat").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("lastUpdatedAt").ToString()); Console.WriteLine(result.GetProperty("createdAt").ToString()); - Console.WriteLine(result.GetProperty("startedAt").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("successful").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("failed").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("canceled").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("total").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("bytesProcessed").ToString()); } ]]> @@ -586,11 +283,11 @@ await foreach (BinaryData item in client.GetJobsAsync(1234, " This sample shows how to call GetJobs and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeidentificationClient client = new DeidentificationClient(endpoint, credential); -foreach (BinaryData item in client.GetJobs(null, null, null)) +foreach (BinaryData item in client.GetJobs(10, "K1JJRDpzOEtaQWZabUQrQUNBQUFBQUFBQUFBQT09I1JUOjEjVFJDOjEwI0ZQQzpBZ0VBQUFBTUFDUUFBQUFBQUE9PQ==", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); @@ -602,60 +299,17 @@ foreach (BinaryData item in client.GetJobs(null, null, null)) Console.WriteLine(result.GetProperty("lastUpdatedAt").ToString()); Console.WriteLine(result.GetProperty("createdAt").ToString()); } -]]> -This sample shows how to call GetJobs with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -DeidentificationClient client = new DeidentificationClient(endpoint, credential); - -foreach (BinaryData item in client.GetJobs(1234, "", null)) -{ - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("location").ToString()); - Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("prefix").ToString()); - Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("extensions")[0].ToString()); - Console.WriteLine(result.GetProperty("targetLocation").GetProperty("location").ToString()); - Console.WriteLine(result.GetProperty("targetLocation").GetProperty("prefix").ToString()); - Console.WriteLine(result.GetProperty("operation").ToString()); - Console.WriteLine(result.GetProperty("dataType").ToString()); - Console.WriteLine(result.GetProperty("redactionFormat").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("lastUpdatedAt").ToString()); - Console.WriteLine(result.GetProperty("createdAt").ToString()); - Console.WriteLine(result.GetProperty("startedAt").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("successful").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("failed").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("canceled").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("total").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("bytesProcessed").ToString()); -} ]]> This sample shows how to call GetJobDocumentsAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -DeidentificationClient client = new DeidentificationClient(endpoint, credential); - -await foreach (DocumentDetails item in client.GetJobDocumentsAsync("")) -{ -} -]]> -This sample shows how to call GetJobDocumentsAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeidentificationClient client = new DeidentificationClient(endpoint, credential); -await foreach (DocumentDetails item in client.GetJobDocumentsAsync("", maxpagesize: 1234, continuationToken: "")) +await foreach (DocumentDetails item in client.GetJobDocumentsAsync("documents_smith_1")) { } ]]> @@ -664,21 +318,11 @@ await foreach (DocumentDetails item in client.GetJobDocumentsAsync("", max This sample shows how to call GetJobDocuments. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeidentificationClient client = new DeidentificationClient(endpoint, credential); -foreach (DocumentDetails item in client.GetJobDocuments("")) -{ -} -]]> -This sample shows how to call GetJobDocuments with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -DeidentificationClient client = new DeidentificationClient(endpoint, credential); - -foreach (DocumentDetails item in client.GetJobDocuments("", maxpagesize: 1234, continuationToken: "")) +foreach (DocumentDetails item in client.GetJobDocuments("documents_smith_1")) { } ]]> @@ -687,11 +331,11 @@ foreach (DocumentDetails item in client.GetJobDocuments("", maxpagesize: 1 This sample shows how to call GetJobDocumentsAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeidentificationClient client = new DeidentificationClient(endpoint, credential); -await foreach (BinaryData item in client.GetJobDocumentsAsync("", null, null, null)) +await foreach (BinaryData item in client.GetJobDocumentsAsync("documents_smith_1", 10, "K1JJRDpzOEtaQWZabUQrQUNBQUFBQUFBQUFBQT09I1JUOjEjVFJDOjEwI0ZQQzpBZ0VBQUFBTUFDUUFBQUFBQUE9PQ==", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); @@ -699,65 +343,23 @@ await foreach (BinaryData item in client.GetJobDocumentsAsync("", null, nu Console.WriteLine(result.GetProperty("input").GetProperty("etag").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); } -]]> -This sample shows how to call GetJobDocumentsAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -DeidentificationClient client = new DeidentificationClient(endpoint, credential); - -await foreach (BinaryData item in client.GetJobDocumentsAsync("", 1234, "", null)) -{ - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("input").GetProperty("path").ToString()); - Console.WriteLine(result.GetProperty("input").GetProperty("etag").ToString()); - Console.WriteLine(result.GetProperty("output").GetProperty("path").ToString()); - Console.WriteLine(result.GetProperty("output").GetProperty("etag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); -} ]]> This sample shows how to call GetJobDocuments and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -DeidentificationClient client = new DeidentificationClient(endpoint, credential); - -foreach (BinaryData item in client.GetJobDocuments("", null, null, null)) -{ - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("input").GetProperty("path").ToString()); - Console.WriteLine(result.GetProperty("input").GetProperty("etag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); -} -]]> -This sample shows how to call GetJobDocuments with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeidentificationClient client = new DeidentificationClient(endpoint, credential); -foreach (BinaryData item in client.GetJobDocuments("", 1234, "", null)) +foreach (BinaryData item in client.GetJobDocuments("documents_smith_1", 10, "K1JJRDpzOEtaQWZabUQrQUNBQUFBQUFBQUFBQT09I1JUOjEjVFJDOjEwI0ZQQzpBZ0VBQUFBTUFDUUFBQUFBQUE9PQ==", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("input").GetProperty("path").ToString()); Console.WriteLine(result.GetProperty("input").GetProperty("etag").ToString()); - Console.WriteLine(result.GetProperty("output").GetProperty("path").ToString()); - Console.WriteLine(result.GetProperty("output").GetProperty("etag").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); } ]]> @@ -765,30 +367,20 @@ foreach (BinaryData item in client.GetJobDocuments("", 1234, " This sample shows how to call CreateJobAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -DeidentificationClient client = new DeidentificationClient(endpoint, credential); - -DeidentificationJob resource = new DeidentificationJob(new SourceStorageLocation(new Uri("http://localhost:3000"), ""), new TargetStorageLocation(new Uri("http://localhost:3000"), "")); -Operation operation = await client.CreateJobAsync(WaitUntil.Completed, "", resource); -DeidentificationJob responseData = operation.Value; -]]> -This sample shows how to call CreateJobAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeidentificationClient client = new DeidentificationClient(endpoint, credential); -DeidentificationJob resource = new DeidentificationJob(new SourceStorageLocation(new Uri("http://localhost:3000"), "") +DeidentificationJob resource = new DeidentificationJob(new SourceStorageLocation(new Uri("https://blobtest.blob.core.windows.net/container?sp=r&st=2024-01-24T18:11:10Z&se=2024-01-25T02:11:10Z&spr=https&sv=2022-11-02&sr=c&sig=signature%3D"), "/documents") { - Extensions = { "" }, -}, new TargetStorageLocation(new Uri("http://localhost:3000"), "")) + Extensions = { "*" }, +}, new TargetStorageLocation(new Uri("https://blobtest.blob.core.windows.net/container?sp=r&st=2024-01-24T18:11:10Z&se=2024-01-25T02:11:10Z&spr=https&sv=2022-11-02&sr=c&sig=signature%3D"), "/documents")) { Operation = OperationType.Redact, DataType = DocumentDataType.Plaintext, - RedactionFormat = "", + RedactionFormat = "[{type}]", }; -Operation operation = await client.CreateJobAsync(WaitUntil.Completed, "", resource); +Operation operation = await client.CreateJobAsync(WaitUntil.Completed, "documents_smith_1", resource); DeidentificationJob responseData = operation.Value; ]]> @@ -796,30 +388,20 @@ DeidentificationJob responseData = operation.Value; This sample shows how to call CreateJob. "); -TokenCredential credential = new DefaultAzureCredential(); -DeidentificationClient client = new DeidentificationClient(endpoint, credential); - -DeidentificationJob resource = new DeidentificationJob(new SourceStorageLocation(new Uri("http://localhost:3000"), ""), new TargetStorageLocation(new Uri("http://localhost:3000"), "")); -Operation operation = client.CreateJob(WaitUntil.Completed, "", resource); -DeidentificationJob responseData = operation.Value; -]]> -This sample shows how to call CreateJob with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeidentificationClient client = new DeidentificationClient(endpoint, credential); -DeidentificationJob resource = new DeidentificationJob(new SourceStorageLocation(new Uri("http://localhost:3000"), "") +DeidentificationJob resource = new DeidentificationJob(new SourceStorageLocation(new Uri("https://blobtest.blob.core.windows.net/container?sp=r&st=2024-01-24T18:11:10Z&se=2024-01-25T02:11:10Z&spr=https&sv=2022-11-02&sr=c&sig=signature%3D"), "/documents") { - Extensions = { "" }, -}, new TargetStorageLocation(new Uri("http://localhost:3000"), "")) + Extensions = { "*" }, +}, new TargetStorageLocation(new Uri("https://blobtest.blob.core.windows.net/container?sp=r&st=2024-01-24T18:11:10Z&se=2024-01-25T02:11:10Z&spr=https&sv=2022-11-02&sr=c&sig=signature%3D"), "/documents")) { Operation = OperationType.Redact, DataType = DocumentDataType.Plaintext, - RedactionFormat = "", + RedactionFormat = "[{type}]", }; -Operation operation = client.CreateJob(WaitUntil.Completed, "", resource); +Operation operation = client.CreateJob(WaitUntil.Completed, "documents_smith_1", resource); DeidentificationJob responseData = operation.Value; ]]> @@ -827,7 +409,7 @@ DeidentificationJob responseData = operation.Value; This sample shows how to call CreateJobAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeidentificationClient client = new DeidentificationClient(endpoint, credential); @@ -835,119 +417,42 @@ using RequestContent content = RequestContent.Create(new { sourceLocation = new { - location = "http://localhost:3000", - prefix = "", - }, - targetLocation = new - { - location = "http://localhost:3000", - prefix = "", - }, -}); -Operation operation = await client.CreateJobAsync(WaitUntil.Completed, "", content); -BinaryData responseData = operation.Value; - -JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("location").ToString()); -Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("prefix").ToString()); -Console.WriteLine(result.GetProperty("targetLocation").GetProperty("location").ToString()); -Console.WriteLine(result.GetProperty("targetLocation").GetProperty("prefix").ToString()); -Console.WriteLine(result.GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("lastUpdatedAt").ToString()); -Console.WriteLine(result.GetProperty("createdAt").ToString()); -]]> -This sample shows how to call CreateJobAsync with all parameters and request content and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -DeidentificationClient client = new DeidentificationClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - sourceLocation = new - { - location = "http://localhost:3000", - prefix = "", + location = "https://blobtest.blob.core.windows.net/container?sp=r&st=2024-01-24T18:11:10Z&se=2024-01-25T02:11:10Z&spr=https&sv=2022-11-02&sr=c&sig=signature%3D", + prefix = "/documents", extensions = new object[] { - "" + "*" }, }, targetLocation = new { - location = "http://localhost:3000", - prefix = "", + location = "https://blobtest.blob.core.windows.net/container?sp=r&st=2024-01-24T18:11:10Z&se=2024-01-25T02:11:10Z&spr=https&sv=2022-11-02&sr=c&sig=signature%3D", + prefix = "/documents", }, operation = "Redact", dataType = "Plaintext", - redactionFormat = "", + redactionFormat = "[{type}]", + status = "NotStarted", }); -Operation operation = await client.CreateJobAsync(WaitUntil.Completed, "", content); +Operation operation = await client.CreateJobAsync(WaitUntil.Completed, "documents_smith_1", content); BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("location").ToString()); Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("prefix").ToString()); -Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("extensions")[0].ToString()); Console.WriteLine(result.GetProperty("targetLocation").GetProperty("location").ToString()); Console.WriteLine(result.GetProperty("targetLocation").GetProperty("prefix").ToString()); -Console.WriteLine(result.GetProperty("operation").ToString()); -Console.WriteLine(result.GetProperty("dataType").ToString()); -Console.WriteLine(result.GetProperty("redactionFormat").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("lastUpdatedAt").ToString()); Console.WriteLine(result.GetProperty("createdAt").ToString()); -Console.WriteLine(result.GetProperty("startedAt").ToString()); -Console.WriteLine(result.GetProperty("summary").GetProperty("successful").ToString()); -Console.WriteLine(result.GetProperty("summary").GetProperty("failed").ToString()); -Console.WriteLine(result.GetProperty("summary").GetProperty("canceled").ToString()); -Console.WriteLine(result.GetProperty("summary").GetProperty("total").ToString()); -Console.WriteLine(result.GetProperty("summary").GetProperty("bytesProcessed").ToString()); ]]> This sample shows how to call CreateJob and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -DeidentificationClient client = new DeidentificationClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - sourceLocation = new - { - location = "http://localhost:3000", - prefix = "", - }, - targetLocation = new - { - location = "http://localhost:3000", - prefix = "", - }, -}); -Operation operation = client.CreateJob(WaitUntil.Completed, "", content); -BinaryData responseData = operation.Value; - -JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("location").ToString()); -Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("prefix").ToString()); -Console.WriteLine(result.GetProperty("targetLocation").GetProperty("location").ToString()); -Console.WriteLine(result.GetProperty("targetLocation").GetProperty("prefix").ToString()); -Console.WriteLine(result.GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("lastUpdatedAt").ToString()); -Console.WriteLine(result.GetProperty("createdAt").ToString()); -]]> -This sample shows how to call CreateJob with all parameters and request content and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeidentificationClient client = new DeidentificationClient(endpoint, credential); @@ -955,48 +460,35 @@ using RequestContent content = RequestContent.Create(new { sourceLocation = new { - location = "http://localhost:3000", - prefix = "", + location = "https://blobtest.blob.core.windows.net/container?sp=r&st=2024-01-24T18:11:10Z&se=2024-01-25T02:11:10Z&spr=https&sv=2022-11-02&sr=c&sig=signature%3D", + prefix = "/documents", extensions = new object[] { - "" + "*" }, }, targetLocation = new { - location = "http://localhost:3000", - prefix = "", + location = "https://blobtest.blob.core.windows.net/container?sp=r&st=2024-01-24T18:11:10Z&se=2024-01-25T02:11:10Z&spr=https&sv=2022-11-02&sr=c&sig=signature%3D", + prefix = "/documents", }, operation = "Redact", dataType = "Plaintext", - redactionFormat = "", + redactionFormat = "[{type}]", + status = "NotStarted", }); -Operation operation = client.CreateJob(WaitUntil.Completed, "", content); +Operation operation = client.CreateJob(WaitUntil.Completed, "documents_smith_1", content); BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("location").ToString()); Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("prefix").ToString()); -Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("extensions")[0].ToString()); Console.WriteLine(result.GetProperty("targetLocation").GetProperty("location").ToString()); Console.WriteLine(result.GetProperty("targetLocation").GetProperty("prefix").ToString()); -Console.WriteLine(result.GetProperty("operation").ToString()); -Console.WriteLine(result.GetProperty("dataType").ToString()); -Console.WriteLine(result.GetProperty("redactionFormat").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); -Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("lastUpdatedAt").ToString()); Console.WriteLine(result.GetProperty("createdAt").ToString()); -Console.WriteLine(result.GetProperty("startedAt").ToString()); -Console.WriteLine(result.GetProperty("summary").GetProperty("successful").ToString()); -Console.WriteLine(result.GetProperty("summary").GetProperty("failed").ToString()); -Console.WriteLine(result.GetProperty("summary").GetProperty("canceled").ToString()); -Console.WriteLine(result.GetProperty("summary").GetProperty("total").ToString()); -Console.WriteLine(result.GetProperty("summary").GetProperty("bytesProcessed").ToString()); ]]> diff --git a/sdk/healthdataaiservices/Azure.Health.Deidentification/tests/Generated/Samples/Samples_DeidentificationClient.cs b/sdk/healthdataaiservices/Azure.Health.Deidentification/tests/Generated/Samples/Samples_DeidentificationClient.cs index cd72b75607cb..f882101c78b9 100644 --- a/sdk/healthdataaiservices/Azure.Health.Deidentification/tests/Generated/Samples/Samples_DeidentificationClient.cs +++ b/sdk/healthdataaiservices/Azure.Health.Deidentification/tests/Generated/Samples/Samples_DeidentificationClient.cs @@ -18,13 +18,13 @@ public partial class Samples_DeidentificationClient { [Test] [Ignore("Only validating compilation of examples")] - public void Example_DeidentificationJob_GetJob_ShortVersion() + public void Example_DeidentificationJob_GetJob_GetADeIdentificationJob() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeidentificationClient client = new DeidentificationClient(endpoint, credential); - Response response = client.GetJob("", null); + Response response = client.GetJob("documents_smith_1", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); @@ -39,13 +39,13 @@ public void Example_DeidentificationJob_GetJob_ShortVersion() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DeidentificationJob_GetJob_ShortVersion_Async() + public async Task Example_DeidentificationJob_GetJob_GetADeIdentificationJob_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeidentificationClient client = new DeidentificationClient(endpoint, credential); - Response response = await client.GetJobAsync("", null); + Response response = await client.GetJobAsync("documents_smith_1", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); @@ -60,493 +60,201 @@ public async Task Example_DeidentificationJob_GetJob_ShortVersion_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_DeidentificationJob_GetJob_ShortVersion_Convenience() + public void Example_DeidentificationJob_GetJob_GetADeIdentificationJob_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeidentificationClient client = new DeidentificationClient(endpoint, credential); - Response response = client.GetJob(""); + Response response = client.GetJob("documents_smith_1"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DeidentificationJob_GetJob_ShortVersion_Convenience_Async() + public async Task Example_DeidentificationJob_GetJob_GetADeIdentificationJob_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeidentificationClient client = new DeidentificationClient(endpoint, credential); - Response response = await client.GetJobAsync(""); + Response response = await client.GetJobAsync("documents_smith_1"); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DeidentificationJob_GetJob_AllParameters() + public void Example_DeidServices_CancelJob_CancelADeIdentificationJob() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeidentificationClient client = new DeidentificationClient(endpoint, credential); - Response response = client.GetJob("", null); + Response response = client.CancelJob("documents_smith_1", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("location").ToString()); Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("prefix").ToString()); - Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("extensions")[0].ToString()); Console.WriteLine(result.GetProperty("targetLocation").GetProperty("location").ToString()); Console.WriteLine(result.GetProperty("targetLocation").GetProperty("prefix").ToString()); - Console.WriteLine(result.GetProperty("operation").ToString()); - Console.WriteLine(result.GetProperty("dataType").ToString()); - Console.WriteLine(result.GetProperty("redactionFormat").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("lastUpdatedAt").ToString()); Console.WriteLine(result.GetProperty("createdAt").ToString()); - Console.WriteLine(result.GetProperty("startedAt").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("successful").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("failed").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("canceled").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("total").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("bytesProcessed").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DeidentificationJob_GetJob_AllParameters_Async() + public async Task Example_DeidServices_CancelJob_CancelADeIdentificationJob_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeidentificationClient client = new DeidentificationClient(endpoint, credential); - Response response = await client.GetJobAsync("", null); + Response response = await client.CancelJobAsync("documents_smith_1", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("location").ToString()); Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("prefix").ToString()); - Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("extensions")[0].ToString()); Console.WriteLine(result.GetProperty("targetLocation").GetProperty("location").ToString()); Console.WriteLine(result.GetProperty("targetLocation").GetProperty("prefix").ToString()); - Console.WriteLine(result.GetProperty("operation").ToString()); - Console.WriteLine(result.GetProperty("dataType").ToString()); - Console.WriteLine(result.GetProperty("redactionFormat").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("lastUpdatedAt").ToString()); Console.WriteLine(result.GetProperty("createdAt").ToString()); - Console.WriteLine(result.GetProperty("startedAt").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("successful").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("failed").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("canceled").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("total").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("bytesProcessed").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DeidentificationJob_GetJob_AllParameters_Convenience() + public void Example_DeidServices_CancelJob_CancelADeIdentificationJob_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeidentificationClient client = new DeidentificationClient(endpoint, credential); - Response response = client.GetJob(""); + Response response = client.CancelJob("documents_smith_1"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DeidentificationJob_GetJob_AllParameters_Convenience_Async() + public async Task Example_DeidServices_CancelJob_CancelADeIdentificationJob_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeidentificationClient client = new DeidentificationClient(endpoint, credential); - Response response = await client.GetJobAsync(""); + Response response = await client.CancelJobAsync("documents_smith_1"); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DeidServices_CancelJob_ShortVersion() + public void Example_DeidentificationJob_DeleteJob_DeleteADeIdentificationJob() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeidentificationClient client = new DeidentificationClient(endpoint, credential); - Response response = client.CancelJob("", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("location").ToString()); - Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("prefix").ToString()); - Console.WriteLine(result.GetProperty("targetLocation").GetProperty("location").ToString()); - Console.WriteLine(result.GetProperty("targetLocation").GetProperty("prefix").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("lastUpdatedAt").ToString()); - Console.WriteLine(result.GetProperty("createdAt").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DeidServices_CancelJob_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DeidentificationClient client = new DeidentificationClient(endpoint, credential); - - Response response = await client.CancelJobAsync("", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("location").ToString()); - Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("prefix").ToString()); - Console.WriteLine(result.GetProperty("targetLocation").GetProperty("location").ToString()); - Console.WriteLine(result.GetProperty("targetLocation").GetProperty("prefix").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("lastUpdatedAt").ToString()); - Console.WriteLine(result.GetProperty("createdAt").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DeidServices_CancelJob_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DeidentificationClient client = new DeidentificationClient(endpoint, credential); - - Response response = client.CancelJob(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DeidServices_CancelJob_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DeidentificationClient client = new DeidentificationClient(endpoint, credential); - - Response response = await client.CancelJobAsync(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DeidServices_CancelJob_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DeidentificationClient client = new DeidentificationClient(endpoint, credential); - - Response response = client.CancelJob("", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("location").ToString()); - Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("prefix").ToString()); - Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("extensions")[0].ToString()); - Console.WriteLine(result.GetProperty("targetLocation").GetProperty("location").ToString()); - Console.WriteLine(result.GetProperty("targetLocation").GetProperty("prefix").ToString()); - Console.WriteLine(result.GetProperty("operation").ToString()); - Console.WriteLine(result.GetProperty("dataType").ToString()); - Console.WriteLine(result.GetProperty("redactionFormat").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("lastUpdatedAt").ToString()); - Console.WriteLine(result.GetProperty("createdAt").ToString()); - Console.WriteLine(result.GetProperty("startedAt").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("successful").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("failed").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("canceled").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("total").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("bytesProcessed").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DeidServices_CancelJob_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DeidentificationClient client = new DeidentificationClient(endpoint, credential); - - Response response = await client.CancelJobAsync("", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("location").ToString()); - Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("prefix").ToString()); - Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("extensions")[0].ToString()); - Console.WriteLine(result.GetProperty("targetLocation").GetProperty("location").ToString()); - Console.WriteLine(result.GetProperty("targetLocation").GetProperty("prefix").ToString()); - Console.WriteLine(result.GetProperty("operation").ToString()); - Console.WriteLine(result.GetProperty("dataType").ToString()); - Console.WriteLine(result.GetProperty("redactionFormat").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("lastUpdatedAt").ToString()); - Console.WriteLine(result.GetProperty("createdAt").ToString()); - Console.WriteLine(result.GetProperty("startedAt").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("successful").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("failed").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("canceled").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("total").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("bytesProcessed").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DeidServices_CancelJob_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DeidentificationClient client = new DeidentificationClient(endpoint, credential); - - Response response = client.CancelJob(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DeidServices_CancelJob_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DeidentificationClient client = new DeidentificationClient(endpoint, credential); - - Response response = await client.CancelJobAsync(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DeidentificationJob_DeleteJob_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DeidentificationClient client = new DeidentificationClient(endpoint, credential); - - Response response = client.DeleteJob(""); + Response response = client.DeleteJob("documents_smith_1"); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DeidentificationJob_DeleteJob_ShortVersion_Async() + public async Task Example_DeidentificationJob_DeleteJob_DeleteADeIdentificationJob_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeidentificationClient client = new DeidentificationClient(endpoint, credential); - Response response = await client.DeleteJobAsync(""); + Response response = await client.DeleteJobAsync("documents_smith_1"); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DeidentificationJob_DeleteJob_AllParameters() + public void Example_DeidServices_Deidentify_DeIdentifyText() { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DeidentificationClient client = new DeidentificationClient(endpoint, credential); - - Response response = client.DeleteJob(""); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DeidentificationJob_DeleteJob_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DeidentificationClient client = new DeidentificationClient(endpoint, credential); - - Response response = await client.DeleteJobAsync(""); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DeidServices_Deidentify_ShortVersion() - { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeidentificationClient client = new DeidentificationClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - inputText = "", - }); - Response response = client.Deidentify(content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DeidServices_Deidentify_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DeidentificationClient client = new DeidentificationClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - inputText = "", - }); - Response response = await client.DeidentifyAsync(content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DeidServices_Deidentify_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DeidentificationClient client = new DeidentificationClient(endpoint, credential); - - DeidentificationContent body = new DeidentificationContent(""); - Response response = client.Deidentify(body); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DeidServices_Deidentify_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DeidentificationClient client = new DeidentificationClient(endpoint, credential); - - DeidentificationContent body = new DeidentificationContent(""); - Response response = await client.DeidentifyAsync(body); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DeidServices_Deidentify_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DeidentificationClient client = new DeidentificationClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - inputText = "", + inputText = "Hello my name is John Smith.", operation = "Redact", dataType = "Plaintext", - redactionFormat = "", + redactionFormat = "[{type}]", }); Response response = client.Deidentify(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("outputText").ToString()); - Console.WriteLine(result.GetProperty("taggerResult").GetProperty("entities")[0].GetProperty("category").ToString()); - Console.WriteLine(result.GetProperty("taggerResult").GetProperty("entities")[0].GetProperty("offset").GetProperty("utf8").ToString()); - Console.WriteLine(result.GetProperty("taggerResult").GetProperty("entities")[0].GetProperty("offset").GetProperty("utf16").ToString()); - Console.WriteLine(result.GetProperty("taggerResult").GetProperty("entities")[0].GetProperty("offset").GetProperty("codePoint").ToString()); - Console.WriteLine(result.GetProperty("taggerResult").GetProperty("entities")[0].GetProperty("length").GetProperty("utf8").ToString()); - Console.WriteLine(result.GetProperty("taggerResult").GetProperty("entities")[0].GetProperty("length").GetProperty("utf16").ToString()); - Console.WriteLine(result.GetProperty("taggerResult").GetProperty("entities")[0].GetProperty("length").GetProperty("codePoint").ToString()); - Console.WriteLine(result.GetProperty("taggerResult").GetProperty("entities")[0].GetProperty("text").ToString()); - Console.WriteLine(result.GetProperty("taggerResult").GetProperty("entities")[0].GetProperty("confidenceScore").ToString()); - Console.WriteLine(result.GetProperty("taggerResult").GetProperty("path").ToString()); - Console.WriteLine(result.GetProperty("taggerResult").GetProperty("etag").ToString()); + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DeidServices_Deidentify_AllParameters_Async() + public async Task Example_DeidServices_Deidentify_DeIdentifyText_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeidentificationClient client = new DeidentificationClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - inputText = "", + inputText = "Hello my name is John Smith.", operation = "Redact", dataType = "Plaintext", - redactionFormat = "", + redactionFormat = "[{type}]", }); Response response = await client.DeidentifyAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("outputText").ToString()); - Console.WriteLine(result.GetProperty("taggerResult").GetProperty("entities")[0].GetProperty("category").ToString()); - Console.WriteLine(result.GetProperty("taggerResult").GetProperty("entities")[0].GetProperty("offset").GetProperty("utf8").ToString()); - Console.WriteLine(result.GetProperty("taggerResult").GetProperty("entities")[0].GetProperty("offset").GetProperty("utf16").ToString()); - Console.WriteLine(result.GetProperty("taggerResult").GetProperty("entities")[0].GetProperty("offset").GetProperty("codePoint").ToString()); - Console.WriteLine(result.GetProperty("taggerResult").GetProperty("entities")[0].GetProperty("length").GetProperty("utf8").ToString()); - Console.WriteLine(result.GetProperty("taggerResult").GetProperty("entities")[0].GetProperty("length").GetProperty("utf16").ToString()); - Console.WriteLine(result.GetProperty("taggerResult").GetProperty("entities")[0].GetProperty("length").GetProperty("codePoint").ToString()); - Console.WriteLine(result.GetProperty("taggerResult").GetProperty("entities")[0].GetProperty("text").ToString()); - Console.WriteLine(result.GetProperty("taggerResult").GetProperty("entities")[0].GetProperty("confidenceScore").ToString()); - Console.WriteLine(result.GetProperty("taggerResult").GetProperty("path").ToString()); - Console.WriteLine(result.GetProperty("taggerResult").GetProperty("etag").ToString()); + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DeidServices_Deidentify_AllParameters_Convenience() + public void Example_DeidServices_Deidentify_DeIdentifyText_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeidentificationClient client = new DeidentificationClient(endpoint, credential); - DeidentificationContent body = new DeidentificationContent("") + DeidentificationContent body = new DeidentificationContent("Hello my name is John Smith.") { Operation = OperationType.Redact, DataType = DocumentDataType.Plaintext, - RedactionFormat = "", + RedactionFormat = "[{type}]", }; Response response = client.Deidentify(body); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DeidServices_Deidentify_AllParameters_Convenience_Async() + public async Task Example_DeidServices_Deidentify_DeIdentifyText_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeidentificationClient client = new DeidentificationClient(endpoint, credential); - DeidentificationContent body = new DeidentificationContent("") + DeidentificationContent body = new DeidentificationContent("Hello my name is John Smith.") { Operation = OperationType.Redact, DataType = DocumentDataType.Plaintext, - RedactionFormat = "", + RedactionFormat = "[{type}]", }; Response response = await client.DeidentifyAsync(body); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DeidentificationJob_GetJobs_ShortVersion() + public void Example_DeidentificationJob_GetJobs_ListDeIdentificationJobs() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeidentificationClient client = new DeidentificationClient(endpoint, credential); - foreach (BinaryData item in client.GetJobs(null, null, null)) + foreach (BinaryData item in client.GetJobs(10, "K1JJRDpzOEtaQWZabUQrQUNBQUFBQUFBQUFBQT09I1JUOjEjVFJDOjEwI0ZQQzpBZ0VBQUFBTUFDUUFBQUFBQUE9PQ==", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); @@ -562,13 +270,13 @@ public void Example_DeidentificationJob_GetJobs_ShortVersion() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DeidentificationJob_GetJobs_ShortVersion_Async() + public async Task Example_DeidentificationJob_GetJobs_ListDeIdentificationJobs_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeidentificationClient client = new DeidentificationClient(endpoint, credential); - await foreach (BinaryData item in client.GetJobsAsync(null, null, null)) + await foreach (BinaryData item in client.GetJobsAsync(10, "K1JJRDpzOEtaQWZabUQrQUNBQUFBQUFBQUFBQT09I1JUOjEjVFJDOjEwI0ZQQzpBZ0VBQUFBTUFDUUFBQUFBQUE9PQ==", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); @@ -584,9 +292,9 @@ public async Task Example_DeidentificationJob_GetJobs_ShortVersion_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_DeidentificationJob_GetJobs_ShortVersion_Convenience() + public void Example_DeidentificationJob_GetJobs_ListDeIdentificationJobs_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeidentificationClient client = new DeidentificationClient(endpoint, credential); @@ -597,9 +305,9 @@ public void Example_DeidentificationJob_GetJobs_ShortVersion_Convenience() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DeidentificationJob_GetJobs_ShortVersion_Convenience_Async() + public async Task Example_DeidentificationJob_GetJobs_ListDeIdentificationJobs_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeidentificationClient client = new DeidentificationClient(endpoint, credential); @@ -610,339 +318,71 @@ public async Task Example_DeidentificationJob_GetJobs_ShortVersion_Convenience_A [Test] [Ignore("Only validating compilation of examples")] - public void Example_DeidentificationJob_GetJobs_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DeidentificationClient client = new DeidentificationClient(endpoint, credential); - - foreach (BinaryData item in client.GetJobs(1234, "", null)) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("location").ToString()); - Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("prefix").ToString()); - Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("extensions")[0].ToString()); - Console.WriteLine(result.GetProperty("targetLocation").GetProperty("location").ToString()); - Console.WriteLine(result.GetProperty("targetLocation").GetProperty("prefix").ToString()); - Console.WriteLine(result.GetProperty("operation").ToString()); - Console.WriteLine(result.GetProperty("dataType").ToString()); - Console.WriteLine(result.GetProperty("redactionFormat").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("lastUpdatedAt").ToString()); - Console.WriteLine(result.GetProperty("createdAt").ToString()); - Console.WriteLine(result.GetProperty("startedAt").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("successful").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("failed").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("canceled").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("total").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("bytesProcessed").ToString()); - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DeidentificationJob_GetJobs_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DeidentificationClient client = new DeidentificationClient(endpoint, credential); - - await foreach (BinaryData item in client.GetJobsAsync(1234, "", null)) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("location").ToString()); - Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("prefix").ToString()); - Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("extensions")[0].ToString()); - Console.WriteLine(result.GetProperty("targetLocation").GetProperty("location").ToString()); - Console.WriteLine(result.GetProperty("targetLocation").GetProperty("prefix").ToString()); - Console.WriteLine(result.GetProperty("operation").ToString()); - Console.WriteLine(result.GetProperty("dataType").ToString()); - Console.WriteLine(result.GetProperty("redactionFormat").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("lastUpdatedAt").ToString()); - Console.WriteLine(result.GetProperty("createdAt").ToString()); - Console.WriteLine(result.GetProperty("startedAt").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("successful").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("failed").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("canceled").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("total").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("bytesProcessed").ToString()); - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DeidentificationJob_GetJobs_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DeidentificationClient client = new DeidentificationClient(endpoint, credential); - - foreach (DeidentificationJob item in client.GetJobs(maxpagesize: 1234, continuationToken: "")) - { - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DeidentificationJob_GetJobs_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DeidentificationClient client = new DeidentificationClient(endpoint, credential); - - await foreach (DeidentificationJob item in client.GetJobsAsync(maxpagesize: 1234, continuationToken: "")) - { - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DocumentDetails_GetJobDocuments_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DeidentificationClient client = new DeidentificationClient(endpoint, credential); - - foreach (BinaryData item in client.GetJobDocuments("", null, null, null)) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("input").GetProperty("path").ToString()); - Console.WriteLine(result.GetProperty("input").GetProperty("etag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DocumentDetails_GetJobDocuments_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DeidentificationClient client = new DeidentificationClient(endpoint, credential); - - await foreach (BinaryData item in client.GetJobDocumentsAsync("", null, null, null)) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("input").GetProperty("path").ToString()); - Console.WriteLine(result.GetProperty("input").GetProperty("etag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DocumentDetails_GetJobDocuments_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DeidentificationClient client = new DeidentificationClient(endpoint, credential); - - foreach (DocumentDetails item in client.GetJobDocuments("")) - { - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DocumentDetails_GetJobDocuments_ShortVersion_Convenience_Async() + public void Example_DocumentDetails_GetJobDocuments_ListProcessedDocumentsWithinAJob() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeidentificationClient client = new DeidentificationClient(endpoint, credential); - await foreach (DocumentDetails item in client.GetJobDocumentsAsync("")) - { - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DocumentDetails_GetJobDocuments_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DeidentificationClient client = new DeidentificationClient(endpoint, credential); - - foreach (BinaryData item in client.GetJobDocuments("", 1234, "", null)) + foreach (BinaryData item in client.GetJobDocuments("documents_smith_1", 10, "K1JJRDpzOEtaQWZabUQrQUNBQUFBQUFBQUFBQT09I1JUOjEjVFJDOjEwI0ZQQzpBZ0VBQUFBTUFDUUFBQUFBQUE9PQ==", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("input").GetProperty("path").ToString()); Console.WriteLine(result.GetProperty("input").GetProperty("etag").ToString()); - Console.WriteLine(result.GetProperty("output").GetProperty("path").ToString()); - Console.WriteLine(result.GetProperty("output").GetProperty("etag").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); } } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DocumentDetails_GetJobDocuments_AllParameters_Async() + public async Task Example_DocumentDetails_GetJobDocuments_ListProcessedDocumentsWithinAJob_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeidentificationClient client = new DeidentificationClient(endpoint, credential); - await foreach (BinaryData item in client.GetJobDocumentsAsync("", 1234, "", null)) + await foreach (BinaryData item in client.GetJobDocumentsAsync("documents_smith_1", 10, "K1JJRDpzOEtaQWZabUQrQUNBQUFBQUFBQUFBQT09I1JUOjEjVFJDOjEwI0ZQQzpBZ0VBQUFBTUFDUUFBQUFBQUE9PQ==", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("input").GetProperty("path").ToString()); Console.WriteLine(result.GetProperty("input").GetProperty("etag").ToString()); - Console.WriteLine(result.GetProperty("output").GetProperty("path").ToString()); - Console.WriteLine(result.GetProperty("output").GetProperty("etag").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); } } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DocumentDetails_GetJobDocuments_AllParameters_Convenience() + public void Example_DocumentDetails_GetJobDocuments_ListProcessedDocumentsWithinAJob_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeidentificationClient client = new DeidentificationClient(endpoint, credential); - foreach (DocumentDetails item in client.GetJobDocuments("", maxpagesize: 1234, continuationToken: "")) + foreach (DocumentDetails item in client.GetJobDocuments("documents_smith_1")) { } } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DocumentDetails_GetJobDocuments_AllParameters_Convenience_Async() + public async Task Example_DocumentDetails_GetJobDocuments_ListProcessedDocumentsWithinAJob_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeidentificationClient client = new DeidentificationClient(endpoint, credential); - await foreach (DocumentDetails item in client.GetJobDocumentsAsync("", maxpagesize: 1234, continuationToken: "")) + await foreach (DocumentDetails item in client.GetJobDocumentsAsync("documents_smith_1")) { } } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DeidentificationJob_CreateJob_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DeidentificationClient client = new DeidentificationClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - sourceLocation = new - { - location = "http://localhost:3000", - prefix = "", - }, - targetLocation = new - { - location = "http://localhost:3000", - prefix = "", - }, - }); - Operation operation = client.CreateJob(WaitUntil.Completed, "", content); - BinaryData responseData = operation.Value; - - JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("location").ToString()); - Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("prefix").ToString()); - Console.WriteLine(result.GetProperty("targetLocation").GetProperty("location").ToString()); - Console.WriteLine(result.GetProperty("targetLocation").GetProperty("prefix").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("lastUpdatedAt").ToString()); - Console.WriteLine(result.GetProperty("createdAt").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DeidentificationJob_CreateJob_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DeidentificationClient client = new DeidentificationClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - sourceLocation = new - { - location = "http://localhost:3000", - prefix = "", - }, - targetLocation = new - { - location = "http://localhost:3000", - prefix = "", - }, - }); - Operation operation = await client.CreateJobAsync(WaitUntil.Completed, "", content); - BinaryData responseData = operation.Value; - - JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("location").ToString()); - Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("prefix").ToString()); - Console.WriteLine(result.GetProperty("targetLocation").GetProperty("location").ToString()); - Console.WriteLine(result.GetProperty("targetLocation").GetProperty("prefix").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("lastUpdatedAt").ToString()); - Console.WriteLine(result.GetProperty("createdAt").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DeidentificationJob_CreateJob_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DeidentificationClient client = new DeidentificationClient(endpoint, credential); - - DeidentificationJob resource = new DeidentificationJob(new SourceStorageLocation(new Uri("http://localhost:3000"), ""), new TargetStorageLocation(new Uri("http://localhost:3000"), "")); - Operation operation = client.CreateJob(WaitUntil.Completed, "", resource); - DeidentificationJob responseData = operation.Value; - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DeidentificationJob_CreateJob_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - DeidentificationClient client = new DeidentificationClient(endpoint, credential); - - DeidentificationJob resource = new DeidentificationJob(new SourceStorageLocation(new Uri("http://localhost:3000"), ""), new TargetStorageLocation(new Uri("http://localhost:3000"), "")); - Operation operation = await client.CreateJobAsync(WaitUntil.Completed, "", resource); - DeidentificationJob responseData = operation.Value; - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DeidentificationJob_CreateJob_AllParameters() + public void Example_DeidentificationJob_CreateJob_CreateADeIdentificationJob() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeidentificationClient client = new DeidentificationClient(endpoint, credential); @@ -950,55 +390,42 @@ public void Example_DeidentificationJob_CreateJob_AllParameters() { sourceLocation = new { - location = "http://localhost:3000", - prefix = "", + location = "https://blobtest.blob.core.windows.net/container?sp=r&st=2024-01-24T18:11:10Z&se=2024-01-25T02:11:10Z&spr=https&sv=2022-11-02&sr=c&sig=signature%3D", + prefix = "/documents", extensions = new object[] { -"" +"*" }, }, targetLocation = new { - location = "http://localhost:3000", - prefix = "", + location = "https://blobtest.blob.core.windows.net/container?sp=r&st=2024-01-24T18:11:10Z&se=2024-01-25T02:11:10Z&spr=https&sv=2022-11-02&sr=c&sig=signature%3D", + prefix = "/documents", }, operation = "Redact", dataType = "Plaintext", - redactionFormat = "", + redactionFormat = "[{type}]", + status = "NotStarted", }); - Operation operation = client.CreateJob(WaitUntil.Completed, "", content); + Operation operation = client.CreateJob(WaitUntil.Completed, "documents_smith_1", content); BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("location").ToString()); Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("prefix").ToString()); - Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("extensions")[0].ToString()); Console.WriteLine(result.GetProperty("targetLocation").GetProperty("location").ToString()); Console.WriteLine(result.GetProperty("targetLocation").GetProperty("prefix").ToString()); - Console.WriteLine(result.GetProperty("operation").ToString()); - Console.WriteLine(result.GetProperty("dataType").ToString()); - Console.WriteLine(result.GetProperty("redactionFormat").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("lastUpdatedAt").ToString()); Console.WriteLine(result.GetProperty("createdAt").ToString()); - Console.WriteLine(result.GetProperty("startedAt").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("successful").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("failed").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("canceled").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("total").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("bytesProcessed").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DeidentificationJob_CreateJob_AllParameters_Async() + public async Task Example_DeidentificationJob_CreateJob_CreateADeIdentificationJob_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeidentificationClient client = new DeidentificationClient(endpoint, credential); @@ -1006,89 +433,76 @@ public async Task Example_DeidentificationJob_CreateJob_AllParameters_Async() { sourceLocation = new { - location = "http://localhost:3000", - prefix = "", + location = "https://blobtest.blob.core.windows.net/container?sp=r&st=2024-01-24T18:11:10Z&se=2024-01-25T02:11:10Z&spr=https&sv=2022-11-02&sr=c&sig=signature%3D", + prefix = "/documents", extensions = new object[] { -"" +"*" }, }, targetLocation = new { - location = "http://localhost:3000", - prefix = "", + location = "https://blobtest.blob.core.windows.net/container?sp=r&st=2024-01-24T18:11:10Z&se=2024-01-25T02:11:10Z&spr=https&sv=2022-11-02&sr=c&sig=signature%3D", + prefix = "/documents", }, operation = "Redact", dataType = "Plaintext", - redactionFormat = "", + redactionFormat = "[{type}]", + status = "NotStarted", }); - Operation operation = await client.CreateJobAsync(WaitUntil.Completed, "", content); + Operation operation = await client.CreateJobAsync(WaitUntil.Completed, "documents_smith_1", content); BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("location").ToString()); Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("prefix").ToString()); - Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("extensions")[0].ToString()); Console.WriteLine(result.GetProperty("targetLocation").GetProperty("location").ToString()); Console.WriteLine(result.GetProperty("targetLocation").GetProperty("prefix").ToString()); - Console.WriteLine(result.GetProperty("operation").ToString()); - Console.WriteLine(result.GetProperty("dataType").ToString()); - Console.WriteLine(result.GetProperty("redactionFormat").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("lastUpdatedAt").ToString()); Console.WriteLine(result.GetProperty("createdAt").ToString()); - Console.WriteLine(result.GetProperty("startedAt").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("successful").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("failed").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("canceled").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("total").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("bytesProcessed").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DeidentificationJob_CreateJob_AllParameters_Convenience() + public void Example_DeidentificationJob_CreateJob_CreateADeIdentificationJob_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeidentificationClient client = new DeidentificationClient(endpoint, credential); - DeidentificationJob resource = new DeidentificationJob(new SourceStorageLocation(new Uri("http://localhost:3000"), "") + DeidentificationJob resource = new DeidentificationJob(new SourceStorageLocation(new Uri("https://blobtest.blob.core.windows.net/container?sp=r&st=2024-01-24T18:11:10Z&se=2024-01-25T02:11:10Z&spr=https&sv=2022-11-02&sr=c&sig=signature%3D"), "/documents") { - Extensions = { "" }, - }, new TargetStorageLocation(new Uri("http://localhost:3000"), "")) + Extensions = { "*" }, + }, new TargetStorageLocation(new Uri("https://blobtest.blob.core.windows.net/container?sp=r&st=2024-01-24T18:11:10Z&se=2024-01-25T02:11:10Z&spr=https&sv=2022-11-02&sr=c&sig=signature%3D"), "/documents")) { Operation = OperationType.Redact, DataType = DocumentDataType.Plaintext, - RedactionFormat = "", + RedactionFormat = "[{type}]", }; - Operation operation = client.CreateJob(WaitUntil.Completed, "", resource); + Operation operation = client.CreateJob(WaitUntil.Completed, "documents_smith_1", resource); DeidentificationJob responseData = operation.Value; } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DeidentificationJob_CreateJob_AllParameters_Convenience_Async() + public async Task Example_DeidentificationJob_CreateJob_CreateADeIdentificationJob_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeidentificationClient client = new DeidentificationClient(endpoint, credential); - DeidentificationJob resource = new DeidentificationJob(new SourceStorageLocation(new Uri("http://localhost:3000"), "") + DeidentificationJob resource = new DeidentificationJob(new SourceStorageLocation(new Uri("https://blobtest.blob.core.windows.net/container?sp=r&st=2024-01-24T18:11:10Z&se=2024-01-25T02:11:10Z&spr=https&sv=2022-11-02&sr=c&sig=signature%3D"), "/documents") { - Extensions = { "" }, - }, new TargetStorageLocation(new Uri("http://localhost:3000"), "")) + Extensions = { "*" }, + }, new TargetStorageLocation(new Uri("https://blobtest.blob.core.windows.net/container?sp=r&st=2024-01-24T18:11:10Z&se=2024-01-25T02:11:10Z&spr=https&sv=2022-11-02&sr=c&sig=signature%3D"), "/documents")) { Operation = OperationType.Redact, DataType = DocumentDataType.Plaintext, - RedactionFormat = "", + RedactionFormat = "[{type}]", }; - Operation operation = await client.CreateJobAsync(WaitUntil.Completed, "", resource); + Operation operation = await client.CreateJobAsync(WaitUntil.Completed, "documents_smith_1", resource); DeidentificationJob responseData = operation.Value; } } diff --git a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/samples/Generated/Samples/Sample_InformaticaOrganizationCollection.cs b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/samples/Generated/Samples/Sample_InformaticaOrganizationCollection.cs index 2c144425b85e..603ed50029e1 100644 --- a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/samples/Generated/Samples/Sample_InformaticaOrganizationCollection.cs +++ b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/samples/Generated/Samples/Sample_InformaticaOrganizationCollection.cs @@ -16,84 +16,12 @@ namespace Azure.ResourceManager.InformaticaDataManagement.Samples { public partial class Sample_InformaticaOrganizationCollection { - // Organizations_ListByResourceGroup - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetAll_OrganizationsListByResourceGroup() - { - // Generated from example definition: specification/informatica/resource-manager/Informatica.DataManagement/stable/2024-05-08/examples/Organizations_ListByResourceGroup_MaximumSet_Gen.json - // this example is just showing the usage of "Organizations_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "3599DA28-E346-4D9F-811E-189C0445F0FE"; - string resourceGroupName = "rgopenapi"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this InformaticaOrganizationResource - InformaticaOrganizationCollection collection = resourceGroupResource.GetInformaticaOrganizations(); - - // invoke the operation and iterate over the result - await foreach (InformaticaOrganizationResource item in collection.GetAllAsync()) - { - // the variable item is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - InformaticaOrganizationData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - Console.WriteLine($"Succeeded"); - } - - // Organizations_ListByResourceGroup_Min - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetAll_OrganizationsListByResourceGroupMin() - { - // Generated from example definition: specification/informatica/resource-manager/Informatica.DataManagement/stable/2024-05-08/examples/Organizations_ListByResourceGroup_MinimumSet_Gen.json - // this example is just showing the usage of "Organizations_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "3599DA28-E346-4D9F-811E-189C0445F0FE"; - string resourceGroupName = "rgopenapi"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this InformaticaOrganizationResource - InformaticaOrganizationCollection collection = resourceGroupResource.GetInformaticaOrganizations(); - - // invoke the operation and iterate over the result - await foreach (InformaticaOrganizationResource item in collection.GetAllAsync()) - { - // the variable item is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - InformaticaOrganizationData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - Console.WriteLine($"Succeeded"); - } - // Organizations_Get [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_OrganizationsGet() { - // Generated from example definition: specification/informatica/resource-manager/Informatica.DataManagement/stable/2024-05-08/examples/Organizations_Get_MaximumSet_Gen.json + // Generated from example definition: 2024-05-08/Organizations_Get_MaximumSet_Gen.json // this example is just showing the usage of "Organizations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -127,7 +55,7 @@ public async Task Get_OrganizationsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_OrganizationsGet() { - // Generated from example definition: specification/informatica/resource-manager/Informatica.DataManagement/stable/2024-05-08/examples/Organizations_Get_MaximumSet_Gen.json + // Generated from example definition: 2024-05-08/Organizations_Get_MaximumSet_Gen.json // this example is just showing the usage of "Organizations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -157,7 +85,7 @@ public async Task Exists_OrganizationsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_OrganizationsGet() { - // Generated from example definition: specification/informatica/resource-manager/Informatica.DataManagement/stable/2024-05-08/examples/Organizations_Get_MaximumSet_Gen.json + // Generated from example definition: 2024-05-08/Organizations_Get_MaximumSet_Gen.json // this example is just showing the usage of "Organizations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -199,7 +127,7 @@ public async Task GetIfExists_OrganizationsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_OrganizationsGetMin() { - // Generated from example definition: specification/informatica/resource-manager/Informatica.DataManagement/stable/2024-05-08/examples/Organizations_Get_MinimumSet_Gen.json + // Generated from example definition: 2024-05-08/Organizations_Get_MinimumSet_Gen.json // this example is just showing the usage of "Organizations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -233,7 +161,7 @@ public async Task Get_OrganizationsGetMin() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_OrganizationsGetMin() { - // Generated from example definition: specification/informatica/resource-manager/Informatica.DataManagement/stable/2024-05-08/examples/Organizations_Get_MinimumSet_Gen.json + // Generated from example definition: 2024-05-08/Organizations_Get_MinimumSet_Gen.json // this example is just showing the usage of "Organizations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -263,7 +191,7 @@ public async Task Exists_OrganizationsGetMin() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_OrganizationsGetMin() { - // Generated from example definition: specification/informatica/resource-manager/Informatica.DataManagement/stable/2024-05-08/examples/Organizations_Get_MinimumSet_Gen.json + // Generated from example definition: 2024-05-08/Organizations_Get_MinimumSet_Gen.json // this example is just showing the usage of "Organizations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -305,7 +233,7 @@ public async Task GetIfExists_OrganizationsGetMin() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_OrganizationsCreateOrUpdate() { - // Generated from example definition: specification/informatica/resource-manager/Informatica.DataManagement/stable/2024-05-08/examples/Organizations_CreateOrUpdate_MaximumSet_Gen.json + // Generated from example definition: 2024-05-08/Organizations_CreateOrUpdate_MaximumSet_Gen.json // this example is just showing the usage of "Organizations_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -382,7 +310,7 @@ public async Task CreateOrUpdate_OrganizationsCreateOrUpdate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_OrganizationsCreateOrUpdateMin() { - // Generated from example definition: specification/informatica/resource-manager/Informatica.DataManagement/stable/2024-05-08/examples/Organizations_CreateOrUpdate_MinimumSet_Gen.json + // Generated from example definition: 2024-05-08/Organizations_CreateOrUpdate_MinimumSet_Gen.json // this example is just showing the usage of "Organizations_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/samples/Generated/Samples/Sample_InformaticaOrganizationResource.cs b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/samples/Generated/Samples/Sample_InformaticaOrganizationResource.cs index 2cd5d4ef0b03..b2b1abe794d2 100644 --- a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/samples/Generated/Samples/Sample_InformaticaOrganizationResource.cs +++ b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/samples/Generated/Samples/Sample_InformaticaOrganizationResource.cs @@ -10,82 +10,17 @@ using Azure.Core; using Azure.Identity; using Azure.ResourceManager.InformaticaDataManagement.Models; -using Azure.ResourceManager.Resources; namespace Azure.ResourceManager.InformaticaDataManagement.Samples { public partial class Sample_InformaticaOrganizationResource { - // Organizations_ListBySubscription - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetInformaticaOrganizations_OrganizationsListBySubscription() - { - // Generated from example definition: specification/informatica/resource-manager/Informatica.DataManagement/stable/2024-05-08/examples/Organizations_ListBySubscription_MaximumSet_Gen.json - // this example is just showing the usage of "Organizations_ListBySubscription" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this SubscriptionResource created on azure - // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "3599DA28-E346-4D9F-811E-189C0445F0FE"; - ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); - SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); - - // invoke the operation and iterate over the result - await foreach (InformaticaOrganizationResource item in subscriptionResource.GetInformaticaOrganizationsAsync()) - { - // the variable item is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - InformaticaOrganizationData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - Console.WriteLine($"Succeeded"); - } - - // Organizations_ListBySubscription_Min - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetInformaticaOrganizations_OrganizationsListBySubscriptionMin() - { - // Generated from example definition: specification/informatica/resource-manager/Informatica.DataManagement/stable/2024-05-08/examples/Organizations_ListBySubscription_MinimumSet_Gen.json - // this example is just showing the usage of "Organizations_ListBySubscription" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this SubscriptionResource created on azure - // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "3599DA28-E346-4D9F-811E-189C0445F0FE"; - ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); - SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); - - // invoke the operation and iterate over the result - await foreach (InformaticaOrganizationResource item in subscriptionResource.GetInformaticaOrganizationsAsync()) - { - // the variable item is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - InformaticaOrganizationData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - Console.WriteLine($"Succeeded"); - } - // Organizations_Get [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_OrganizationsGet() { - // Generated from example definition: specification/informatica/resource-manager/Informatica.DataManagement/stable/2024-05-08/examples/Organizations_Get_MaximumSet_Gen.json + // Generated from example definition: 2024-05-08/Organizations_Get_MaximumSet_Gen.json // this example is just showing the usage of "Organizations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -116,7 +51,7 @@ public async Task Get_OrganizationsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_OrganizationsGetMin() { - // Generated from example definition: specification/informatica/resource-manager/Informatica.DataManagement/stable/2024-05-08/examples/Organizations_Get_MinimumSet_Gen.json + // Generated from example definition: 2024-05-08/Organizations_Get_MinimumSet_Gen.json // this example is just showing the usage of "Organizations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -147,7 +82,7 @@ public async Task Get_OrganizationsGetMin() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_OrganizationsUpdate() { - // Generated from example definition: specification/informatica/resource-manager/Informatica.DataManagement/stable/2024-05-08/examples/Organizations_Update_MaximumSet_Gen.json + // Generated from example definition: 2024-05-08/Organizations_Update_MaximumSet_Gen.json // this example is just showing the usage of "Organizations_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -219,7 +154,7 @@ public async Task Update_OrganizationsUpdate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_OrganizationsUpdateMin() { - // Generated from example definition: specification/informatica/resource-manager/Informatica.DataManagement/stable/2024-05-08/examples/Organizations_Update_MinimumSet_Gen.json + // Generated from example definition: 2024-05-08/Organizations_Update_MinimumSet_Gen.json // this example is just showing the usage of "Organizations_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -251,7 +186,7 @@ public async Task Update_OrganizationsUpdateMin() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_OrganizationsDelete() { - // Generated from example definition: specification/informatica/resource-manager/Informatica.DataManagement/stable/2024-05-08/examples/Organizations_Delete_MaximumSet_Gen.json + // Generated from example definition: 2024-05-08/Organizations_Delete_MaximumSet_Gen.json // this example is just showing the usage of "Organizations_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -278,7 +213,7 @@ public async Task Delete_OrganizationsDelete() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_OrganizationsDeleteMin() { - // Generated from example definition: specification/informatica/resource-manager/Informatica.DataManagement/stable/2024-05-08/examples/Organizations_Delete_MinimumSet_Gen.json + // Generated from example definition: 2024-05-08/Organizations_Delete_MinimumSet_Gen.json // this example is just showing the usage of "Organizations_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -300,13 +235,13 @@ public async Task Delete_OrganizationsDeleteMin() Console.WriteLine($"Succeeded"); } - // Organizations_GetAllServerlessRuntimes + // Organizations_GetServerlessMetadata [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetAllServerlessRuntimes_OrganizationsGetAllServerlessRuntimes() + public async Task GetServerlessMetadata_OrganizationsGetServerlessMetadata() { - // Generated from example definition: specification/informatica/resource-manager/Informatica.DataManagement/stable/2024-05-08/examples/Organizations_GetAllServerlessRuntimes_MaximumSet_Gen.json - // this example is just showing the usage of "Organizations_GetAllServerlessRuntimes" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-05-08/Organizations_GetServerlessMetadata_MaximumSet_Gen.json + // this example is just showing the usage of "Organizations_GetServerlessMetadata" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -317,23 +252,23 @@ public async Task GetAllServerlessRuntimes_OrganizationsGetAllServerlessRuntimes // for more information of creating InformaticaOrganizationResource, please refer to the document of InformaticaOrganizationResource string subscriptionId = "3599DA28-E346-4D9F-811E-189C0445F0FE"; string resourceGroupName = "rgopenapi"; - string organizationName = "t"; + string organizationName = "3_UC"; ResourceIdentifier informaticaOrganizationResourceId = InformaticaOrganizationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, organizationName); InformaticaOrganizationResource informaticaOrganization = client.GetInformaticaOrganizationResource(informaticaOrganizationResourceId); // invoke the operation - InformaticaServerlessRuntimeResourceList result = await informaticaOrganization.GetAllServerlessRuntimesAsync(); + ServerlessMetadataResponse result = await informaticaOrganization.GetServerlessMetadataAsync(); Console.WriteLine($"Succeeded: {result}"); } - // Organizations_GetAllServerlessRuntimes_Min + // Organizations_GetServerlessMetadata_Min [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetAllServerlessRuntimes_OrganizationsGetAllServerlessRuntimesMin() + public async Task GetServerlessMetadata_OrganizationsGetServerlessMetadataMin() { - // Generated from example definition: specification/informatica/resource-manager/Informatica.DataManagement/stable/2024-05-08/examples/Organizations_GetAllServerlessRuntimes_MinimumSet_Gen.json - // this example is just showing the usage of "Organizations_GetAllServerlessRuntimes" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-05-08/Organizations_GetServerlessMetadata_MinimumSet_Gen.json + // this example is just showing the usage of "Organizations_GetServerlessMetadata" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -344,23 +279,23 @@ public async Task GetAllServerlessRuntimes_OrganizationsGetAllServerlessRuntimes // for more information of creating InformaticaOrganizationResource, please refer to the document of InformaticaOrganizationResource string subscriptionId = "3599DA28-E346-4D9F-811E-189C0445F0FE"; string resourceGroupName = "rgopenapi"; - string organizationName = "0"; + string organizationName = "A"; ResourceIdentifier informaticaOrganizationResourceId = InformaticaOrganizationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, organizationName); InformaticaOrganizationResource informaticaOrganization = client.GetInformaticaOrganizationResource(informaticaOrganizationResourceId); // invoke the operation - InformaticaServerlessRuntimeResourceList result = await informaticaOrganization.GetAllServerlessRuntimesAsync(); + ServerlessMetadataResponse result = await informaticaOrganization.GetServerlessMetadataAsync(); Console.WriteLine($"Succeeded: {result}"); } - // Organizations_GetServerlessMetadata + // Organizations_GetAllServerlessRuntimes [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetServerlessMetadata_OrganizationsGetServerlessMetadata() + public async Task GetAllServerlessRuntimes_OrganizationsGetAllServerlessRuntimes() { - // Generated from example definition: specification/informatica/resource-manager/Informatica.DataManagement/stable/2024-05-08/examples/Organizations_GetServerlessMetadata_MaximumSet_Gen.json - // this example is just showing the usage of "Organizations_GetServerlessMetadata" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-05-08/Organizations_GetAllServerlessRuntimes_MaximumSet_Gen.json + // this example is just showing the usage of "Organizations_GetAllServerlessRuntimes" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -371,23 +306,23 @@ public async Task GetServerlessMetadata_OrganizationsGetServerlessMetadata() // for more information of creating InformaticaOrganizationResource, please refer to the document of InformaticaOrganizationResource string subscriptionId = "3599DA28-E346-4D9F-811E-189C0445F0FE"; string resourceGroupName = "rgopenapi"; - string organizationName = "3_UC"; + string organizationName = "t"; ResourceIdentifier informaticaOrganizationResourceId = InformaticaOrganizationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, organizationName); InformaticaOrganizationResource informaticaOrganization = client.GetInformaticaOrganizationResource(informaticaOrganizationResourceId); // invoke the operation - ServerlessMetadataResponse result = await informaticaOrganization.GetServerlessMetadataAsync(); + InformaticaServerlessRuntimeResourceList result = await informaticaOrganization.GetAllServerlessRuntimesAsync(); Console.WriteLine($"Succeeded: {result}"); } - // Organizations_GetServerlessMetadata_Min + // Organizations_GetAllServerlessRuntimes_Min [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetServerlessMetadata_OrganizationsGetServerlessMetadataMin() + public async Task GetAllServerlessRuntimes_OrganizationsGetAllServerlessRuntimesMin() { - // Generated from example definition: specification/informatica/resource-manager/Informatica.DataManagement/stable/2024-05-08/examples/Organizations_GetServerlessMetadata_MinimumSet_Gen.json - // this example is just showing the usage of "Organizations_GetServerlessMetadata" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-05-08/Organizations_GetAllServerlessRuntimes_MinimumSet_Gen.json + // this example is just showing the usage of "Organizations_GetAllServerlessRuntimes" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -398,12 +333,12 @@ public async Task GetServerlessMetadata_OrganizationsGetServerlessMetadataMin() // for more information of creating InformaticaOrganizationResource, please refer to the document of InformaticaOrganizationResource string subscriptionId = "3599DA28-E346-4D9F-811E-189C0445F0FE"; string resourceGroupName = "rgopenapi"; - string organizationName = "A"; + string organizationName = "0"; ResourceIdentifier informaticaOrganizationResourceId = InformaticaOrganizationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, organizationName); InformaticaOrganizationResource informaticaOrganization = client.GetInformaticaOrganizationResource(informaticaOrganizationResourceId); // invoke the operation - ServerlessMetadataResponse result = await informaticaOrganization.GetServerlessMetadataAsync(); + InformaticaServerlessRuntimeResourceList result = await informaticaOrganization.GetAllServerlessRuntimesAsync(); Console.WriteLine($"Succeeded: {result}"); } diff --git a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/samples/Generated/Samples/Sample_InformaticaServerlessRuntimeCollection.cs b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/samples/Generated/Samples/Sample_InformaticaServerlessRuntimeCollection.cs index a7705d251c7c..2c3faaf21ca4 100644 --- a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/samples/Generated/Samples/Sample_InformaticaServerlessRuntimeCollection.cs +++ b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/samples/Generated/Samples/Sample_InformaticaServerlessRuntimeCollection.cs @@ -15,49 +15,12 @@ namespace Azure.ResourceManager.InformaticaDataManagement.Samples { public partial class Sample_InformaticaServerlessRuntimeCollection { - // ServerlessRuntimes_ListByInformaticaOrganizationResource - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetAll_ServerlessRuntimesListByInformaticaOrganizationResource() - { - // Generated from example definition: specification/informatica/resource-manager/Informatica.DataManagement/stable/2024-05-08/examples/ServerlessRuntimes_ListByInformaticaOrganizationResource_MaximumSet_Gen.json - // this example is just showing the usage of "ServerlessRuntimes_ListByInformaticaOrganizationResource" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this InformaticaOrganizationResource created on azure - // for more information of creating InformaticaOrganizationResource, please refer to the document of InformaticaOrganizationResource - string subscriptionId = "3599DA28-E346-4D9F-811E-189C0445F0FE"; - string resourceGroupName = "rgopenapi"; - string organizationName = "orgName"; - ResourceIdentifier informaticaOrganizationResourceId = InformaticaOrganizationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, organizationName); - InformaticaOrganizationResource informaticaOrganization = client.GetInformaticaOrganizationResource(informaticaOrganizationResourceId); - - // get the collection of this InformaticaServerlessRuntimeResource - InformaticaServerlessRuntimeCollection collection = informaticaOrganization.GetInformaticaServerlessRuntimes(); - - // invoke the operation and iterate over the result - await foreach (InformaticaServerlessRuntimeResource item in collection.GetAllAsync()) - { - // the variable item is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - InformaticaServerlessRuntimeData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - Console.WriteLine($"Succeeded"); - } - // ServerlessRuntimes_Get [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ServerlessRuntimesGet() { - // Generated from example definition: specification/informatica/resource-manager/Informatica.DataManagement/stable/2024-05-08/examples/ServerlessRuntimes_Get_MaximumSet_Gen.json + // Generated from example definition: 2024-05-08/ServerlessRuntimes_Get_MaximumSet_Gen.json // this example is just showing the usage of "ServerlessRuntimes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -92,7 +55,7 @@ public async Task Get_ServerlessRuntimesGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ServerlessRuntimesGet() { - // Generated from example definition: specification/informatica/resource-manager/Informatica.DataManagement/stable/2024-05-08/examples/ServerlessRuntimes_Get_MaximumSet_Gen.json + // Generated from example definition: 2024-05-08/ServerlessRuntimes_Get_MaximumSet_Gen.json // this example is just showing the usage of "ServerlessRuntimes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -123,7 +86,7 @@ public async Task Exists_ServerlessRuntimesGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ServerlessRuntimesGet() { - // Generated from example definition: specification/informatica/resource-manager/Informatica.DataManagement/stable/2024-05-08/examples/ServerlessRuntimes_Get_MaximumSet_Gen.json + // Generated from example definition: 2024-05-08/ServerlessRuntimes_Get_MaximumSet_Gen.json // this example is just showing the usage of "ServerlessRuntimes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -166,7 +129,7 @@ public async Task GetIfExists_ServerlessRuntimesGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ServerlessRuntimesGetMin() { - // Generated from example definition: specification/informatica/resource-manager/Informatica.DataManagement/stable/2024-05-08/examples/ServerlessRuntimes_Get_MinimumSet_Gen.json + // Generated from example definition: 2024-05-08/ServerlessRuntimes_Get_MinimumSet_Gen.json // this example is just showing the usage of "ServerlessRuntimes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -201,7 +164,7 @@ public async Task Get_ServerlessRuntimesGetMin() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ServerlessRuntimesGetMin() { - // Generated from example definition: specification/informatica/resource-manager/Informatica.DataManagement/stable/2024-05-08/examples/ServerlessRuntimes_Get_MinimumSet_Gen.json + // Generated from example definition: 2024-05-08/ServerlessRuntimes_Get_MinimumSet_Gen.json // this example is just showing the usage of "ServerlessRuntimes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -232,7 +195,7 @@ public async Task Exists_ServerlessRuntimesGetMin() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ServerlessRuntimesGetMin() { - // Generated from example definition: specification/informatica/resource-manager/Informatica.DataManagement/stable/2024-05-08/examples/ServerlessRuntimes_Get_MinimumSet_Gen.json + // Generated from example definition: 2024-05-08/ServerlessRuntimes_Get_MinimumSet_Gen.json // this example is just showing the usage of "ServerlessRuntimes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -275,7 +238,7 @@ public async Task GetIfExists_ServerlessRuntimesGetMin() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ServerlessRuntimesCreateOrUpdate() { - // Generated from example definition: specification/informatica/resource-manager/Informatica.DataManagement/stable/2024-05-08/examples/ServerlessRuntimes_CreateOrUpdate_MaximumSet_Gen.json + // Generated from example definition: 2024-05-08/ServerlessRuntimes_CreateOrUpdate_MaximumSet_Gen.json // this example is just showing the usage of "ServerlessRuntimes_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -361,7 +324,7 @@ public async Task CreateOrUpdate_ServerlessRuntimesCreateOrUpdate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ServerlessRuntimesCreateOrUpdateMin() { - // Generated from example definition: specification/informatica/resource-manager/Informatica.DataManagement/stable/2024-05-08/examples/ServerlessRuntimes_CreateOrUpdate_MinimumSet_Gen.json + // Generated from example definition: 2024-05-08/ServerlessRuntimes_CreateOrUpdate_MinimumSet_Gen.json // this example is just showing the usage of "ServerlessRuntimes_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/samples/Generated/Samples/Sample_InformaticaServerlessRuntimeResource.cs b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/samples/Generated/Samples/Sample_InformaticaServerlessRuntimeResource.cs index 12b99015caf2..157227c28a3c 100644 --- a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/samples/Generated/Samples/Sample_InformaticaServerlessRuntimeResource.cs +++ b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/samples/Generated/Samples/Sample_InformaticaServerlessRuntimeResource.cs @@ -20,7 +20,7 @@ public partial class Sample_InformaticaServerlessRuntimeResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ServerlessRuntimesGet() { - // Generated from example definition: specification/informatica/resource-manager/Informatica.DataManagement/stable/2024-05-08/examples/ServerlessRuntimes_Get_MaximumSet_Gen.json + // Generated from example definition: 2024-05-08/ServerlessRuntimes_Get_MaximumSet_Gen.json // this example is just showing the usage of "ServerlessRuntimes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +52,7 @@ public async Task Get_ServerlessRuntimesGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ServerlessRuntimesGetMin() { - // Generated from example definition: specification/informatica/resource-manager/Informatica.DataManagement/stable/2024-05-08/examples/ServerlessRuntimes_Get_MinimumSet_Gen.json + // Generated from example definition: 2024-05-08/ServerlessRuntimes_Get_MinimumSet_Gen.json // this example is just showing the usage of "ServerlessRuntimes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -79,12 +79,40 @@ public async Task Get_ServerlessRuntimesGetMin() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } + // ServerlessRuntimes_Delete + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_ServerlessRuntimesDelete() + { + // Generated from example definition: 2024-05-08/ServerlessRuntimes_Delete_MaximumSet_Gen.json + // this example is just showing the usage of "ServerlessRuntimes_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this InformaticaServerlessRuntimeResource created on azure + // for more information of creating InformaticaServerlessRuntimeResource, please refer to the document of InformaticaServerlessRuntimeResource + string subscriptionId = "3599DA28-E346-4D9F-811E-189C0445F0FE"; + string resourceGroupName = "rgopenapi"; + string organizationName = "orgName"; + string serverlessRuntimeName = "serverlessRuntimeName"; + ResourceIdentifier informaticaServerlessRuntimeResourceId = InformaticaServerlessRuntimeResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, organizationName, serverlessRuntimeName); + InformaticaServerlessRuntimeResource informaticaServerlessRuntime = client.GetInformaticaServerlessRuntimeResource(informaticaServerlessRuntimeResourceId); + + // invoke the operation + await informaticaServerlessRuntime.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + // ServerlessRuntimes_Update [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ServerlessRuntimesUpdate() { - // Generated from example definition: specification/informatica/resource-manager/Informatica.DataManagement/stable/2024-05-08/examples/ServerlessRuntimes_Update_MaximumSet_Gen.json + // Generated from example definition: 2024-05-08/ServerlessRuntimes_Update_MaximumSet_Gen.json // this example is just showing the usage of "ServerlessRuntimes_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -169,7 +197,7 @@ public async Task Update_ServerlessRuntimesUpdate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ServerlessRuntimesUpdateMin() { - // Generated from example definition: specification/informatica/resource-manager/Informatica.DataManagement/stable/2024-05-08/examples/ServerlessRuntimes_Update_MinimumSet_Gen.json + // Generated from example definition: 2024-05-08/ServerlessRuntimes_Update_MinimumSet_Gen.json // this example is just showing the usage of "ServerlessRuntimes_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -197,40 +225,12 @@ public async Task Update_ServerlessRuntimesUpdateMin() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } - // ServerlessRuntimes_Delete - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Delete_ServerlessRuntimesDelete() - { - // Generated from example definition: specification/informatica/resource-manager/Informatica.DataManagement/stable/2024-05-08/examples/ServerlessRuntimes_Delete_MaximumSet_Gen.json - // this example is just showing the usage of "ServerlessRuntimes_Delete" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this InformaticaServerlessRuntimeResource created on azure - // for more information of creating InformaticaServerlessRuntimeResource, please refer to the document of InformaticaServerlessRuntimeResource - string subscriptionId = "3599DA28-E346-4D9F-811E-189C0445F0FE"; - string resourceGroupName = "rgopenapi"; - string organizationName = "orgName"; - string serverlessRuntimeName = "serverlessRuntimeName"; - ResourceIdentifier informaticaServerlessRuntimeResourceId = InformaticaServerlessRuntimeResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, organizationName, serverlessRuntimeName); - InformaticaServerlessRuntimeResource informaticaServerlessRuntime = client.GetInformaticaServerlessRuntimeResource(informaticaServerlessRuntimeResourceId); - - // invoke the operation - await informaticaServerlessRuntime.DeleteAsync(WaitUntil.Completed); - - Console.WriteLine($"Succeeded"); - } - // ServerlessRuntimes_CheckDependencies [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CheckDependencies_ServerlessRuntimesCheckDependencies() { - // Generated from example definition: specification/informatica/resource-manager/Informatica.DataManagement/stable/2024-05-08/examples/ServerlessRuntimes_CheckDependencies_MaximumSet_Gen.json + // Generated from example definition: 2024-05-08/ServerlessRuntimes_CheckDependencies_MaximumSet_Gen.json // this example is just showing the usage of "ServerlessRuntimes_CheckDependencies" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -258,7 +258,7 @@ public async Task CheckDependencies_ServerlessRuntimesCheckDependencies() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CheckDependencies_ServerlessRuntimesCheckDependenciesMin() { - // Generated from example definition: specification/informatica/resource-manager/Informatica.DataManagement/stable/2024-05-08/examples/ServerlessRuntimes_CheckDependencies_MinimumSet_Gen.json + // Generated from example definition: 2024-05-08/ServerlessRuntimes_CheckDependencies_MinimumSet_Gen.json // this example is just showing the usage of "ServerlessRuntimes_CheckDependencies" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -281,44 +281,12 @@ public async Task CheckDependencies_ServerlessRuntimesCheckDependenciesMin() Console.WriteLine($"Succeeded: {result}"); } - // ServerlessRuntimes_ServerlessResourceById - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetServerlessResourceById_ServerlessRuntimesServerlessResourceById() - { - // Generated from example definition: specification/informatica/resource-manager/Informatica.DataManagement/stable/2024-05-08/examples/ServerlessRuntimes_ServerlessResourceById_MaximumSet_Gen.json - // this example is just showing the usage of "ServerlessRuntimes_ServerlessResourceById" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this InformaticaServerlessRuntimeResource created on azure - // for more information of creating InformaticaServerlessRuntimeResource, please refer to the document of InformaticaServerlessRuntimeResource - string subscriptionId = "3599DA28-E346-4D9F-811E-189C0445F0FE"; - string resourceGroupName = "rgopenapi"; - string organizationName = "_RD_R"; - string serverlessRuntimeName = "serverlessRuntimeName159"; - ResourceIdentifier informaticaServerlessRuntimeResourceId = InformaticaServerlessRuntimeResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, organizationName, serverlessRuntimeName); - InformaticaServerlessRuntimeResource informaticaServerlessRuntime = client.GetInformaticaServerlessRuntimeResource(informaticaServerlessRuntimeResourceId); - - // invoke the operation - InformaticaServerlessRuntimeResource result = await informaticaServerlessRuntime.GetServerlessResourceByIdAsync(); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - InformaticaServerlessRuntimeData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - // ServerlessRuntimes_StartFailedServerlessRuntime [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task StartFailedServerlessRuntime_ServerlessRuntimesStartFailedServerlessRuntime() { - // Generated from example definition: specification/informatica/resource-manager/Informatica.DataManagement/stable/2024-05-08/examples/ServerlessRuntimes_StartFailedServerlessRuntime_MaximumSet_Gen.json + // Generated from example definition: 2024-05-08/ServerlessRuntimes_StartFailedServerlessRuntime_MaximumSet_Gen.json // this example is just showing the usage of "ServerlessRuntimes_StartFailedServerlessRuntime" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/ServerlessRuntimeNetworkProfileUpdate.cs b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/ServerlessRuntimeNetworkProfileUpdate.cs index 325de472b982..3995af9524e6 100644 --- a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/ServerlessRuntimeNetworkProfileUpdate.cs +++ b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/ServerlessRuntimeNetworkProfileUpdate.cs @@ -70,6 +70,6 @@ internal ServerlessRuntimeNetworkProfileUpdate() } /// Network Interface Configuration Profile Update. - public InformaticaNetworkInterfaceConfigurationUpdate NetworkInterfaceConfiguration { get; set; } + public InformaticaNetworkInterfaceConfigurationUpdate NetworkInterfaceConfiguration { get; } } } diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterCollection.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterCollection.cs new file mode 100644 index 000000000000..264ae8e86888 --- /dev/null +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterCollection.cs @@ -0,0 +1,302 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.MongoCluster.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.MongoCluster.Samples +{ + public partial class Sample_MongoClusterCollection + { + // Gets a Mongo Cluster resource. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetsAMongoClusterResource() + { + // Generated from example definition: 2024-07-01/MongoClusters_Get.json + // this example is just showing the usage of "MongoClusters_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; + string resourceGroupName = "TestResourceGroup"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this MongoClusterResource + MongoClusterCollection collection = resourceGroupResource.GetMongoClusters(); + + // invoke the operation + string mongoClusterName = "myMongoCluster"; + MongoClusterResource result = await collection.GetAsync(mongoClusterName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MongoClusterData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Gets a Mongo Cluster resource. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetsAMongoClusterResource() + { + // Generated from example definition: 2024-07-01/MongoClusters_Get.json + // this example is just showing the usage of "MongoClusters_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; + string resourceGroupName = "TestResourceGroup"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this MongoClusterResource + MongoClusterCollection collection = resourceGroupResource.GetMongoClusters(); + + // invoke the operation + string mongoClusterName = "myMongoCluster"; + bool result = await collection.ExistsAsync(mongoClusterName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Gets a Mongo Cluster resource. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetsAMongoClusterResource() + { + // Generated from example definition: 2024-07-01/MongoClusters_Get.json + // this example is just showing the usage of "MongoClusters_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; + string resourceGroupName = "TestResourceGroup"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this MongoClusterResource + MongoClusterCollection collection = resourceGroupResource.GetMongoClusters(); + + // invoke the operation + string mongoClusterName = "myMongoCluster"; + NullableResponse response = await collection.GetIfExistsAsync(mongoClusterName); + MongoClusterResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MongoClusterData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // Creates a new Mongo Cluster resource. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CreatesANewMongoClusterResource() + { + // Generated from example definition: 2024-07-01/MongoClusters_Create.json + // this example is just showing the usage of "MongoClusters_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; + string resourceGroupName = "TestResourceGroup"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this MongoClusterResource + MongoClusterCollection collection = resourceGroupResource.GetMongoClusters(); + + // invoke the operation + string mongoClusterName = "myMongoCluster"; + MongoClusterData data = new MongoClusterData(new AzureLocation("westus2")) + { + Properties = new MongoClusterProperties() + { + Administrator = new MongoClusterAdministratorProperties() + { + UserName = "mongoAdmin", + Password = "password", + }, + ServerVersion = "5.0", + HighAvailabilityTargetMode = HighAvailabilityMode.SameZone, + StorageSizeGb = 128, + ShardingShardCount = 1, + ComputeTier = "M30", + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, mongoClusterName, data); + MongoClusterResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MongoClusterData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Creates a replica Mongo Cluster resource from a source resource. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CreatesAReplicaMongoClusterResourceFromASourceResource() + { + // Generated from example definition: 2024-07-01/MongoClusters_CreateGeoReplica.json + // this example is just showing the usage of "MongoClusters_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; + string resourceGroupName = "TestResourceGroup"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this MongoClusterResource + MongoClusterCollection collection = resourceGroupResource.GetMongoClusters(); + + // invoke the operation + string mongoClusterName = "myReplicaMongoCluster"; + MongoClusterData data = new MongoClusterData(new AzureLocation("centralus")) + { + Properties = new MongoClusterProperties() + { + CreateMode = MongoClusterCreateMode.GeoReplica, + ReplicaParameters = new MongoClusterReplicaContent(new ResourceIdentifier("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DocumentDB/mongoClusters/mySourceMongoCluster"), new AzureLocation("eastus")), + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, mongoClusterName, data); + MongoClusterResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MongoClusterData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Creates a Mongo Cluster resource from a point in time restore + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CreatesAMongoClusterResourceFromAPointInTimeRestore() + { + // Generated from example definition: 2024-07-01/MongoClusters_CreatePITR.json + // this example is just showing the usage of "MongoClusters_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; + string resourceGroupName = "TestResourceGroup"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this MongoClusterResource + MongoClusterCollection collection = resourceGroupResource.GetMongoClusters(); + + // invoke the operation + string mongoClusterName = "myMongoCluster"; + MongoClusterData data = new MongoClusterData(new AzureLocation("westus2")) + { + Properties = new MongoClusterProperties() + { + CreateMode = MongoClusterCreateMode.PointInTimeRestore, + RestoreParameters = new MongoClusterRestoreContent() + { + PointInTimeUTC = DateTimeOffset.Parse("2023-01-13T20:07:35Z"), + SourceResourceId = new ResourceIdentifier("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DocumentDB/mongoClusters/myOtherMongoCluster"), + }, + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, mongoClusterName, data); + MongoClusterResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MongoClusterData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Lists the Mongo Cluster resources in a resource group. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ListsTheMongoClusterResourcesInAResourceGroup() + { + // Generated from example definition: 2024-07-01/MongoClusters_ListByResourceGroup.json + // this example is just showing the usage of "MongoCluster_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; + string resourceGroupName = "TestResourceGroup"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this MongoClusterResource + MongoClusterCollection collection = resourceGroupResource.GetMongoClusters(); + + // invoke the operation and iterate over the result + await foreach (MongoClusterResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MongoClusterData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterFirewallRuleCollection.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterFirewallRuleCollection.cs new file mode 100644 index 000000000000..e76fbd764a50 --- /dev/null +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterFirewallRuleCollection.cs @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.MongoCluster.Models; + +namespace Azure.ResourceManager.MongoCluster.Samples +{ + public partial class Sample_MongoClusterFirewallRuleCollection + { + // Gets a firewall rule on a Mongo Cluster resource. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetsAFirewallRuleOnAMongoClusterResource() + { + // Generated from example definition: 2024-07-01/MongoClusters_FirewallRuleGet.json + // this example is just showing the usage of "FirewallRules_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MongoClusterResource created on azure + // for more information of creating MongoClusterResource, please refer to the document of MongoClusterResource + string subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; + string resourceGroupName = "TestGroup"; + string mongoClusterName = "myMongoCluster"; + ResourceIdentifier mongoClusterResourceId = MongoClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, mongoClusterName); + MongoClusterResource mongoCluster = client.GetMongoClusterResource(mongoClusterResourceId); + + // get the collection of this MongoClusterFirewallRuleResource + MongoClusterFirewallRuleCollection collection = mongoCluster.GetMongoClusterFirewallRules(); + + // invoke the operation + string firewallRuleName = "rule1"; + MongoClusterFirewallRuleResource result = await collection.GetAsync(firewallRuleName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MongoClusterFirewallRuleData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Gets a firewall rule on a Mongo Cluster resource. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetsAFirewallRuleOnAMongoClusterResource() + { + // Generated from example definition: 2024-07-01/MongoClusters_FirewallRuleGet.json + // this example is just showing the usage of "FirewallRules_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MongoClusterResource created on azure + // for more information of creating MongoClusterResource, please refer to the document of MongoClusterResource + string subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; + string resourceGroupName = "TestGroup"; + string mongoClusterName = "myMongoCluster"; + ResourceIdentifier mongoClusterResourceId = MongoClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, mongoClusterName); + MongoClusterResource mongoCluster = client.GetMongoClusterResource(mongoClusterResourceId); + + // get the collection of this MongoClusterFirewallRuleResource + MongoClusterFirewallRuleCollection collection = mongoCluster.GetMongoClusterFirewallRules(); + + // invoke the operation + string firewallRuleName = "rule1"; + bool result = await collection.ExistsAsync(firewallRuleName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Gets a firewall rule on a Mongo Cluster resource. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetsAFirewallRuleOnAMongoClusterResource() + { + // Generated from example definition: 2024-07-01/MongoClusters_FirewallRuleGet.json + // this example is just showing the usage of "FirewallRules_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MongoClusterResource created on azure + // for more information of creating MongoClusterResource, please refer to the document of MongoClusterResource + string subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; + string resourceGroupName = "TestGroup"; + string mongoClusterName = "myMongoCluster"; + ResourceIdentifier mongoClusterResourceId = MongoClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, mongoClusterName); + MongoClusterResource mongoCluster = client.GetMongoClusterResource(mongoClusterResourceId); + + // get the collection of this MongoClusterFirewallRuleResource + MongoClusterFirewallRuleCollection collection = mongoCluster.GetMongoClusterFirewallRules(); + + // invoke the operation + string firewallRuleName = "rule1"; + NullableResponse response = await collection.GetIfExistsAsync(firewallRuleName); + MongoClusterFirewallRuleResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MongoClusterFirewallRuleData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // Creates a firewall rule on a Mongo Cluster resource. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CreatesAFirewallRuleOnAMongoClusterResource() + { + // Generated from example definition: 2024-07-01/MongoClusters_FirewallRuleCreate.json + // this example is just showing the usage of "FirewallRules_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MongoClusterResource created on azure + // for more information of creating MongoClusterResource, please refer to the document of MongoClusterResource + string subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; + string resourceGroupName = "TestGroup"; + string mongoClusterName = "myMongoCluster"; + ResourceIdentifier mongoClusterResourceId = MongoClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, mongoClusterName); + MongoClusterResource mongoCluster = client.GetMongoClusterResource(mongoClusterResourceId); + + // get the collection of this MongoClusterFirewallRuleResource + MongoClusterFirewallRuleCollection collection = mongoCluster.GetMongoClusterFirewallRules(); + + // invoke the operation + string firewallRuleName = "rule1"; + MongoClusterFirewallRuleData data = new MongoClusterFirewallRuleData() + { + Properties = new MongoClusterFirewallRuleProperties("0.0.0.0", "255.255.255.255"), + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, firewallRuleName, data); + MongoClusterFirewallRuleResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MongoClusterFirewallRuleData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // List the firewall rules on a Mongo Cluster resource. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ListTheFirewallRulesOnAMongoClusterResource() + { + // Generated from example definition: 2024-07-01/MongoClusters_FirewallRuleList.json + // this example is just showing the usage of "FirewallRule_ListByMongoCluster" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MongoClusterResource created on azure + // for more information of creating MongoClusterResource, please refer to the document of MongoClusterResource + string subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; + string resourceGroupName = "TestGroup"; + string mongoClusterName = "myMongoCluster"; + ResourceIdentifier mongoClusterResourceId = MongoClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, mongoClusterName); + MongoClusterResource mongoCluster = client.GetMongoClusterResource(mongoClusterResourceId); + + // get the collection of this MongoClusterFirewallRuleResource + MongoClusterFirewallRuleCollection collection = mongoCluster.GetMongoClusterFirewallRules(); + + // invoke the operation and iterate over the result + await foreach (MongoClusterFirewallRuleResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MongoClusterFirewallRuleData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterFirewallRuleResource.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterFirewallRuleResource.cs new file mode 100644 index 000000000000..0e716698e305 --- /dev/null +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterFirewallRuleResource.cs @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.MongoCluster.Models; + +namespace Azure.ResourceManager.MongoCluster.Samples +{ + public partial class Sample_MongoClusterFirewallRuleResource + { + // Gets a firewall rule on a Mongo Cluster resource. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetsAFirewallRuleOnAMongoClusterResource() + { + // Generated from example definition: 2024-07-01/MongoClusters_FirewallRuleGet.json + // this example is just showing the usage of "FirewallRules_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MongoClusterFirewallRuleResource created on azure + // for more information of creating MongoClusterFirewallRuleResource, please refer to the document of MongoClusterFirewallRuleResource + string subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; + string resourceGroupName = "TestGroup"; + string mongoClusterName = "myMongoCluster"; + string firewallRuleName = "rule1"; + ResourceIdentifier mongoClusterFirewallRuleResourceId = MongoClusterFirewallRuleResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, mongoClusterName, firewallRuleName); + MongoClusterFirewallRuleResource mongoClusterFirewallRule = client.GetMongoClusterFirewallRuleResource(mongoClusterFirewallRuleResourceId); + + // invoke the operation + MongoClusterFirewallRuleResource result = await mongoClusterFirewallRule.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MongoClusterFirewallRuleData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Creates a firewall rule on a Mongo Cluster resource. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_CreatesAFirewallRuleOnAMongoClusterResource() + { + // Generated from example definition: 2024-07-01/MongoClusters_FirewallRuleCreate.json + // this example is just showing the usage of "FirewallRules_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MongoClusterFirewallRuleResource created on azure + // for more information of creating MongoClusterFirewallRuleResource, please refer to the document of MongoClusterFirewallRuleResource + string subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; + string resourceGroupName = "TestGroup"; + string mongoClusterName = "myMongoCluster"; + string firewallRuleName = "rule1"; + ResourceIdentifier mongoClusterFirewallRuleResourceId = MongoClusterFirewallRuleResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, mongoClusterName, firewallRuleName); + MongoClusterFirewallRuleResource mongoClusterFirewallRule = client.GetMongoClusterFirewallRuleResource(mongoClusterFirewallRuleResourceId); + + // invoke the operation + MongoClusterFirewallRuleData data = new MongoClusterFirewallRuleData() + { + Properties = new MongoClusterFirewallRuleProperties("0.0.0.0", "255.255.255.255"), + }; + ArmOperation lro = await mongoClusterFirewallRule.UpdateAsync(WaitUntil.Completed, data); + MongoClusterFirewallRuleResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MongoClusterFirewallRuleData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Deletes a firewall rule on a Mongo Cluster resource. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_DeletesAFirewallRuleOnAMongoClusterResource() + { + // Generated from example definition: 2024-07-01/MongoClusters_FirewallRuleDelete.json + // this example is just showing the usage of "FirewallRules_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MongoClusterFirewallRuleResource created on azure + // for more information of creating MongoClusterFirewallRuleResource, please refer to the document of MongoClusterFirewallRuleResource + string subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; + string resourceGroupName = "TestGroup"; + string mongoClusterName = "myMongoCluster"; + string firewallRuleName = "rule1"; + ResourceIdentifier mongoClusterFirewallRuleResourceId = MongoClusterFirewallRuleResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, mongoClusterName, firewallRuleName); + MongoClusterFirewallRuleResource mongoClusterFirewallRule = client.GetMongoClusterFirewallRuleResource(mongoClusterFirewallRuleResourceId); + + // invoke the operation + await mongoClusterFirewallRule.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterPrivateEndpointConnectionResource.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterPrivateEndpointConnectionResource.cs new file mode 100644 index 000000000000..cb60df02f130 --- /dev/null +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterPrivateEndpointConnectionResource.cs @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.MongoCluster.Models; + +namespace Azure.ResourceManager.MongoCluster.Samples +{ + public partial class Sample_MongoClusterPrivateEndpointConnectionResource + { + // Get a private endpoint connection on a Mongo Cluster resource. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetAPrivateEndpointConnectionOnAMongoClusterResource() + { + // Generated from example definition: 2024-07-01/MongoClusters_PrivateEndpointConnectionGet.json + // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MongoClusterPrivateEndpointConnectionResource created on azure + // for more information of creating MongoClusterPrivateEndpointConnectionResource, please refer to the document of MongoClusterPrivateEndpointConnectionResource + string subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; + string resourceGroupName = "TestGroup"; + string mongoClusterName = "myMongoCluster"; + string privateEndpointConnectionName = "pecTest.5d393f64-ef64-46d0-9959-308321c44ac0"; + ResourceIdentifier mongoClusterPrivateEndpointConnectionResourceId = MongoClusterPrivateEndpointConnectionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, mongoClusterName, privateEndpointConnectionName); + MongoClusterPrivateEndpointConnectionResource mongoClusterPrivateEndpointConnectionResource = client.GetMongoClusterPrivateEndpointConnectionResource(mongoClusterPrivateEndpointConnectionResourceId); + + // invoke the operation + MongoClusterPrivateEndpointConnectionResource result = await mongoClusterPrivateEndpointConnectionResource.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MongoClusterPrivateEndpointConnectionResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Approves a private endpoint connection on a Mongo Cluster resource. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_ApprovesAPrivateEndpointConnectionOnAMongoClusterResource() + { + // Generated from example definition: 2024-07-01/MongoClusters_PrivateEndpointConnectionPut.json + // this example is just showing the usage of "PrivateEndpointConnections_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MongoClusterPrivateEndpointConnectionResource created on azure + // for more information of creating MongoClusterPrivateEndpointConnectionResource, please refer to the document of MongoClusterPrivateEndpointConnectionResource + string subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; + string resourceGroupName = "TestGroup"; + string mongoClusterName = "myMongoCluster"; + string privateEndpointConnectionName = "pecTest"; + ResourceIdentifier mongoClusterPrivateEndpointConnectionResourceId = MongoClusterPrivateEndpointConnectionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, mongoClusterName, privateEndpointConnectionName); + MongoClusterPrivateEndpointConnectionResource mongoClusterPrivateEndpointConnectionResource = client.GetMongoClusterPrivateEndpointConnectionResource(mongoClusterPrivateEndpointConnectionResourceId); + + // invoke the operation + MongoClusterPrivateEndpointConnectionResourceData data = new MongoClusterPrivateEndpointConnectionResourceData() + { + Properties = new MongoClusterPrivateEndpointConnectionProperties(new MongoClusterPrivateLinkServiceConnectionState() + { + Status = MongoClusterPrivateEndpointServiceConnectionStatus.Approved, + Description = "Auto-Approved", + }), + }; + ArmOperation lro = await mongoClusterPrivateEndpointConnectionResource.UpdateAsync(WaitUntil.Completed, data); + MongoClusterPrivateEndpointConnectionResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MongoClusterPrivateEndpointConnectionResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Delete a private endpoint connection on a Mongo Cluster resource. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_DeleteAPrivateEndpointConnectionOnAMongoClusterResource() + { + // Generated from example definition: 2024-07-01/MongoClusters_PrivateEndpointConnectionDelete.json + // this example is just showing the usage of "PrivateEndpointConnections_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MongoClusterPrivateEndpointConnectionResource created on azure + // for more information of creating MongoClusterPrivateEndpointConnectionResource, please refer to the document of MongoClusterPrivateEndpointConnectionResource + string subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; + string resourceGroupName = "TestGroup"; + string mongoClusterName = "myMongoCluster"; + string privateEndpointConnectionName = "pecTest.5d393f64-ef64-46d0-9959-308321c44ac0"; + ResourceIdentifier mongoClusterPrivateEndpointConnectionResourceId = MongoClusterPrivateEndpointConnectionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, mongoClusterName, privateEndpointConnectionName); + MongoClusterPrivateEndpointConnectionResource mongoClusterPrivateEndpointConnectionResource = client.GetMongoClusterPrivateEndpointConnectionResource(mongoClusterPrivateEndpointConnectionResourceId); + + // invoke the operation + await mongoClusterPrivateEndpointConnectionResource.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterPrivateEndpointConnectionResourceCollection.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterPrivateEndpointConnectionResourceCollection.cs new file mode 100644 index 000000000000..f1c05efff021 --- /dev/null +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterPrivateEndpointConnectionResourceCollection.cs @@ -0,0 +1,208 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.MongoCluster.Models; + +namespace Azure.ResourceManager.MongoCluster.Samples +{ + public partial class Sample_MongoClusterPrivateEndpointConnectionResourceCollection + { + // Lists the private endpoint connection resources on a Mongo Cluster resource. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ListsThePrivateEndpointConnectionResourcesOnAMongoClusterResource() + { + // Generated from example definition: 2024-07-01/MongoClusters_PrivateEndpointConnectionList.json + // this example is just showing the usage of "PrivateEndpointConnectionResource_ListByMongoCluster" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MongoClusterResource created on azure + // for more information of creating MongoClusterResource, please refer to the document of MongoClusterResource + string subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; + string resourceGroupName = "TestGroup"; + string mongoClusterName = "myMongoCluster"; + ResourceIdentifier mongoClusterResourceId = MongoClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, mongoClusterName); + MongoClusterResource mongoCluster = client.GetMongoClusterResource(mongoClusterResourceId); + + // get the collection of this MongoClusterPrivateEndpointConnectionResource + MongoClusterPrivateEndpointConnectionResourceCollection collection = mongoCluster.GetMongoClusterPrivateEndpointConnectionResources(); + + // invoke the operation and iterate over the result + await foreach (MongoClusterPrivateEndpointConnectionResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MongoClusterPrivateEndpointConnectionResourceData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get a private endpoint connection on a Mongo Cluster resource. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetAPrivateEndpointConnectionOnAMongoClusterResource() + { + // Generated from example definition: 2024-07-01/MongoClusters_PrivateEndpointConnectionGet.json + // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MongoClusterResource created on azure + // for more information of creating MongoClusterResource, please refer to the document of MongoClusterResource + string subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; + string resourceGroupName = "TestGroup"; + string mongoClusterName = "myMongoCluster"; + ResourceIdentifier mongoClusterResourceId = MongoClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, mongoClusterName); + MongoClusterResource mongoCluster = client.GetMongoClusterResource(mongoClusterResourceId); + + // get the collection of this MongoClusterPrivateEndpointConnectionResource + MongoClusterPrivateEndpointConnectionResourceCollection collection = mongoCluster.GetMongoClusterPrivateEndpointConnectionResources(); + + // invoke the operation + string privateEndpointConnectionName = "pecTest.5d393f64-ef64-46d0-9959-308321c44ac0"; + MongoClusterPrivateEndpointConnectionResource result = await collection.GetAsync(privateEndpointConnectionName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MongoClusterPrivateEndpointConnectionResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get a private endpoint connection on a Mongo Cluster resource. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetAPrivateEndpointConnectionOnAMongoClusterResource() + { + // Generated from example definition: 2024-07-01/MongoClusters_PrivateEndpointConnectionGet.json + // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MongoClusterResource created on azure + // for more information of creating MongoClusterResource, please refer to the document of MongoClusterResource + string subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; + string resourceGroupName = "TestGroup"; + string mongoClusterName = "myMongoCluster"; + ResourceIdentifier mongoClusterResourceId = MongoClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, mongoClusterName); + MongoClusterResource mongoCluster = client.GetMongoClusterResource(mongoClusterResourceId); + + // get the collection of this MongoClusterPrivateEndpointConnectionResource + MongoClusterPrivateEndpointConnectionResourceCollection collection = mongoCluster.GetMongoClusterPrivateEndpointConnectionResources(); + + // invoke the operation + string privateEndpointConnectionName = "pecTest.5d393f64-ef64-46d0-9959-308321c44ac0"; + bool result = await collection.ExistsAsync(privateEndpointConnectionName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Get a private endpoint connection on a Mongo Cluster resource. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetAPrivateEndpointConnectionOnAMongoClusterResource() + { + // Generated from example definition: 2024-07-01/MongoClusters_PrivateEndpointConnectionGet.json + // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MongoClusterResource created on azure + // for more information of creating MongoClusterResource, please refer to the document of MongoClusterResource + string subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; + string resourceGroupName = "TestGroup"; + string mongoClusterName = "myMongoCluster"; + ResourceIdentifier mongoClusterResourceId = MongoClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, mongoClusterName); + MongoClusterResource mongoCluster = client.GetMongoClusterResource(mongoClusterResourceId); + + // get the collection of this MongoClusterPrivateEndpointConnectionResource + MongoClusterPrivateEndpointConnectionResourceCollection collection = mongoCluster.GetMongoClusterPrivateEndpointConnectionResources(); + + // invoke the operation + string privateEndpointConnectionName = "pecTest.5d393f64-ef64-46d0-9959-308321c44ac0"; + NullableResponse response = await collection.GetIfExistsAsync(privateEndpointConnectionName); + MongoClusterPrivateEndpointConnectionResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MongoClusterPrivateEndpointConnectionResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // Approves a private endpoint connection on a Mongo Cluster resource. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_ApprovesAPrivateEndpointConnectionOnAMongoClusterResource() + { + // Generated from example definition: 2024-07-01/MongoClusters_PrivateEndpointConnectionPut.json + // this example is just showing the usage of "PrivateEndpointConnections_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MongoClusterResource created on azure + // for more information of creating MongoClusterResource, please refer to the document of MongoClusterResource + string subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; + string resourceGroupName = "TestGroup"; + string mongoClusterName = "myMongoCluster"; + ResourceIdentifier mongoClusterResourceId = MongoClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, mongoClusterName); + MongoClusterResource mongoCluster = client.GetMongoClusterResource(mongoClusterResourceId); + + // get the collection of this MongoClusterPrivateEndpointConnectionResource + MongoClusterPrivateEndpointConnectionResourceCollection collection = mongoCluster.GetMongoClusterPrivateEndpointConnectionResources(); + + // invoke the operation + string privateEndpointConnectionName = "pecTest"; + MongoClusterPrivateEndpointConnectionResourceData data = new MongoClusterPrivateEndpointConnectionResourceData() + { + Properties = new MongoClusterPrivateEndpointConnectionProperties(new MongoClusterPrivateLinkServiceConnectionState() + { + Status = MongoClusterPrivateEndpointServiceConnectionStatus.Approved, + Description = "Auto-Approved", + }), + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, privateEndpointConnectionName, data); + MongoClusterPrivateEndpointConnectionResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MongoClusterPrivateEndpointConnectionResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterResource.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterResource.cs new file mode 100644 index 000000000000..710fb1db676c --- /dev/null +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterResource.cs @@ -0,0 +1,399 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.MongoCluster.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.MongoCluster.Samples +{ + public partial class Sample_MongoClusterResource + { + // Gets a Mongo Cluster resource. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetsAMongoClusterResource() + { + // Generated from example definition: 2024-07-01/MongoClusters_Get.json + // this example is just showing the usage of "MongoClusters_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MongoClusterResource created on azure + // for more information of creating MongoClusterResource, please refer to the document of MongoClusterResource + string subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; + string resourceGroupName = "TestResourceGroup"; + string mongoClusterName = "myMongoCluster"; + ResourceIdentifier mongoClusterResourceId = MongoClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, mongoClusterName); + MongoClusterResource mongoCluster = client.GetMongoClusterResource(mongoClusterResourceId); + + // invoke the operation + MongoClusterResource result = await mongoCluster.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MongoClusterData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Updates the disk size on a Mongo Cluster resource. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_UpdatesTheDiskSizeOnAMongoClusterResource() + { + // Generated from example definition: 2024-07-01/MongoClusters_PatchDiskSize.json + // this example is just showing the usage of "MongoClusters_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MongoClusterResource created on azure + // for more information of creating MongoClusterResource, please refer to the document of MongoClusterResource + string subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; + string resourceGroupName = "TestResourceGroup"; + string mongoClusterName = "myMongoCluster"; + ResourceIdentifier mongoClusterResourceId = MongoClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, mongoClusterName); + MongoClusterResource mongoCluster = client.GetMongoClusterResource(mongoClusterResourceId); + + // invoke the operation + MongoClusterPatch patch = new MongoClusterPatch() + { + Properties = new MongoClusterUpdateProperties() + { + StorageSizeGb = 256, + }, + }; + ArmOperation lro = await mongoCluster.UpdateAsync(WaitUntil.Completed, patch); + MongoClusterResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MongoClusterData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Disables public network access on a Mongo Cluster resource with a private endpoint connection. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_DisablesPublicNetworkAccessOnAMongoClusterResourceWithAPrivateEndpointConnection() + { + // Generated from example definition: 2024-07-01/MongoClusters_PatchPrivateNetworkAccess.json + // this example is just showing the usage of "MongoClusters_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MongoClusterResource created on azure + // for more information of creating MongoClusterResource, please refer to the document of MongoClusterResource + string subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; + string resourceGroupName = "TestResourceGroup"; + string mongoClusterName = "myMongoCluster"; + ResourceIdentifier mongoClusterResourceId = MongoClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, mongoClusterName); + MongoClusterResource mongoCluster = client.GetMongoClusterResource(mongoClusterResourceId); + + // invoke the operation + MongoClusterPatch patch = new MongoClusterPatch() + { + Properties = new MongoClusterUpdateProperties() + { + PublicNetworkAccess = MongoClusterPublicNetworkAccess.Disabled, + }, + }; + ArmOperation lro = await mongoCluster.UpdateAsync(WaitUntil.Completed, patch); + MongoClusterResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MongoClusterData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Resets the administrator login password. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_ResetsTheAdministratorLoginPassword() + { + // Generated from example definition: 2024-07-01/MongoClusters_ResetPassword.json + // this example is just showing the usage of "MongoClusters_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MongoClusterResource created on azure + // for more information of creating MongoClusterResource, please refer to the document of MongoClusterResource + string subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; + string resourceGroupName = "TestResourceGroup"; + string mongoClusterName = "myMongoCluster"; + ResourceIdentifier mongoClusterResourceId = MongoClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, mongoClusterName); + MongoClusterResource mongoCluster = client.GetMongoClusterResource(mongoClusterResourceId); + + // invoke the operation + MongoClusterPatch patch = new MongoClusterPatch() + { + Properties = new MongoClusterUpdateProperties() + { + Administrator = new MongoClusterAdministratorProperties() + { + UserName = "mongoAdmin", + Password = "password", + }, + }, + }; + ArmOperation lro = await mongoCluster.UpdateAsync(WaitUntil.Completed, patch); + MongoClusterResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MongoClusterData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Updates a Mongo Cluster resource + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_UpdatesAMongoClusterResource() + { + // Generated from example definition: 2024-07-01/MongoClusters_Update.json + // this example is just showing the usage of "MongoClusters_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MongoClusterResource created on azure + // for more information of creating MongoClusterResource, please refer to the document of MongoClusterResource + string subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; + string resourceGroupName = "TestResourceGroup"; + string mongoClusterName = "myMongoCluster"; + ResourceIdentifier mongoClusterResourceId = MongoClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, mongoClusterName); + MongoClusterResource mongoCluster = client.GetMongoClusterResource(mongoClusterResourceId); + + // invoke the operation + MongoClusterPatch patch = new MongoClusterPatch() + { + Properties = new MongoClusterUpdateProperties() + { + Administrator = new MongoClusterAdministratorProperties() + { + UserName = "mongoAdmin", + }, + ServerVersion = "5.0", + PublicNetworkAccess = MongoClusterPublicNetworkAccess.Enabled, + HighAvailabilityTargetMode = HighAvailabilityMode.SameZone, + StorageSizeGb = 256, + ShardingShardCount = 4, + ComputeTier = "M50", + PreviewFeatures = +{ +}, + }, + }; + ArmOperation lro = await mongoCluster.UpdateAsync(WaitUntil.Completed, patch); + MongoClusterResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MongoClusterData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Deletes a Mongo Cluster resource. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_DeletesAMongoClusterResource() + { + // Generated from example definition: 2024-07-01/MongoClusters_Delete.json + // this example is just showing the usage of "MongoClusters_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MongoClusterResource created on azure + // for more information of creating MongoClusterResource, please refer to the document of MongoClusterResource + string subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; + string resourceGroupName = "TestResourceGroup"; + string mongoClusterName = "myMongoCluster"; + ResourceIdentifier mongoClusterResourceId = MongoClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, mongoClusterName); + MongoClusterResource mongoCluster = client.GetMongoClusterResource(mongoClusterResourceId); + + // invoke the operation + await mongoCluster.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + + // Lists the Mongo Cluster resources in a subscription. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetMongoClusters_ListsTheMongoClusterResourcesInASubscription() + { + // Generated from example definition: 2024-07-01/MongoClusters_List.json + // this example is just showing the usage of "MongoCluster_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + await foreach (MongoClusterResource item in subscriptionResource.GetMongoClustersAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MongoClusterData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // List the available connection strings for the Mongo Cluster resource. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetConnectionStrings_ListTheAvailableConnectionStringsForTheMongoClusterResource() + { + // Generated from example definition: 2024-07-01/MongoClusters_ListConnectionStrings.json + // this example is just showing the usage of "MongoClusters_ListConnectionStrings" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MongoClusterResource created on azure + // for more information of creating MongoClusterResource, please refer to the document of MongoClusterResource + string subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; + string resourceGroupName = "TestGroup"; + string mongoClusterName = "myMongoCluster"; + ResourceIdentifier mongoClusterResourceId = MongoClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, mongoClusterName); + MongoClusterResource mongoCluster = client.GetMongoClusterResource(mongoClusterResourceId); + + // invoke the operation + MongoClusterConnectionStringsResult result = await mongoCluster.GetConnectionStringsAsync(); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Promotes a replica Mongo Cluster resource to a primary role. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Promote_PromotesAReplicaMongoClusterResourceToAPrimaryRole() + { + // Generated from example definition: 2024-07-01/MongoClusters_ForcePromoteReplica.json + // this example is just showing the usage of "MongoClusters_Promote" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MongoClusterResource created on azure + // for more information of creating MongoClusterResource, please refer to the document of MongoClusterResource + string subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; + string resourceGroupName = "TestGroup"; + string mongoClusterName = "myMongoCluster"; + ResourceIdentifier mongoClusterResourceId = MongoClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, mongoClusterName); + MongoClusterResource mongoCluster = client.GetMongoClusterResource(mongoClusterResourceId); + + // invoke the operation + PromoteReplicaContent content = new PromoteReplicaContent(MongoClusterPromoteOption.Forced) + { + Mode = MongoClusterPromoteMode.Switchover, + }; + await mongoCluster.PromoteAsync(WaitUntil.Completed, content); + + Console.WriteLine($"Succeeded"); + } + + // Lists the private link resources available on a Mongo Cluster resource. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetPrivateLinks_ListsThePrivateLinkResourcesAvailableOnAMongoClusterResource() + { + // Generated from example definition: 2024-07-01/MongoClusters_PrivateLinkResourceList.json + // this example is just showing the usage of "PrivateLinkResource_ListByMongoCluster" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MongoClusterResource created on azure + // for more information of creating MongoClusterResource, please refer to the document of MongoClusterResource + string subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; + string resourceGroupName = "TestGroup"; + string mongoClusterName = "myMongoCluster"; + ResourceIdentifier mongoClusterResourceId = MongoClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, mongoClusterName); + MongoClusterResource mongoCluster = client.GetMongoClusterResource(mongoClusterResourceId); + + // invoke the operation and iterate over the result + await foreach (MongoClusterPrivateLinkResourceData item in mongoCluster.GetPrivateLinksAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine($"Succeeded"); + } + + // List the replicas linked to a Mongo Cluster resource. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetReplicasByParent_ListTheReplicasLinkedToAMongoClusterResource() + { + // Generated from example definition: 2024-07-01/MongoClusters_ReplicaList.json + // this example is just showing the usage of "Replica_ListByParent" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MongoClusterResource created on azure + // for more information of creating MongoClusterResource, please refer to the document of MongoClusterResource + string subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; + string resourceGroupName = "TestGroup"; + string mongoClusterName = "myMongoCluster"; + ResourceIdentifier mongoClusterResourceId = MongoClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, mongoClusterName); + MongoClusterResource mongoCluster = client.GetMongoClusterResource(mongoClusterResourceId); + + // invoke the operation and iterate over the result + await foreach (MongoClusterReplica item in mongoCluster.GetReplicasByParentAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/Discovery.xml b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/Discovery.xml index 2cf3d5de9374..8cbbe9c8d7be 100644 --- a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/Discovery.xml +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/Discovery.xml @@ -5,328 +5,4551 @@ This sample shows how to call QueryAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); -QueryConfig body = new QueryConfig(); +QueryConfig body = new QueryConfig +{ + Keywords = "exampledata", + Limit = 10, + Orderby = {BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "4606", + ["name"] = "ASC" + }), BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "4608", + ["updateTime"] = "DESC" + })}, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "4600", + ["and"] = new object[] + { + new Dictionary + { + ["$id"] = "4601", + ["objectType"] = "Files" + }, + new Dictionary + { + ["$id"] = "4602", + ["entityType"] = "azure_blob_path" + } + } + }), + Facets = {new SearchFacetItem + { + Count = 0, + Facet = "assetType", + Sort = new SearchFacetSort + { + Count = SearchSortOrder.Descend, + }, + }, new SearchFacetItem + { + Count = 10, + Facet = "classification", + Sort = new SearchFacetSort + { + Count = SearchSortOrder.Descend, + }, + }, new SearchFacetItem + { + Count = 10, + Facet = "contactId", + Sort = new SearchFacetSort + { + Count = SearchSortOrder.Descend, + }, + }, new SearchFacetItem + { + Count = 10, + Facet = "label", + Sort = new SearchFacetSort + { + Count = SearchSortOrder.Descend, + }, + }, new SearchFacetItem + { + Count = 10, + Facet = "term", + Sort = new SearchFacetSort + { + Count = SearchSortOrder.Descend, + }, + }}, +}; +Response response = await client.QueryAsync(body); +]]> +This sample shows how to call QueryAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +QueryConfig body = new QueryConfig +{ + Limit = 10, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "4685", + ["and"] = new object[] + { + new Dictionary + { + ["$id"] = "4686", + ["entityType"] = "azure_blob_path" + }, + new Dictionary + { + ["$id"] = "4687", + ["attributeName"] = "qualifiedName", + ["operator"] = "contains", + ["attributeValue"] = ".csv" + } + } + }), +}; +Response response = await client.QueryAsync(body); +]]> +This sample shows how to call QueryAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +QueryConfig body = new QueryConfig +{ + Limit = 10, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "4738", + ["and"] = new object[] + { + new Dictionary + { + ["$id"] = "4739", + ["entityType"] = "azure_blob_path" + }, + new Dictionary + { + ["$id"] = "4740", + ["attributeName"] = "qualifiedName", + ["operator"] = "contains", + ["attributeValue"] = ".csv" + }, + new Dictionary + { + ["$id"] = "4741", + ["or"] = new object[] + { + new Dictionary + { + ["$id"] = "4742", + ["attributeName"] = "name", + ["operator"] = "eq", + ["attributeValue"] = "exampledata.csv" + }, + new Dictionary + { + ["$id"] = "4743", + ["attributeName"] = "qualifiedName", + ["operator"] = "prefix", + ["attributeValue"] = "https://" + } + } + } + } + }), +}; +Response response = await client.QueryAsync(body); +]]> +This sample shows how to call QueryAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +QueryConfig body = new QueryConfig +{ + Limit = 10, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "4796", + ["or"] = new object[] + { + new Dictionary + { + ["$id"] = "4797", + ["assetType"] = "SQL Server" + }, + new Dictionary + { + ["$id"] = "4798", + ["assetType"] = "Azure SQL Server" + }, + new Dictionary + { + ["$id"] = "4799", + ["assetType"] = "Azure SQL Database" + }, + new Dictionary + { + ["$id"] = "4800", + ["assetType"] = "Azure SQL Data Warehouse" + }, + new Dictionary + { + ["$id"] = "4801", + ["assetType"] = "Azure SQL Managed Instance" + }, + new Dictionary + { + ["$id"] = "4802", + ["assetType"] = "Azure Storage Account" + }, + new Dictionary + { + ["$id"] = "4803", + ["assetType"] = "Azure Blob Storage" + }, + new Dictionary + { + ["$id"] = "4804", + ["assetType"] = "Azure Files" + }, + new Dictionary + { + ["$id"] = "4805", + ["assetType"] = "Azure Table Storage" + }, + new Dictionary + { + ["$id"] = "4806", + ["assetType"] = "Azure Data Lake Storage Gen1" + }, + new Dictionary + { + ["$id"] = "4807", + ["assetType"] = "Azure Data Lake Storage Gen2" + }, + new Dictionary + { + ["$id"] = "4808", + ["assetType"] = "Azure Cosmos DB" + }, + new Dictionary + { + ["$id"] = "4809", + ["assetType"] = "Azure Data Factory" + }, + new Dictionary + { + ["$id"] = "4810", + ["assetType"] = "Azure Cognitive Search" + }, + new Dictionary + { + ["$id"] = "4811", + ["assetType"] = "Power BI" + }, + new Dictionary + { + ["$id"] = "4812", + ["assetType"] = "Azure Data Explorer" + }, + new Dictionary + { + ["$id"] = "4813", + ["assetType"] = "Amazon S3" + }, + new Dictionary + { + ["$id"] = "4814", + ["assetType"] = "Azure Data Share" + }, + new Dictionary + { + ["$id"] = "4815", + ["assetType"] = "Teradata" + }, + new Dictionary + { + ["$id"] = "4816", + ["assetType"] = "SAP S4HANA" + }, + new Dictionary + { + ["$id"] = "4817", + ["assetType"] = "SAP ECC" + }, + new Dictionary + { + ["$id"] = "4818", + ["assetType"] = "SQL Server Integration Services" + }, + new Dictionary + { + ["$id"] = "4819", + ["assetType"] = "hive" + }, + new Dictionary + { + ["$id"] = "4820", + ["assetType"] = "Azure Database for MySQL" + }, + new Dictionary + { + ["$id"] = "4821", + ["assetType"] = "Azure Database for MariaDB" + }, + new Dictionary + { + ["$id"] = "4822", + ["assetType"] = "Azure Database for PostgreSQL" + }, + new Dictionary + { + ["$id"] = "4823", + ["assetType"] = "Azure Synapse Analytics" + } + } + }), +}; +Response response = await client.QueryAsync(body); +]]> +This sample shows how to call QueryAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +QueryConfig body = new QueryConfig +{ + Limit = 10, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "4865", + ["or"] = new object[] + { + new Dictionary + { + ["$id"] = "4866", + ["attributeName"] = "name", + ["operator"] = "eq", + ["attributeValue"] = "exampledata.csv" + }, + new Dictionary + { + ["$id"] = "4867", + ["attributeName"] = "createTime", + ["operator"] = "ge", + ["attributeValue"] = 1545580800000L + }, + new Dictionary + { + ["$id"] = "4868", + ["attributeName"] = "modifiedTime", + ["operator"] = "timerange", + ["attributeValue"] = "LAST_24H|LAST_7D|LAST_30D|LAST_365D|MORE_THAN_365D" + } + } + }), +}; +Response response = await client.QueryAsync(body); +]]> +This sample shows how to call QueryAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +QueryConfig body = new QueryConfig +{ + Limit = 10, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "4930", + ["or"] = new object[] + { + new Dictionary + { + ["$id"] = "4931", + ["attributeName"] = ".", + ["operator"] = "eq|ne|contains|prefix", + ["attributeValue"] = "string value" + }, + new Dictionary + { + ["$id"] = "4932", + ["attributeName"] = ".", + ["operator"] = "eq|ne|gt|ge|lt|le", + ["attributeValue"] = 123 + }, + new Dictionary + { + ["$id"] = "4933", + ["attributeName"] = ".", + ["operator"] = "eq|ne", + ["attributeValue"] = true + }, + new Dictionary + { + ["$id"] = "4934", + ["attributeName"] = ".", + ["operator"] = "timerange", + ["attributeValue"] = "LAST_24H|LAST_7D|LAST_30D|LAST_365D|MORE_THAN_365D" + } + } + }), +}; +Response response = await client.QueryAsync(body); +]]> +This sample shows how to call QueryAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +QueryConfig body = new QueryConfig +{ + Limit = 10, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "4957", + ["classification"] = "MICROSOFT.PERSONAL.EMAIL", + ["includeSubClassifications"] = true + }), +}; +Response response = await client.QueryAsync(body); +]]> +This sample shows how to call QueryAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +QueryConfig body = new QueryConfig +{ + Limit = 10, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "5007", + ["collectionId"] = "collectionName" + }), +}; +Response response = await client.QueryAsync(body); +]]> +This sample shows how to call QueryAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +QueryConfig body = new QueryConfig +{ + Limit = 10, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "5056", + ["objectType"] = "Tables" + }), + Facets = {new SearchFacetItem + { + Count = 10, + Facet = "assetType", + }, new SearchFacetItem + { + Count = 10, + Facet = "classification", + }, new SearchFacetItem + { + Count = 10, + Facet = "term", + }, new SearchFacetItem + { + Count = 10, + Facet = "label", + }}, +}; +Response response = await client.QueryAsync(body); +]]> +This sample shows how to call QueryAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +QueryConfig body = new QueryConfig +{ + Limit = 10, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "5186", + ["and"] = new object[] + { + new Dictionary + { + ["$id"] = "5187", + ["fileExtension"] = "txt" + } + } + }), +}; Response response = await client.QueryAsync(body); ]]> -This sample shows how to call QueryAsync with all parameters. +This sample shows how to call QueryAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +QueryConfig body = new QueryConfig +{ + Keywords = "", + Limit = 10, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "5230", + ["and"] = new object[] + { + new Dictionary + { + ["$id"] = "5231", + ["objectType"] = "Glossary terms" + }, + new Dictionary + { + ["$id"] = "5232", + ["or"] = new object[] + { + new Dictionary + { + ["$id"] = "5233", + ["glossaryType"] = "AtlasGlossary" + }, + new Dictionary + { + ["$id"] = "5234", + ["glossaryType"] = "AtlasGlossaryTerm" + } + } + } + } + }), + Facets = {new SearchFacetItem + { + Count = 10, + Facet = "termStatus", + Sort = new SearchFacetSort + { + Count = SearchSortOrder.Descend, + }, + }, new SearchFacetItem + { + Count = 10, + Facet = "termTemplate", + Sort = new SearchFacetSort + { + Count = SearchSortOrder.Descend, + }, + }}, +}; +Response response = await client.QueryAsync(body); +]]> +This sample shows how to call QueryAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +QueryConfig body = new QueryConfig +{ + Limit = 10, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "5302", + ["and"] = new object[] + { + new Dictionary + { + ["$id"] = "5303", + ["id"] = "bfecbcc3-1838-45fe-96d6-112de8a170f9" + } + } + }), +}; +Response response = await client.QueryAsync(body); +]]> +This sample shows how to call QueryAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +QueryConfig body = new QueryConfig +{ + Limit = 10, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "5331", + ["not"] = new Dictionary + { + ["$id"] = "5332", + ["classification"] = "MICROSOFT.SYSTEM.TEMP_FILE" + } + }), +}; +Response response = await client.QueryAsync(body); +]]> +This sample shows how to call QueryAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +QueryConfig body = new QueryConfig +{ + Limit = 10, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "5374", + ["or"] = new object[] + { + new Dictionary + { + ["$id"] = "5375", + ["objectType"] = "Dashboards" + }, + new Dictionary + { + ["$id"] = "5376", + ["objectType"] = "Data pipelines" + }, + new Dictionary + { + ["$id"] = "5377", + ["objectType"] = "Files" + }, + new Dictionary + { + ["$id"] = "5378", + ["objectType"] = "Folders" + }, + new Dictionary + { + ["$id"] = "5379", + ["objectType"] = "Glossary terms" + }, + new Dictionary + { + ["$id"] = "5380", + ["objectType"] = "Reports" + }, + new Dictionary + { + ["$id"] = "5381", + ["objectType"] = "Stored procedures" + }, + new Dictionary + { + ["$id"] = "5382", + ["objectType"] = "Tables" + } + } + }), +}; +Response response = await client.QueryAsync(body); +]]> +This sample shows how to call QueryAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +QueryConfig body = new QueryConfig +{ + Keywords = "exampledata", + Limit = 2, + ContinuationToken = "", + Orderby = {BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "5427", + ["name"] = "ASC" + }), BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "5429", + ["updateTime"] = "DESC" + })}, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "5420", + ["and"] = new object[] + { + new Dictionary + { + ["$id"] = "5421", + ["objectType"] = "Files" + }, + new Dictionary + { + ["$id"] = "5422", + ["entityType"] = "azure_blob_path" + } + } + }), + Facets = {new SearchFacetItem + { + Count = 0, + Facet = "assetType", + Sort = new SearchFacetSort + { + Count = SearchSortOrder.Descend, + }, + }, new SearchFacetItem + { + Count = 10, + Facet = "classification", + Sort = new SearchFacetSort + { + Count = SearchSortOrder.Descend, + }, + }, new SearchFacetItem + { + Count = 10, + Facet = "contactId", + Sort = new SearchFacetSort + { + Count = SearchSortOrder.Descend, + }, + }, new SearchFacetItem + { + Count = 10, + Facet = "label", + Sort = new SearchFacetSort + { + Count = SearchSortOrder.Descend, + }, + }, new SearchFacetItem + { + Count = 10, + Facet = "term", + Sort = new SearchFacetSort + { + Count = SearchSortOrder.Descend, + }, + }}, +}; +Response response = await client.QueryAsync(body); +]]> +This sample shows how to call QueryAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +QueryConfig body = new QueryConfig +{ + Keywords = "exampledata", + Limit = 2, + Orderby = {BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "5513", + ["name"] = "ASC" + }), BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "5515", + ["updateTime"] = "DESC" + })}, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "5507", + ["and"] = new object[] + { + new Dictionary + { + ["$id"] = "5508", + ["objectType"] = "Files" + }, + new Dictionary + { + ["$id"] = "5509", + ["entityType"] = "azure_blob_path" + } + } + }), + Facets = {new SearchFacetItem + { + Count = 0, + Facet = "assetType", + Sort = new SearchFacetSort + { + Count = SearchSortOrder.Descend, + }, + }, new SearchFacetItem + { + Count = 10, + Facet = "classification", + Sort = new SearchFacetSort + { + Count = SearchSortOrder.Descend, + }, + }, new SearchFacetItem + { + Count = 10, + Facet = "contactId", + Sort = new SearchFacetSort + { + Count = SearchSortOrder.Descend, + }, + }, new SearchFacetItem + { + Count = 10, + Facet = "label", + Sort = new SearchFacetSort + { + Count = SearchSortOrder.Descend, + }, + }, new SearchFacetItem + { + Count = 10, + Facet = "term", + Sort = new SearchFacetSort + { + Count = SearchSortOrder.Descend, + }, + }}, +}; +Response response = await client.QueryAsync(body); +]]> +This sample shows how to call QueryAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +QueryConfig body = new QueryConfig +{ + Keywords = "exampledata", + Limit = 2, + ContinuationToken = "", + Orderby = {BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "5600", + ["name"] = "ASC" + }), BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "5602", + ["updateTime"] = "DESC" + })}, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "5593", + ["and"] = new object[] + { + new Dictionary + { + ["$id"] = "5594", + ["objectType"] = "Files" + }, + new Dictionary + { + ["$id"] = "5595", + ["entityType"] = "azure_blob_path" + } + } + }), + Facets = {new SearchFacetItem + { + Count = 0, + Facet = "assetType", + Sort = new SearchFacetSort + { + Count = SearchSortOrder.Descend, + }, + }, new SearchFacetItem + { + Count = 10, + Facet = "classification", + Sort = new SearchFacetSort + { + Count = SearchSortOrder.Descend, + }, + }, new SearchFacetItem + { + Count = 10, + Facet = "contactId", + Sort = new SearchFacetSort + { + Count = SearchSortOrder.Descend, + }, + }, new SearchFacetItem + { + Count = 10, + Facet = "label", + Sort = new SearchFacetSort + { + Count = SearchSortOrder.Descend, + }, + }, new SearchFacetItem + { + Count = 10, + Facet = "term", + Sort = new SearchFacetSort + { + Count = SearchSortOrder.Descend, + }, + }}, +}; +Response response = await client.QueryAsync(body); +]]> +This sample shows how to call QueryAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +QueryConfig body = new QueryConfig +{ + Limit = 10, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "5679", + ["or"] = new object[] + { + new Dictionary + { + ["$id"] = "5680", + ["createTime"] = new Dictionary + { + ["$id"] = "5681", + ["operator"] = "lt", + ["timeThreshold"] = 1545580800000L + } + }, + new Dictionary + { + ["$id"] = "5682", + ["updateTime"] = "LAST_24H|LAST_7D|LAST_30D|LAST_365D|MORE_THAN_365D" + } + } + }), +}; +Response response = await client.QueryAsync(body); +]]> +This sample shows how to call QueryAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +QueryConfig body = new QueryConfig +{ + Keywords = "exampledata", + Limit = 10, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "5715", + ["and"] = new object[] + { + new Dictionary + { + ["$id"] = "5716", + ["objectType"] = "Files" + }, + new Dictionary + { + ["$id"] = "5717", + ["not"] = new Dictionary + { + ["$id"] = "5718", + ["or"] = new object[] + { + new Dictionary + { + ["$id"] = "5719", + ["attributeName"] = "size", + ["operator"] = "eq", + ["attributeValue"] = 0 + }, + new Dictionary + { + ["$id"] = "5720", + ["attributeName"] = "fileSize", + ["operator"] = "eq", + ["attributeValue"] = 0 + } + } + } + }, + new Dictionary + { + ["$id"] = "5721", + ["not"] = new Dictionary + { + ["$id"] = "5722", + ["classification"] = "MICROSOFT.SYSTEM.TEMP_FILE" + } + } + } + }), + TaxonomySetting = new SearchTaxonomySetting + { + AssetTypes = { "Azure Blob Storage" }, + Facet = new SearchFacetItem + { + Count = 10, + Sort = new SearchFacetSort + { + Count = SearchSortOrder.Descend, + }, + }, + }, +}; +Response response = await client.QueryAsync(body); +]]> +This sample shows how to call QueryAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +QueryConfig body = new QueryConfig +{ + Keywords = "", + Limit = 3, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "5776", + ["or"] = new object[] + { + new Dictionary + { + ["$id"] = "5777", + ["term"] = "ExampleTerm" + }, + new Dictionary + { + ["$id"] = "5778", + ["term"] = "ExampleTerm", + ["glossary"] = "GlossaryName" + }, + new Dictionary + { + ["$id"] = "5779", + ["termGuid"] = "" + } + } + }), +}; +Response response = await client.QueryAsync(body); +]]> +This sample shows how to call QueryAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +QueryConfig body = new QueryConfig +{ + Limit = 10, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "5812", + ["and"] = new object[] + { + new Dictionary + { + ["$id"] = "5813", + ["entityType"] = "azure_blob_path", + ["includeSubTypes"] = false + } + } + }), +}; +Response response = await client.QueryAsync(body); +]]> + + + +This sample shows how to call Query. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +QueryConfig body = new QueryConfig +{ + Keywords = "exampledata", + Limit = 10, + Orderby = {BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "4606", + ["name"] = "ASC" + }), BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "4608", + ["updateTime"] = "DESC" + })}, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "4600", + ["and"] = new object[] + { + new Dictionary + { + ["$id"] = "4601", + ["objectType"] = "Files" + }, + new Dictionary + { + ["$id"] = "4602", + ["entityType"] = "azure_blob_path" + } + } + }), + Facets = {new SearchFacetItem + { + Count = 0, + Facet = "assetType", + Sort = new SearchFacetSort + { + Count = SearchSortOrder.Descend, + }, + }, new SearchFacetItem + { + Count = 10, + Facet = "classification", + Sort = new SearchFacetSort + { + Count = SearchSortOrder.Descend, + }, + }, new SearchFacetItem + { + Count = 10, + Facet = "contactId", + Sort = new SearchFacetSort + { + Count = SearchSortOrder.Descend, + }, + }, new SearchFacetItem + { + Count = 10, + Facet = "label", + Sort = new SearchFacetSort + { + Count = SearchSortOrder.Descend, + }, + }, new SearchFacetItem + { + Count = 10, + Facet = "term", + Sort = new SearchFacetSort + { + Count = SearchSortOrder.Descend, + }, + }}, +}; +Response response = client.Query(body); +]]> +This sample shows how to call Query. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +QueryConfig body = new QueryConfig +{ + Limit = 10, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "4685", + ["and"] = new object[] + { + new Dictionary + { + ["$id"] = "4686", + ["entityType"] = "azure_blob_path" + }, + new Dictionary + { + ["$id"] = "4687", + ["attributeName"] = "qualifiedName", + ["operator"] = "contains", + ["attributeValue"] = ".csv" + } + } + }), +}; +Response response = client.Query(body); +]]> +This sample shows how to call Query. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +QueryConfig body = new QueryConfig +{ + Limit = 10, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "4738", + ["and"] = new object[] + { + new Dictionary + { + ["$id"] = "4739", + ["entityType"] = "azure_blob_path" + }, + new Dictionary + { + ["$id"] = "4740", + ["attributeName"] = "qualifiedName", + ["operator"] = "contains", + ["attributeValue"] = ".csv" + }, + new Dictionary + { + ["$id"] = "4741", + ["or"] = new object[] + { + new Dictionary + { + ["$id"] = "4742", + ["attributeName"] = "name", + ["operator"] = "eq", + ["attributeValue"] = "exampledata.csv" + }, + new Dictionary + { + ["$id"] = "4743", + ["attributeName"] = "qualifiedName", + ["operator"] = "prefix", + ["attributeValue"] = "https://" + } + } + } + } + }), +}; +Response response = client.Query(body); +]]> +This sample shows how to call Query. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +QueryConfig body = new QueryConfig +{ + Limit = 10, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "4796", + ["or"] = new object[] + { + new Dictionary + { + ["$id"] = "4797", + ["assetType"] = "SQL Server" + }, + new Dictionary + { + ["$id"] = "4798", + ["assetType"] = "Azure SQL Server" + }, + new Dictionary + { + ["$id"] = "4799", + ["assetType"] = "Azure SQL Database" + }, + new Dictionary + { + ["$id"] = "4800", + ["assetType"] = "Azure SQL Data Warehouse" + }, + new Dictionary + { + ["$id"] = "4801", + ["assetType"] = "Azure SQL Managed Instance" + }, + new Dictionary + { + ["$id"] = "4802", + ["assetType"] = "Azure Storage Account" + }, + new Dictionary + { + ["$id"] = "4803", + ["assetType"] = "Azure Blob Storage" + }, + new Dictionary + { + ["$id"] = "4804", + ["assetType"] = "Azure Files" + }, + new Dictionary + { + ["$id"] = "4805", + ["assetType"] = "Azure Table Storage" + }, + new Dictionary + { + ["$id"] = "4806", + ["assetType"] = "Azure Data Lake Storage Gen1" + }, + new Dictionary + { + ["$id"] = "4807", + ["assetType"] = "Azure Data Lake Storage Gen2" + }, + new Dictionary + { + ["$id"] = "4808", + ["assetType"] = "Azure Cosmos DB" + }, + new Dictionary + { + ["$id"] = "4809", + ["assetType"] = "Azure Data Factory" + }, + new Dictionary + { + ["$id"] = "4810", + ["assetType"] = "Azure Cognitive Search" + }, + new Dictionary + { + ["$id"] = "4811", + ["assetType"] = "Power BI" + }, + new Dictionary + { + ["$id"] = "4812", + ["assetType"] = "Azure Data Explorer" + }, + new Dictionary + { + ["$id"] = "4813", + ["assetType"] = "Amazon S3" + }, + new Dictionary + { + ["$id"] = "4814", + ["assetType"] = "Azure Data Share" + }, + new Dictionary + { + ["$id"] = "4815", + ["assetType"] = "Teradata" + }, + new Dictionary + { + ["$id"] = "4816", + ["assetType"] = "SAP S4HANA" + }, + new Dictionary + { + ["$id"] = "4817", + ["assetType"] = "SAP ECC" + }, + new Dictionary + { + ["$id"] = "4818", + ["assetType"] = "SQL Server Integration Services" + }, + new Dictionary + { + ["$id"] = "4819", + ["assetType"] = "hive" + }, + new Dictionary + { + ["$id"] = "4820", + ["assetType"] = "Azure Database for MySQL" + }, + new Dictionary + { + ["$id"] = "4821", + ["assetType"] = "Azure Database for MariaDB" + }, + new Dictionary + { + ["$id"] = "4822", + ["assetType"] = "Azure Database for PostgreSQL" + }, + new Dictionary + { + ["$id"] = "4823", + ["assetType"] = "Azure Synapse Analytics" + } + } + }), +}; +Response response = client.Query(body); +]]> +This sample shows how to call Query. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +QueryConfig body = new QueryConfig +{ + Limit = 10, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "4865", + ["or"] = new object[] + { + new Dictionary + { + ["$id"] = "4866", + ["attributeName"] = "name", + ["operator"] = "eq", + ["attributeValue"] = "exampledata.csv" + }, + new Dictionary + { + ["$id"] = "4867", + ["attributeName"] = "createTime", + ["operator"] = "ge", + ["attributeValue"] = 1545580800000L + }, + new Dictionary + { + ["$id"] = "4868", + ["attributeName"] = "modifiedTime", + ["operator"] = "timerange", + ["attributeValue"] = "LAST_24H|LAST_7D|LAST_30D|LAST_365D|MORE_THAN_365D" + } + } + }), +}; +Response response = client.Query(body); +]]> +This sample shows how to call Query. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +QueryConfig body = new QueryConfig +{ + Limit = 10, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "4930", + ["or"] = new object[] + { + new Dictionary + { + ["$id"] = "4931", + ["attributeName"] = ".", + ["operator"] = "eq|ne|contains|prefix", + ["attributeValue"] = "string value" + }, + new Dictionary + { + ["$id"] = "4932", + ["attributeName"] = ".", + ["operator"] = "eq|ne|gt|ge|lt|le", + ["attributeValue"] = 123 + }, + new Dictionary + { + ["$id"] = "4933", + ["attributeName"] = ".", + ["operator"] = "eq|ne", + ["attributeValue"] = true + }, + new Dictionary + { + ["$id"] = "4934", + ["attributeName"] = ".", + ["operator"] = "timerange", + ["attributeValue"] = "LAST_24H|LAST_7D|LAST_30D|LAST_365D|MORE_THAN_365D" + } + } + }), +}; +Response response = client.Query(body); +]]> +This sample shows how to call Query. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +QueryConfig body = new QueryConfig +{ + Limit = 10, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "4957", + ["classification"] = "MICROSOFT.PERSONAL.EMAIL", + ["includeSubClassifications"] = true + }), +}; +Response response = client.Query(body); +]]> +This sample shows how to call Query. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +QueryConfig body = new QueryConfig +{ + Limit = 10, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "5007", + ["collectionId"] = "collectionName" + }), +}; +Response response = client.Query(body); +]]> +This sample shows how to call Query. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +QueryConfig body = new QueryConfig +{ + Limit = 10, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "5056", + ["objectType"] = "Tables" + }), + Facets = {new SearchFacetItem + { + Count = 10, + Facet = "assetType", + }, new SearchFacetItem + { + Count = 10, + Facet = "classification", + }, new SearchFacetItem + { + Count = 10, + Facet = "term", + }, new SearchFacetItem + { + Count = 10, + Facet = "label", + }}, +}; +Response response = client.Query(body); +]]> +This sample shows how to call Query. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +QueryConfig body = new QueryConfig +{ + Limit = 10, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "5186", + ["and"] = new object[] + { + new Dictionary + { + ["$id"] = "5187", + ["fileExtension"] = "txt" + } + } + }), +}; +Response response = client.Query(body); +]]> +This sample shows how to call Query. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +QueryConfig body = new QueryConfig +{ + Keywords = "", + Limit = 10, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "5230", + ["and"] = new object[] + { + new Dictionary + { + ["$id"] = "5231", + ["objectType"] = "Glossary terms" + }, + new Dictionary + { + ["$id"] = "5232", + ["or"] = new object[] + { + new Dictionary + { + ["$id"] = "5233", + ["glossaryType"] = "AtlasGlossary" + }, + new Dictionary + { + ["$id"] = "5234", + ["glossaryType"] = "AtlasGlossaryTerm" + } + } + } + } + }), + Facets = {new SearchFacetItem + { + Count = 10, + Facet = "termStatus", + Sort = new SearchFacetSort + { + Count = SearchSortOrder.Descend, + }, + }, new SearchFacetItem + { + Count = 10, + Facet = "termTemplate", + Sort = new SearchFacetSort + { + Count = SearchSortOrder.Descend, + }, + }}, +}; +Response response = client.Query(body); +]]> +This sample shows how to call Query. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +QueryConfig body = new QueryConfig +{ + Limit = 10, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "5302", + ["and"] = new object[] + { + new Dictionary + { + ["$id"] = "5303", + ["id"] = "bfecbcc3-1838-45fe-96d6-112de8a170f9" + } + } + }), +}; +Response response = client.Query(body); +]]> +This sample shows how to call Query. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +QueryConfig body = new QueryConfig +{ + Limit = 10, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "5331", + ["not"] = new Dictionary + { + ["$id"] = "5332", + ["classification"] = "MICROSOFT.SYSTEM.TEMP_FILE" + } + }), +}; +Response response = client.Query(body); +]]> +This sample shows how to call Query. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +QueryConfig body = new QueryConfig +{ + Limit = 10, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "5374", + ["or"] = new object[] + { + new Dictionary + { + ["$id"] = "5375", + ["objectType"] = "Dashboards" + }, + new Dictionary + { + ["$id"] = "5376", + ["objectType"] = "Data pipelines" + }, + new Dictionary + { + ["$id"] = "5377", + ["objectType"] = "Files" + }, + new Dictionary + { + ["$id"] = "5378", + ["objectType"] = "Folders" + }, + new Dictionary + { + ["$id"] = "5379", + ["objectType"] = "Glossary terms" + }, + new Dictionary + { + ["$id"] = "5380", + ["objectType"] = "Reports" + }, + new Dictionary + { + ["$id"] = "5381", + ["objectType"] = "Stored procedures" + }, + new Dictionary + { + ["$id"] = "5382", + ["objectType"] = "Tables" + } + } + }), +}; +Response response = client.Query(body); +]]> +This sample shows how to call Query. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +QueryConfig body = new QueryConfig +{ + Keywords = "exampledata", + Limit = 2, + ContinuationToken = "", + Orderby = {BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "5427", + ["name"] = "ASC" + }), BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "5429", + ["updateTime"] = "DESC" + })}, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "5420", + ["and"] = new object[] + { + new Dictionary + { + ["$id"] = "5421", + ["objectType"] = "Files" + }, + new Dictionary + { + ["$id"] = "5422", + ["entityType"] = "azure_blob_path" + } + } + }), + Facets = {new SearchFacetItem + { + Count = 0, + Facet = "assetType", + Sort = new SearchFacetSort + { + Count = SearchSortOrder.Descend, + }, + }, new SearchFacetItem + { + Count = 10, + Facet = "classification", + Sort = new SearchFacetSort + { + Count = SearchSortOrder.Descend, + }, + }, new SearchFacetItem + { + Count = 10, + Facet = "contactId", + Sort = new SearchFacetSort + { + Count = SearchSortOrder.Descend, + }, + }, new SearchFacetItem + { + Count = 10, + Facet = "label", + Sort = new SearchFacetSort + { + Count = SearchSortOrder.Descend, + }, + }, new SearchFacetItem + { + Count = 10, + Facet = "term", + Sort = new SearchFacetSort + { + Count = SearchSortOrder.Descend, + }, + }}, +}; +Response response = client.Query(body); +]]> +This sample shows how to call Query. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +QueryConfig body = new QueryConfig +{ + Keywords = "exampledata", + Limit = 2, + Orderby = {BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "5513", + ["name"] = "ASC" + }), BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "5515", + ["updateTime"] = "DESC" + })}, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "5507", + ["and"] = new object[] + { + new Dictionary + { + ["$id"] = "5508", + ["objectType"] = "Files" + }, + new Dictionary + { + ["$id"] = "5509", + ["entityType"] = "azure_blob_path" + } + } + }), + Facets = {new SearchFacetItem + { + Count = 0, + Facet = "assetType", + Sort = new SearchFacetSort + { + Count = SearchSortOrder.Descend, + }, + }, new SearchFacetItem + { + Count = 10, + Facet = "classification", + Sort = new SearchFacetSort + { + Count = SearchSortOrder.Descend, + }, + }, new SearchFacetItem + { + Count = 10, + Facet = "contactId", + Sort = new SearchFacetSort + { + Count = SearchSortOrder.Descend, + }, + }, new SearchFacetItem + { + Count = 10, + Facet = "label", + Sort = new SearchFacetSort + { + Count = SearchSortOrder.Descend, + }, + }, new SearchFacetItem + { + Count = 10, + Facet = "term", + Sort = new SearchFacetSort + { + Count = SearchSortOrder.Descend, + }, + }}, +}; +Response response = client.Query(body); +]]> +This sample shows how to call Query. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +QueryConfig body = new QueryConfig +{ + Keywords = "exampledata", + Limit = 2, + ContinuationToken = "", + Orderby = {BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "5600", + ["name"] = "ASC" + }), BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "5602", + ["updateTime"] = "DESC" + })}, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "5593", + ["and"] = new object[] + { + new Dictionary + { + ["$id"] = "5594", + ["objectType"] = "Files" + }, + new Dictionary + { + ["$id"] = "5595", + ["entityType"] = "azure_blob_path" + } + } + }), + Facets = {new SearchFacetItem + { + Count = 0, + Facet = "assetType", + Sort = new SearchFacetSort + { + Count = SearchSortOrder.Descend, + }, + }, new SearchFacetItem + { + Count = 10, + Facet = "classification", + Sort = new SearchFacetSort + { + Count = SearchSortOrder.Descend, + }, + }, new SearchFacetItem + { + Count = 10, + Facet = "contactId", + Sort = new SearchFacetSort + { + Count = SearchSortOrder.Descend, + }, + }, new SearchFacetItem + { + Count = 10, + Facet = "label", + Sort = new SearchFacetSort + { + Count = SearchSortOrder.Descend, + }, + }, new SearchFacetItem + { + Count = 10, + Facet = "term", + Sort = new SearchFacetSort + { + Count = SearchSortOrder.Descend, + }, + }}, +}; +Response response = client.Query(body); +]]> +This sample shows how to call Query. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +QueryConfig body = new QueryConfig +{ + Limit = 10, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "5679", + ["or"] = new object[] + { + new Dictionary + { + ["$id"] = "5680", + ["createTime"] = new Dictionary + { + ["$id"] = "5681", + ["operator"] = "lt", + ["timeThreshold"] = 1545580800000L + } + }, + new Dictionary + { + ["$id"] = "5682", + ["updateTime"] = "LAST_24H|LAST_7D|LAST_30D|LAST_365D|MORE_THAN_365D" + } + } + }), +}; +Response response = client.Query(body); +]]> +This sample shows how to call Query. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +QueryConfig body = new QueryConfig +{ + Keywords = "exampledata", + Limit = 10, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "5715", + ["and"] = new object[] + { + new Dictionary + { + ["$id"] = "5716", + ["objectType"] = "Files" + }, + new Dictionary + { + ["$id"] = "5717", + ["not"] = new Dictionary + { + ["$id"] = "5718", + ["or"] = new object[] + { + new Dictionary + { + ["$id"] = "5719", + ["attributeName"] = "size", + ["operator"] = "eq", + ["attributeValue"] = 0 + }, + new Dictionary + { + ["$id"] = "5720", + ["attributeName"] = "fileSize", + ["operator"] = "eq", + ["attributeValue"] = 0 + } + } + } + }, + new Dictionary + { + ["$id"] = "5721", + ["not"] = new Dictionary + { + ["$id"] = "5722", + ["classification"] = "MICROSOFT.SYSTEM.TEMP_FILE" + } + } + } + }), + TaxonomySetting = new SearchTaxonomySetting + { + AssetTypes = { "Azure Blob Storage" }, + Facet = new SearchFacetItem + { + Count = 10, + Sort = new SearchFacetSort + { + Count = SearchSortOrder.Descend, + }, + }, + }, +}; +Response response = client.Query(body); +]]> +This sample shows how to call Query. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +QueryConfig body = new QueryConfig +{ + Keywords = "", + Limit = 3, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "5776", + ["or"] = new object[] + { + new Dictionary + { + ["$id"] = "5777", + ["term"] = "ExampleTerm" + }, + new Dictionary + { + ["$id"] = "5778", + ["term"] = "ExampleTerm", + ["glossary"] = "GlossaryName" + }, + new Dictionary + { + ["$id"] = "5779", + ["termGuid"] = "" + } + } + }), +}; +Response response = client.Query(body); +]]> +This sample shows how to call Query. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +QueryConfig body = new QueryConfig +{ + Limit = 10, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "5812", + ["and"] = new object[] + { + new Dictionary + { + ["$id"] = "5813", + ["entityType"] = "azure_blob_path", + ["includeSubTypes"] = false + } + } + }), +}; +Response response = client.Query(body); +]]> + + + +This sample shows how to call QueryAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +using RequestContent content = RequestContent.Create(new +{ + keywords = "exampledata", + filter = new Dictionary + { + ["$id"] = "4600", + ["and"] = new object[] + { + new Dictionary + { + ["$id"] = "4601", + ["objectType"] = "Files" + }, + new Dictionary + { + ["$id"] = "4602", + ["entityType"] = "azure_blob_path" + } + } + }, + limit = 10, + orderby = new object[] + { + new Dictionary + { + ["$id"] = "4606", + ["name"] = "ASC" + }, + new Dictionary + { + ["$id"] = "4608", + ["updateTime"] = "DESC" + } + }, + facets = new object[] + { + new + { + facet = "assetType", + count = 0, + sort = new + { + count = "desc", + }, + }, + new + { + facet = "classification", + count = 10, + sort = new + { + count = "desc", + }, + }, + new + { + facet = "contactId", + count = 10, + sort = new + { + count = "desc", + }, + }, + new + { + facet = "label", + count = 10, + sort = new + { + count = "desc", + }, + }, + new + { + facet = "term", + count = 10, + sort = new + { + count = "desc", + }, + } + }, +}); +Response response = await client.QueryAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call QueryAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +using RequestContent content = RequestContent.Create(new +{ + limit = 10, + filter = new Dictionary + { + ["$id"] = "4685", + ["and"] = new object[] + { + new Dictionary + { + ["$id"] = "4686", + ["entityType"] = "azure_blob_path" + }, + new Dictionary + { + ["$id"] = "4687", + ["attributeName"] = "qualifiedName", + ["operator"] = "contains", + ["attributeValue"] = ".csv" + } + } + }, +}); +Response response = await client.QueryAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call QueryAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +using RequestContent content = RequestContent.Create(new +{ + limit = 10, + filter = new Dictionary + { + ["$id"] = "4738", + ["and"] = new object[] + { + new Dictionary + { + ["$id"] = "4739", + ["entityType"] = "azure_blob_path" + }, + new Dictionary + { + ["$id"] = "4740", + ["attributeName"] = "qualifiedName", + ["operator"] = "contains", + ["attributeValue"] = ".csv" + }, + new Dictionary + { + ["$id"] = "4741", + ["or"] = new object[] + { + new Dictionary + { + ["$id"] = "4742", + ["attributeName"] = "name", + ["operator"] = "eq", + ["attributeValue"] = "exampledata.csv" + }, + new Dictionary + { + ["$id"] = "4743", + ["attributeName"] = "qualifiedName", + ["operator"] = "prefix", + ["attributeValue"] = "https://" + } + } + } + } + }, +}); +Response response = await client.QueryAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call QueryAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +using RequestContent content = RequestContent.Create(new +{ + limit = 10, + filter = new Dictionary + { + ["$id"] = "4796", + ["or"] = new object[] + { + new Dictionary + { + ["$id"] = "4797", + ["assetType"] = "SQL Server" + }, + new Dictionary + { + ["$id"] = "4798", + ["assetType"] = "Azure SQL Server" + }, + new Dictionary + { + ["$id"] = "4799", + ["assetType"] = "Azure SQL Database" + }, + new Dictionary + { + ["$id"] = "4800", + ["assetType"] = "Azure SQL Data Warehouse" + }, + new Dictionary + { + ["$id"] = "4801", + ["assetType"] = "Azure SQL Managed Instance" + }, + new Dictionary + { + ["$id"] = "4802", + ["assetType"] = "Azure Storage Account" + }, + new Dictionary + { + ["$id"] = "4803", + ["assetType"] = "Azure Blob Storage" + }, + new Dictionary + { + ["$id"] = "4804", + ["assetType"] = "Azure Files" + }, + new Dictionary + { + ["$id"] = "4805", + ["assetType"] = "Azure Table Storage" + }, + new Dictionary + { + ["$id"] = "4806", + ["assetType"] = "Azure Data Lake Storage Gen1" + }, + new Dictionary + { + ["$id"] = "4807", + ["assetType"] = "Azure Data Lake Storage Gen2" + }, + new Dictionary + { + ["$id"] = "4808", + ["assetType"] = "Azure Cosmos DB" + }, + new Dictionary + { + ["$id"] = "4809", + ["assetType"] = "Azure Data Factory" + }, + new Dictionary + { + ["$id"] = "4810", + ["assetType"] = "Azure Cognitive Search" + }, + new Dictionary + { + ["$id"] = "4811", + ["assetType"] = "Power BI" + }, + new Dictionary + { + ["$id"] = "4812", + ["assetType"] = "Azure Data Explorer" + }, + new Dictionary + { + ["$id"] = "4813", + ["assetType"] = "Amazon S3" + }, + new Dictionary + { + ["$id"] = "4814", + ["assetType"] = "Azure Data Share" + }, + new Dictionary + { + ["$id"] = "4815", + ["assetType"] = "Teradata" + }, + new Dictionary + { + ["$id"] = "4816", + ["assetType"] = "SAP S4HANA" + }, + new Dictionary + { + ["$id"] = "4817", + ["assetType"] = "SAP ECC" + }, + new Dictionary + { + ["$id"] = "4818", + ["assetType"] = "SQL Server Integration Services" + }, + new Dictionary + { + ["$id"] = "4819", + ["assetType"] = "hive" + }, + new Dictionary + { + ["$id"] = "4820", + ["assetType"] = "Azure Database for MySQL" + }, + new Dictionary + { + ["$id"] = "4821", + ["assetType"] = "Azure Database for MariaDB" + }, + new Dictionary + { + ["$id"] = "4822", + ["assetType"] = "Azure Database for PostgreSQL" + }, + new Dictionary + { + ["$id"] = "4823", + ["assetType"] = "Azure Synapse Analytics" + } + } + }, +}); +Response response = await client.QueryAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call QueryAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +using RequestContent content = RequestContent.Create(new +{ + limit = 10, + filter = new Dictionary + { + ["$id"] = "4865", + ["or"] = new object[] + { + new Dictionary + { + ["$id"] = "4866", + ["attributeName"] = "name", + ["operator"] = "eq", + ["attributeValue"] = "exampledata.csv" + }, + new Dictionary + { + ["$id"] = "4867", + ["attributeName"] = "createTime", + ["operator"] = "ge", + ["attributeValue"] = 1545580800000L + }, + new Dictionary + { + ["$id"] = "4868", + ["attributeName"] = "modifiedTime", + ["operator"] = "timerange", + ["attributeValue"] = "LAST_24H|LAST_7D|LAST_30D|LAST_365D|MORE_THAN_365D" + } + } + }, +}); +Response response = await client.QueryAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call QueryAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +using RequestContent content = RequestContent.Create(new +{ + limit = 10, + filter = new Dictionary + { + ["$id"] = "4930", + ["or"] = new object[] + { + new Dictionary + { + ["$id"] = "4931", + ["attributeName"] = ".", + ["operator"] = "eq|ne|contains|prefix", + ["attributeValue"] = "string value" + }, + new Dictionary + { + ["$id"] = "4932", + ["attributeName"] = ".", + ["operator"] = "eq|ne|gt|ge|lt|le", + ["attributeValue"] = 123 + }, + new Dictionary + { + ["$id"] = "4933", + ["attributeName"] = ".", + ["operator"] = "eq|ne", + ["attributeValue"] = true + }, + new Dictionary + { + ["$id"] = "4934", + ["attributeName"] = ".", + ["operator"] = "timerange", + ["attributeValue"] = "LAST_24H|LAST_7D|LAST_30D|LAST_365D|MORE_THAN_365D" + } + } + }, +}); +Response response = await client.QueryAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call QueryAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +using RequestContent content = RequestContent.Create(new +{ + limit = 10, + filter = new Dictionary + { + ["$id"] = "4957", + ["classification"] = "MICROSOFT.PERSONAL.EMAIL", + ["includeSubClassifications"] = true + }, +}); +Response response = await client.QueryAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call QueryAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +using RequestContent content = RequestContent.Create(new +{ + limit = 10, + filter = new Dictionary + { + ["$id"] = "5007", + ["collectionId"] = "collectionName" + }, +}); +Response response = await client.QueryAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call QueryAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +using RequestContent content = RequestContent.Create(new +{ + filter = new Dictionary + { + ["$id"] = "5056", + ["objectType"] = "Tables" + }, + limit = 10, + facets = new object[] + { + new + { + facet = "assetType", + count = 10, + }, + new + { + facet = "classification", + count = 10, + }, + new + { + facet = "term", + count = 10, + }, + new + { + facet = "label", + count = 10, + } + }, +}); +Response response = await client.QueryAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call QueryAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +using RequestContent content = RequestContent.Create(new +{ + limit = 10, + filter = new Dictionary + { + ["$id"] = "5186", + ["and"] = new object[] + { + new Dictionary + { + ["$id"] = "5187", + ["fileExtension"] = "txt" + } + } + }, +}); +Response response = await client.QueryAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call QueryAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +using RequestContent content = RequestContent.Create(new +{ + keywords = "", + limit = 10, + filter = new Dictionary + { + ["$id"] = "5230", + ["and"] = new object[] + { + new Dictionary + { + ["$id"] = "5231", + ["objectType"] = "Glossary terms" + }, + new Dictionary + { + ["$id"] = "5232", + ["or"] = new object[] + { + new Dictionary + { + ["$id"] = "5233", + ["glossaryType"] = "AtlasGlossary" + }, + new Dictionary + { + ["$id"] = "5234", + ["glossaryType"] = "AtlasGlossaryTerm" + } + } + } + } + }, + facets = new object[] + { + new + { + facet = "termStatus", + count = 10, + sort = new + { + count = "desc", + }, + }, + new + { + facet = "termTemplate", + count = 10, + sort = new + { + count = "desc", + }, + } + }, +}); +Response response = await client.QueryAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call QueryAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +using RequestContent content = RequestContent.Create(new +{ + limit = 10, + filter = new Dictionary + { + ["$id"] = "5302", + ["and"] = new object[] + { + new Dictionary + { + ["$id"] = "5303", + ["id"] = "bfecbcc3-1838-45fe-96d6-112de8a170f9" + } + } + }, +}); +Response response = await client.QueryAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call QueryAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +using RequestContent content = RequestContent.Create(new +{ + limit = 10, + filter = new Dictionary + { + ["$id"] = "5331", + ["not"] = new Dictionary + { + ["$id"] = "5332", + ["classification"] = "MICROSOFT.SYSTEM.TEMP_FILE" + } + }, +}); +Response response = await client.QueryAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call QueryAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +using RequestContent content = RequestContent.Create(new +{ + limit = 10, + filter = new Dictionary + { + ["$id"] = "5374", + ["or"] = new object[] + { + new Dictionary + { + ["$id"] = "5375", + ["objectType"] = "Dashboards" + }, + new Dictionary + { + ["$id"] = "5376", + ["objectType"] = "Data pipelines" + }, + new Dictionary + { + ["$id"] = "5377", + ["objectType"] = "Files" + }, + new Dictionary + { + ["$id"] = "5378", + ["objectType"] = "Folders" + }, + new Dictionary + { + ["$id"] = "5379", + ["objectType"] = "Glossary terms" + }, + new Dictionary + { + ["$id"] = "5380", + ["objectType"] = "Reports" + }, + new Dictionary + { + ["$id"] = "5381", + ["objectType"] = "Stored procedures" + }, + new Dictionary + { + ["$id"] = "5382", + ["objectType"] = "Tables" + } + } + }, +}); +Response response = await client.QueryAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call QueryAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +using RequestContent content = RequestContent.Create(new +{ + keywords = "exampledata", + filter = new Dictionary + { + ["$id"] = "5420", + ["and"] = new object[] + { + new Dictionary + { + ["$id"] = "5421", + ["objectType"] = "Files" + }, + new Dictionary + { + ["$id"] = "5422", + ["entityType"] = "azure_blob_path" + } + } + }, + limit = 2, + continuationToken = "", + orderby = new object[] + { + new Dictionary + { + ["$id"] = "5427", + ["name"] = "ASC" + }, + new Dictionary + { + ["$id"] = "5429", + ["updateTime"] = "DESC" + } + }, + facets = new object[] + { + new + { + facet = "assetType", + count = 0, + sort = new + { + count = "desc", + }, + }, + new + { + facet = "classification", + count = 10, + sort = new + { + count = "desc", + }, + }, + new + { + facet = "contactId", + count = 10, + sort = new + { + count = "desc", + }, + }, + new + { + facet = "label", + count = 10, + sort = new + { + count = "desc", + }, + }, + new + { + facet = "term", + count = 10, + sort = new + { + count = "desc", + }, + } + }, +}); +Response response = await client.QueryAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call QueryAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +using RequestContent content = RequestContent.Create(new +{ + keywords = "exampledata", + filter = new Dictionary + { + ["$id"] = "5507", + ["and"] = new object[] + { + new Dictionary + { + ["$id"] = "5508", + ["objectType"] = "Files" + }, + new Dictionary + { + ["$id"] = "5509", + ["entityType"] = "azure_blob_path" + } + } + }, + limit = 2, + orderby = new object[] + { + new Dictionary + { + ["$id"] = "5513", + ["name"] = "ASC" + }, + new Dictionary + { + ["$id"] = "5515", + ["updateTime"] = "DESC" + } + }, + facets = new object[] + { + new + { + facet = "assetType", + count = 0, + sort = new + { + count = "desc", + }, + }, + new + { + facet = "classification", + count = 10, + sort = new + { + count = "desc", + }, + }, + new + { + facet = "contactId", + count = 10, + sort = new + { + count = "desc", + }, + }, + new + { + facet = "label", + count = 10, + sort = new + { + count = "desc", + }, + }, + new + { + facet = "term", + count = 10, + sort = new + { + count = "desc", + }, + } + }, +}); +Response response = await client.QueryAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call QueryAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +using RequestContent content = RequestContent.Create(new +{ + keywords = "exampledata", + filter = new Dictionary + { + ["$id"] = "5593", + ["and"] = new object[] + { + new Dictionary + { + ["$id"] = "5594", + ["objectType"] = "Files" + }, + new Dictionary + { + ["$id"] = "5595", + ["entityType"] = "azure_blob_path" + } + } + }, + limit = 2, + continuationToken = "", + orderby = new object[] + { + new Dictionary + { + ["$id"] = "5600", + ["name"] = "ASC" + }, + new Dictionary + { + ["$id"] = "5602", + ["updateTime"] = "DESC" + } + }, + facets = new object[] + { + new + { + facet = "assetType", + count = 0, + sort = new + { + count = "desc", + }, + }, + new + { + facet = "classification", + count = 10, + sort = new + { + count = "desc", + }, + }, + new + { + facet = "contactId", + count = 10, + sort = new + { + count = "desc", + }, + }, + new + { + facet = "label", + count = 10, + sort = new + { + count = "desc", + }, + }, + new + { + facet = "term", + count = 10, + sort = new + { + count = "desc", + }, + } + }, +}); +Response response = await client.QueryAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call QueryAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +using RequestContent content = RequestContent.Create(new +{ + limit = 10, + filter = new Dictionary + { + ["$id"] = "5679", + ["or"] = new object[] + { + new Dictionary + { + ["$id"] = "5680", + ["createTime"] = new Dictionary + { + ["$id"] = "5681", + ["operator"] = "lt", + ["timeThreshold"] = 1545580800000L + } + }, + new Dictionary + { + ["$id"] = "5682", + ["updateTime"] = "LAST_24H|LAST_7D|LAST_30D|LAST_365D|MORE_THAN_365D" + } + } + }, +}); +Response response = await client.QueryAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call QueryAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +using RequestContent content = RequestContent.Create(new +{ + keywords = "exampledata", + filter = new Dictionary + { + ["$id"] = "5715", + ["and"] = new object[] + { + new Dictionary + { + ["$id"] = "5716", + ["objectType"] = "Files" + }, + new Dictionary + { + ["$id"] = "5717", + ["not"] = new Dictionary + { + ["$id"] = "5718", + ["or"] = new object[] + { + new Dictionary + { + ["$id"] = "5719", + ["attributeName"] = "size", + ["operator"] = "eq", + ["attributeValue"] = 0 + }, + new Dictionary + { + ["$id"] = "5720", + ["attributeName"] = "fileSize", + ["operator"] = "eq", + ["attributeValue"] = 0 + } + } + } + }, + new Dictionary + { + ["$id"] = "5721", + ["not"] = new Dictionary + { + ["$id"] = "5722", + ["classification"] = "MICROSOFT.SYSTEM.TEMP_FILE" + } + } + } + }, + limit = 10, + taxonomySetting = new + { + assetTypes = new object[] + { + "Azure Blob Storage" + }, + facet = new + { + count = 10, + sort = new + { + count = "desc", + }, + }, + }, +}); +Response response = await client.QueryAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call QueryAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +using RequestContent content = RequestContent.Create(new +{ + keywords = "", + limit = 3, + filter = new Dictionary + { + ["$id"] = "5776", + ["or"] = new object[] + { + new Dictionary + { + ["$id"] = "5777", + ["term"] = "ExampleTerm" + }, + new Dictionary + { + ["$id"] = "5778", + ["term"] = "ExampleTerm", + ["glossary"] = "GlossaryName" + }, + new Dictionary + { + ["$id"] = "5779", + ["termGuid"] = "" + } + } + }, +}); +Response response = await client.QueryAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call QueryAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +using RequestContent content = RequestContent.Create(new +{ + limit = 10, + filter = new Dictionary + { + ["$id"] = "5812", + ["and"] = new object[] + { + new Dictionary + { + ["$id"] = "5813", + ["entityType"] = "azure_blob_path", + ["includeSubTypes"] = false + } + } + }, +}); +Response response = await client.QueryAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> + + + +This sample shows how to call Query and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +using RequestContent content = RequestContent.Create(new +{ + keywords = "exampledata", + filter = new Dictionary + { + ["$id"] = "4600", + ["and"] = new object[] + { + new Dictionary + { + ["$id"] = "4601", + ["objectType"] = "Files" + }, + new Dictionary + { + ["$id"] = "4602", + ["entityType"] = "azure_blob_path" + } + } + }, + limit = 10, + orderby = new object[] + { + new Dictionary + { + ["$id"] = "4606", + ["name"] = "ASC" + }, + new Dictionary + { + ["$id"] = "4608", + ["updateTime"] = "DESC" + } + }, + facets = new object[] + { + new + { + facet = "assetType", + count = 0, + sort = new + { + count = "desc", + }, + }, + new + { + facet = "classification", + count = 10, + sort = new + { + count = "desc", + }, + }, + new + { + facet = "contactId", + count = 10, + sort = new + { + count = "desc", + }, + }, + new + { + facet = "label", + count = 10, + sort = new + { + count = "desc", + }, + }, + new + { + facet = "term", + count = 10, + sort = new + { + count = "desc", + }, + } + }, +}); +Response response = client.Query(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call Query and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +using RequestContent content = RequestContent.Create(new +{ + limit = 10, + filter = new Dictionary + { + ["$id"] = "4685", + ["and"] = new object[] + { + new Dictionary + { + ["$id"] = "4686", + ["entityType"] = "azure_blob_path" + }, + new Dictionary + { + ["$id"] = "4687", + ["attributeName"] = "qualifiedName", + ["operator"] = "contains", + ["attributeValue"] = ".csv" + } + } + }, +}); +Response response = client.Query(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call Query and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +using RequestContent content = RequestContent.Create(new +{ + limit = 10, + filter = new Dictionary + { + ["$id"] = "4738", + ["and"] = new object[] + { + new Dictionary + { + ["$id"] = "4739", + ["entityType"] = "azure_blob_path" + }, + new Dictionary + { + ["$id"] = "4740", + ["attributeName"] = "qualifiedName", + ["operator"] = "contains", + ["attributeValue"] = ".csv" + }, + new Dictionary + { + ["$id"] = "4741", + ["or"] = new object[] + { + new Dictionary + { + ["$id"] = "4742", + ["attributeName"] = "name", + ["operator"] = "eq", + ["attributeValue"] = "exampledata.csv" + }, + new Dictionary + { + ["$id"] = "4743", + ["attributeName"] = "qualifiedName", + ["operator"] = "prefix", + ["attributeValue"] = "https://" + } + } + } + } + }, +}); +Response response = client.Query(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call Query and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +using RequestContent content = RequestContent.Create(new +{ + limit = 10, + filter = new Dictionary + { + ["$id"] = "4796", + ["or"] = new object[] + { + new Dictionary + { + ["$id"] = "4797", + ["assetType"] = "SQL Server" + }, + new Dictionary + { + ["$id"] = "4798", + ["assetType"] = "Azure SQL Server" + }, + new Dictionary + { + ["$id"] = "4799", + ["assetType"] = "Azure SQL Database" + }, + new Dictionary + { + ["$id"] = "4800", + ["assetType"] = "Azure SQL Data Warehouse" + }, + new Dictionary + { + ["$id"] = "4801", + ["assetType"] = "Azure SQL Managed Instance" + }, + new Dictionary + { + ["$id"] = "4802", + ["assetType"] = "Azure Storage Account" + }, + new Dictionary + { + ["$id"] = "4803", + ["assetType"] = "Azure Blob Storage" + }, + new Dictionary + { + ["$id"] = "4804", + ["assetType"] = "Azure Files" + }, + new Dictionary + { + ["$id"] = "4805", + ["assetType"] = "Azure Table Storage" + }, + new Dictionary + { + ["$id"] = "4806", + ["assetType"] = "Azure Data Lake Storage Gen1" + }, + new Dictionary + { + ["$id"] = "4807", + ["assetType"] = "Azure Data Lake Storage Gen2" + }, + new Dictionary + { + ["$id"] = "4808", + ["assetType"] = "Azure Cosmos DB" + }, + new Dictionary + { + ["$id"] = "4809", + ["assetType"] = "Azure Data Factory" + }, + new Dictionary + { + ["$id"] = "4810", + ["assetType"] = "Azure Cognitive Search" + }, + new Dictionary + { + ["$id"] = "4811", + ["assetType"] = "Power BI" + }, + new Dictionary + { + ["$id"] = "4812", + ["assetType"] = "Azure Data Explorer" + }, + new Dictionary + { + ["$id"] = "4813", + ["assetType"] = "Amazon S3" + }, + new Dictionary + { + ["$id"] = "4814", + ["assetType"] = "Azure Data Share" + }, + new Dictionary + { + ["$id"] = "4815", + ["assetType"] = "Teradata" + }, + new Dictionary + { + ["$id"] = "4816", + ["assetType"] = "SAP S4HANA" + }, + new Dictionary + { + ["$id"] = "4817", + ["assetType"] = "SAP ECC" + }, + new Dictionary + { + ["$id"] = "4818", + ["assetType"] = "SQL Server Integration Services" + }, + new Dictionary + { + ["$id"] = "4819", + ["assetType"] = "hive" + }, + new Dictionary + { + ["$id"] = "4820", + ["assetType"] = "Azure Database for MySQL" + }, + new Dictionary + { + ["$id"] = "4821", + ["assetType"] = "Azure Database for MariaDB" + }, + new Dictionary + { + ["$id"] = "4822", + ["assetType"] = "Azure Database for PostgreSQL" + }, + new Dictionary + { + ["$id"] = "4823", + ["assetType"] = "Azure Synapse Analytics" + } + } + }, +}); +Response response = client.Query(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call Query and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +using RequestContent content = RequestContent.Create(new +{ + limit = 10, + filter = new Dictionary + { + ["$id"] = "4865", + ["or"] = new object[] + { + new Dictionary + { + ["$id"] = "4866", + ["attributeName"] = "name", + ["operator"] = "eq", + ["attributeValue"] = "exampledata.csv" + }, + new Dictionary + { + ["$id"] = "4867", + ["attributeName"] = "createTime", + ["operator"] = "ge", + ["attributeValue"] = 1545580800000L + }, + new Dictionary + { + ["$id"] = "4868", + ["attributeName"] = "modifiedTime", + ["operator"] = "timerange", + ["attributeValue"] = "LAST_24H|LAST_7D|LAST_30D|LAST_365D|MORE_THAN_365D" + } + } + }, +}); +Response response = client.Query(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call Query and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +using RequestContent content = RequestContent.Create(new +{ + limit = 10, + filter = new Dictionary + { + ["$id"] = "4930", + ["or"] = new object[] + { + new Dictionary + { + ["$id"] = "4931", + ["attributeName"] = ".", + ["operator"] = "eq|ne|contains|prefix", + ["attributeValue"] = "string value" + }, + new Dictionary + { + ["$id"] = "4932", + ["attributeName"] = ".", + ["operator"] = "eq|ne|gt|ge|lt|le", + ["attributeValue"] = 123 + }, + new Dictionary + { + ["$id"] = "4933", + ["attributeName"] = ".", + ["operator"] = "eq|ne", + ["attributeValue"] = true + }, + new Dictionary + { + ["$id"] = "4934", + ["attributeName"] = ".", + ["operator"] = "timerange", + ["attributeValue"] = "LAST_24H|LAST_7D|LAST_30D|LAST_365D|MORE_THAN_365D" + } + } + }, +}); +Response response = client.Query(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call Query and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +using RequestContent content = RequestContent.Create(new +{ + limit = 10, + filter = new Dictionary + { + ["$id"] = "4957", + ["classification"] = "MICROSOFT.PERSONAL.EMAIL", + ["includeSubClassifications"] = true + }, +}); +Response response = client.Query(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call Query and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +using RequestContent content = RequestContent.Create(new +{ + limit = 10, + filter = new Dictionary + { + ["$id"] = "5007", + ["collectionId"] = "collectionName" + }, +}); +Response response = client.Query(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call Query and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +using RequestContent content = RequestContent.Create(new +{ + filter = new Dictionary + { + ["$id"] = "5056", + ["objectType"] = "Tables" + }, + limit = 10, + facets = new object[] + { + new + { + facet = "assetType", + count = 10, + }, + new + { + facet = "classification", + count = 10, + }, + new + { + facet = "term", + count = 10, + }, + new + { + facet = "label", + count = 10, + } + }, +}); +Response response = client.Query(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call Query and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +using RequestContent content = RequestContent.Create(new +{ + limit = 10, + filter = new Dictionary + { + ["$id"] = "5186", + ["and"] = new object[] + { + new Dictionary + { + ["$id"] = "5187", + ["fileExtension"] = "txt" + } + } + }, +}); +Response response = client.Query(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call Query and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +using RequestContent content = RequestContent.Create(new +{ + keywords = "", + limit = 10, + filter = new Dictionary + { + ["$id"] = "5230", + ["and"] = new object[] + { + new Dictionary + { + ["$id"] = "5231", + ["objectType"] = "Glossary terms" + }, + new Dictionary + { + ["$id"] = "5232", + ["or"] = new object[] + { + new Dictionary + { + ["$id"] = "5233", + ["glossaryType"] = "AtlasGlossary" + }, + new Dictionary + { + ["$id"] = "5234", + ["glossaryType"] = "AtlasGlossaryTerm" + } + } + } + } + }, + facets = new object[] + { + new + { + facet = "termStatus", + count = 10, + sort = new + { + count = "desc", + }, + }, + new + { + facet = "termTemplate", + count = 10, + sort = new + { + count = "desc", + }, + } + }, +}); +Response response = client.Query(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call Query and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +using RequestContent content = RequestContent.Create(new +{ + limit = 10, + filter = new Dictionary + { + ["$id"] = "5302", + ["and"] = new object[] + { + new Dictionary + { + ["$id"] = "5303", + ["id"] = "bfecbcc3-1838-45fe-96d6-112de8a170f9" + } + } + }, +}); +Response response = client.Query(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call Query and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +using RequestContent content = RequestContent.Create(new +{ + limit = 10, + filter = new Dictionary + { + ["$id"] = "5331", + ["not"] = new Dictionary + { + ["$id"] = "5332", + ["classification"] = "MICROSOFT.SYSTEM.TEMP_FILE" + } + }, +}); +Response response = client.Query(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call Query and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +using RequestContent content = RequestContent.Create(new +{ + limit = 10, + filter = new Dictionary + { + ["$id"] = "5374", + ["or"] = new object[] + { + new Dictionary + { + ["$id"] = "5375", + ["objectType"] = "Dashboards" + }, + new Dictionary + { + ["$id"] = "5376", + ["objectType"] = "Data pipelines" + }, + new Dictionary + { + ["$id"] = "5377", + ["objectType"] = "Files" + }, + new Dictionary + { + ["$id"] = "5378", + ["objectType"] = "Folders" + }, + new Dictionary + { + ["$id"] = "5379", + ["objectType"] = "Glossary terms" + }, + new Dictionary + { + ["$id"] = "5380", + ["objectType"] = "Reports" + }, + new Dictionary + { + ["$id"] = "5381", + ["objectType"] = "Stored procedures" + }, + new Dictionary + { + ["$id"] = "5382", + ["objectType"] = "Tables" + } + } + }, +}); +Response response = client.Query(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call Query and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +using RequestContent content = RequestContent.Create(new +{ + keywords = "exampledata", + filter = new Dictionary + { + ["$id"] = "5420", + ["and"] = new object[] + { + new Dictionary + { + ["$id"] = "5421", + ["objectType"] = "Files" + }, + new Dictionary + { + ["$id"] = "5422", + ["entityType"] = "azure_blob_path" + } + } + }, + limit = 2, + continuationToken = "", + orderby = new object[] + { + new Dictionary + { + ["$id"] = "5427", + ["name"] = "ASC" + }, + new Dictionary + { + ["$id"] = "5429", + ["updateTime"] = "DESC" + } + }, + facets = new object[] + { + new + { + facet = "assetType", + count = 0, + sort = new + { + count = "desc", + }, + }, + new + { + facet = "classification", + count = 10, + sort = new + { + count = "desc", + }, + }, + new + { + facet = "contactId", + count = 10, + sort = new + { + count = "desc", + }, + }, + new + { + facet = "label", + count = 10, + sort = new + { + count = "desc", + }, + }, + new + { + facet = "term", + count = 10, + sort = new + { + count = "desc", + }, + } + }, +}); +Response response = client.Query(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call Query and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +using RequestContent content = RequestContent.Create(new +{ + keywords = "exampledata", + filter = new Dictionary + { + ["$id"] = "5507", + ["and"] = new object[] + { + new Dictionary + { + ["$id"] = "5508", + ["objectType"] = "Files" + }, + new Dictionary + { + ["$id"] = "5509", + ["entityType"] = "azure_blob_path" + } + } + }, + limit = 2, + orderby = new object[] + { + new Dictionary + { + ["$id"] = "5513", + ["name"] = "ASC" + }, + new Dictionary + { + ["$id"] = "5515", + ["updateTime"] = "DESC" + } + }, + facets = new object[] + { + new + { + facet = "assetType", + count = 0, + sort = new + { + count = "desc", + }, + }, + new + { + facet = "classification", + count = 10, + sort = new + { + count = "desc", + }, + }, + new + { + facet = "contactId", + count = 10, + sort = new + { + count = "desc", + }, + }, + new + { + facet = "label", + count = 10, + sort = new + { + count = "desc", + }, + }, + new + { + facet = "term", + count = 10, + sort = new + { + count = "desc", + }, + } + }, +}); +Response response = client.Query(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call Query and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); -QueryConfig body = new QueryConfig +using RequestContent content = RequestContent.Create(new { - Keywords = "", - Limit = 1234, - ContinuationToken = "", - Orderby = { BinaryData.FromObjectAsJson(new object()) }, - Filter = BinaryData.FromObjectAsJson(new object()), - Facets = {new SearchFacetItem + keywords = "exampledata", + filter = new Dictionary { - Count = 1234, - Facet = "", - Sort = new SearchFacetSort + ["$id"] = "5593", + ["and"] = new object[] + { + new Dictionary + { + ["$id"] = "5594", + ["objectType"] = "Files" + }, + new Dictionary + { + ["$id"] = "5595", + ["entityType"] = "azure_blob_path" + } + } + }, + limit = 2, + continuationToken = "", + orderby = new object[] + { + new Dictionary { - Count = SearchSortOrder.Ascend, - Value = SearchSortOrder.Ascend, + ["$id"] = "5600", + ["name"] = "ASC" }, - }}, - TaxonomySetting = new SearchTaxonomySetting + new Dictionary + { + ["$id"] = "5602", + ["updateTime"] = "DESC" + } + }, + facets = new object[] { - AssetTypes = { "" }, - Facet = default, + new + { + facet = "assetType", + count = 0, + sort = new + { + count = "desc", + }, + }, + new + { + facet = "classification", + count = 10, + sort = new + { + count = "desc", + }, + }, + new + { + facet = "contactId", + count = 10, + sort = new + { + count = "desc", + }, + }, + new + { + facet = "label", + count = 10, + sort = new + { + count = "desc", + }, + }, + new + { + facet = "term", + count = 10, + sort = new + { + count = "desc", + }, + } }, -}; -Response response = await client.QueryAsync(body); -]]> - - - -This sample shows how to call Query. -"); -TokenCredential credential = new DefaultAzureCredential(); -Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); +}); +Response response = client.Query(content); -QueryConfig body = new QueryConfig(); -Response response = client.Query(body); +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); ]]> -This sample shows how to call Query with all parameters. +This sample shows how to call Query and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); -QueryConfig body = new QueryConfig +using RequestContent content = RequestContent.Create(new { - Keywords = "", - Limit = 1234, - ContinuationToken = "", - Orderby = { BinaryData.FromObjectAsJson(new object()) }, - Filter = BinaryData.FromObjectAsJson(new object()), - Facets = {new SearchFacetItem + limit = 10, + filter = new Dictionary { - Count = 1234, - Facet = "", - Sort = new SearchFacetSort + ["$id"] = "5679", + ["or"] = new object[] { - Count = SearchSortOrder.Ascend, - Value = SearchSortOrder.Ascend, - }, - }}, - TaxonomySetting = new SearchTaxonomySetting - { - AssetTypes = { "" }, - Facet = default, + new Dictionary + { + ["$id"] = "5680", + ["createTime"] = new Dictionary + { + ["$id"] = "5681", + ["operator"] = "lt", + ["timeThreshold"] = 1545580800000L + } + }, + new Dictionary + { + ["$id"] = "5682", + ["updateTime"] = "LAST_24H|LAST_7D|LAST_30D|LAST_365D|MORE_THAN_365D" + } + } }, -}; -Response response = client.Query(body); -]]> - - - -This sample shows how to call QueryAsync and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); - -using RequestContent content = RequestContent.Create(new object()); -Response response = await client.QueryAsync(content); +}); +Response response = client.Query(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call QueryAsync with all request content and parse the result. +This sample shows how to call Query and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); using RequestContent content = RequestContent.Create(new { - keywords = "", - limit = 1234, - continuationToken = "", - orderby = new object[] + keywords = "exampledata", + filter = new Dictionary { - new object() - }, - filter = new object(), - facets = new object[] - { - new + ["$id"] = "5715", + ["and"] = new object[] { - count = 1234, - facet = "", - sort = new + new Dictionary + { + ["$id"] = "5716", + ["objectType"] = "Files" + }, + new Dictionary { - count = "asc", - value = "asc", + ["$id"] = "5717", + ["not"] = new Dictionary + { + ["$id"] = "5718", + ["or"] = new object[] + { + new Dictionary + { + ["$id"] = "5719", + ["attributeName"] = "size", + ["operator"] = "eq", + ["attributeValue"] = 0 + }, + new Dictionary + { + ["$id"] = "5720", + ["attributeName"] = "fileSize", + ["operator"] = "eq", + ["attributeValue"] = 0 + } + } + } }, + new Dictionary + { + ["$id"] = "5721", + ["not"] = new Dictionary + { + ["$id"] = "5722", + ["classification"] = "MICROSOFT.SYSTEM.TEMP_FILE" + } + } } }, + limit = 10, taxonomySetting = new { assetTypes = new object[] { - "" + "Azure Blob Storage" + }, + facet = new + { + count = 10, + sort = new + { + count = "desc", + }, }, }, }); -Response response = await client.QueryAsync(content); +Response response = client.Query(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("@search.count").ToString()); -Console.WriteLine(result.GetProperty("@search.count.approximate").ToString()); -Console.WriteLine(result.GetProperty("continuationToken").ToString()); -Console.WriteLine(result.GetProperty("@search.facets").GetProperty("entityType")[0].GetProperty("count").ToString()); -Console.WriteLine(result.GetProperty("@search.facets").GetProperty("entityType")[0].GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("@search.facets").GetProperty("assetType")[0].GetProperty("count").ToString()); -Console.WriteLine(result.GetProperty("@search.facets").GetProperty("assetType")[0].GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("@search.facets").GetProperty("classification")[0].GetProperty("count").ToString()); -Console.WriteLine(result.GetProperty("@search.facets").GetProperty("classification")[0].GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("@search.facets").GetProperty("term")[0].GetProperty("count").ToString()); -Console.WriteLine(result.GetProperty("@search.facets").GetProperty("term")[0].GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("@search.facets").GetProperty("contactId")[0].GetProperty("count").ToString()); -Console.WriteLine(result.GetProperty("@search.facets").GetProperty("contactId")[0].GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("@search.facets").GetProperty("contactType")[0].GetProperty("count").ToString()); -Console.WriteLine(result.GetProperty("@search.facets").GetProperty("contactType")[0].GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("@search.facets").GetProperty("label")[0].GetProperty("count").ToString()); -Console.WriteLine(result.GetProperty("@search.facets").GetProperty("label")[0].GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("@search.facets").GetProperty("glossaryType")[0].GetProperty("count").ToString()); -Console.WriteLine(result.GetProperty("@search.facets").GetProperty("glossaryType")[0].GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("@search.facets").GetProperty("termStatus")[0].GetProperty("count").ToString()); -Console.WriteLine(result.GetProperty("@search.facets").GetProperty("termStatus")[0].GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("@search.facets").GetProperty("termTemplate")[0].GetProperty("count").ToString()); -Console.WriteLine(result.GetProperty("@search.facets").GetProperty("termTemplate")[0].GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("@search.score").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("@search.highlights").GetProperty("id")[0].ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("@search.highlights").GetProperty("qualifiedName")[0].ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("@search.highlights").GetProperty("name")[0].ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("@search.highlights").GetProperty("description")[0].ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("@search.highlights").GetProperty("entityType")[0].ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("objectType").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("qualifiedName").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("entityType").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("endorsement").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("owner").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("classification")[0].ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("label")[0].ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("term")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("term")[0].GetProperty("glossaryName").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("term")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("contact")[0].GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("contact")[0].GetProperty("info").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("contact")[0].GetProperty("contactType").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("assetType")[0].ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("glossaryType").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("glossary").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("termStatus").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("termTemplate")[0].ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("longDescription").ToString()); -]]> - - - +Console.WriteLine(result.ToString()); +]]> This sample shows how to call Query and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); -using RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new +{ + keywords = "", + limit = 3, + filter = new Dictionary + { + ["$id"] = "5776", + ["or"] = new object[] + { + new Dictionary + { + ["$id"] = "5777", + ["term"] = "ExampleTerm" + }, + new Dictionary + { + ["$id"] = "5778", + ["term"] = "ExampleTerm", + ["glossary"] = "GlossaryName" + }, + new Dictionary + { + ["$id"] = "5779", + ["termGuid"] = "" + } + } + }, +}); Response response = client.Query(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call Query with all request content and parse the result. +This sample shows how to call Query and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); using RequestContent content = RequestContent.Create(new { - keywords = "", - limit = 1234, - continuationToken = "", - orderby = new object[] - { - new object() - }, - filter = new object(), - facets = new object[] + limit = 10, + filter = new Dictionary { - new + ["$id"] = "5812", + ["and"] = new object[] { - count = 1234, - facet = "", - sort = new + new Dictionary { - count = "asc", - value = "asc", - }, + ["$id"] = "5813", + ["entityType"] = "azure_blob_path", + ["includeSubTypes"] = false + } } }, - taxonomySetting = new - { - assetTypes = new object[] - { - "" - }, - }, }); Response response = client.Query(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("@search.count").ToString()); -Console.WriteLine(result.GetProperty("@search.count.approximate").ToString()); -Console.WriteLine(result.GetProperty("continuationToken").ToString()); -Console.WriteLine(result.GetProperty("@search.facets").GetProperty("entityType")[0].GetProperty("count").ToString()); -Console.WriteLine(result.GetProperty("@search.facets").GetProperty("entityType")[0].GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("@search.facets").GetProperty("assetType")[0].GetProperty("count").ToString()); -Console.WriteLine(result.GetProperty("@search.facets").GetProperty("assetType")[0].GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("@search.facets").GetProperty("classification")[0].GetProperty("count").ToString()); -Console.WriteLine(result.GetProperty("@search.facets").GetProperty("classification")[0].GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("@search.facets").GetProperty("term")[0].GetProperty("count").ToString()); -Console.WriteLine(result.GetProperty("@search.facets").GetProperty("term")[0].GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("@search.facets").GetProperty("contactId")[0].GetProperty("count").ToString()); -Console.WriteLine(result.GetProperty("@search.facets").GetProperty("contactId")[0].GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("@search.facets").GetProperty("contactType")[0].GetProperty("count").ToString()); -Console.WriteLine(result.GetProperty("@search.facets").GetProperty("contactType")[0].GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("@search.facets").GetProperty("label")[0].GetProperty("count").ToString()); -Console.WriteLine(result.GetProperty("@search.facets").GetProperty("label")[0].GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("@search.facets").GetProperty("glossaryType")[0].GetProperty("count").ToString()); -Console.WriteLine(result.GetProperty("@search.facets").GetProperty("glossaryType")[0].GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("@search.facets").GetProperty("termStatus")[0].GetProperty("count").ToString()); -Console.WriteLine(result.GetProperty("@search.facets").GetProperty("termStatus")[0].GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("@search.facets").GetProperty("termTemplate")[0].GetProperty("count").ToString()); -Console.WriteLine(result.GetProperty("@search.facets").GetProperty("termTemplate")[0].GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("@search.score").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("@search.highlights").GetProperty("id")[0].ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("@search.highlights").GetProperty("qualifiedName")[0].ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("@search.highlights").GetProperty("name")[0].ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("@search.highlights").GetProperty("description")[0].ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("@search.highlights").GetProperty("entityType")[0].ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("objectType").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("qualifiedName").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("entityType").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("endorsement").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("owner").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("classification")[0].ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("label")[0].ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("term")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("term")[0].GetProperty("glossaryName").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("term")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("contact")[0].GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("contact")[0].GetProperty("info").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("contact")[0].GetProperty("contactType").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("assetType")[0].ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("glossaryType").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("glossary").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("termStatus").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("termTemplate")[0].ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("longDescription").ToString()); +Console.WriteLine(result.ToString()); ]]> This sample shows how to call SuggestAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); - -SuggestConfig body = new SuggestConfig(); -Response response = await client.SuggestAsync(body); -]]> -This sample shows how to call SuggestAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); SuggestConfig body = new SuggestConfig { - Keywords = "", - Limit = 1234, - Filter = BinaryData.FromObjectAsJson(new object()), + Keywords = "exampledata", + Limit = 10, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "5869", + ["and"] = new object[] + { + new Dictionary + { + ["$id"] = "5870", + ["entityType"] = "azure_blob_path", + ["includeSubTypes"] = false + } + } + }), }; Response response = await client.SuggestAsync(body); ]]> @@ -335,24 +4558,27 @@ Response response = await client.SuggestAsync(body); This sample shows how to call Suggest. "); -TokenCredential credential = new DefaultAzureCredential(); -Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); - -SuggestConfig body = new SuggestConfig(); -Response response = client.Suggest(body); -]]> -This sample shows how to call Suggest with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); SuggestConfig body = new SuggestConfig { - Keywords = "", - Limit = 1234, - Filter = BinaryData.FromObjectAsJson(new object()), + Keywords = "exampledata", + Limit = 10, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "5869", + ["and"] = new object[] + { + new Dictionary + { + ["$id"] = "5870", + ["entityType"] = "azure_blob_path", + ["includeSubTypes"] = false + } + } + }), }; Response response = client.Suggest(body); ]]> @@ -361,138 +4587,91 @@ Response response = client.Suggest(body); This sample shows how to call SuggestAsync and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); - -using RequestContent content = RequestContent.Create(new object()); -Response response = await client.SuggestAsync(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.ToString()); -]]> -This sample shows how to call SuggestAsync with all request content and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); using RequestContent content = RequestContent.Create(new { - keywords = "", - limit = 1234, - filter = new object(), + keywords = "exampledata", + filter = new Dictionary + { + ["$id"] = "5869", + ["and"] = new object[] + { + new Dictionary + { + ["$id"] = "5870", + ["entityType"] = "azure_blob_path", + ["includeSubTypes"] = false + } + } + }, + limit = 10, }); Response response = await client.SuggestAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("value")[0].GetProperty("@search.score").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("@search.text").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("objectType").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("qualifiedName").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("entityType").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("endorsement").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("owner").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("classification")[0].ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("label")[0].ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("term")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("term")[0].GetProperty("glossaryName").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("term")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("contact")[0].GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("contact")[0].GetProperty("info").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("contact")[0].GetProperty("contactType").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("assetType")[0].ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("glossaryType").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("glossary").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("termStatus").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("termTemplate")[0].ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("longDescription").ToString()); +Console.WriteLine(result.ToString()); ]]> This sample shows how to call Suggest and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); - -using RequestContent content = RequestContent.Create(new object()); -Response response = client.Suggest(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.ToString()); -]]> -This sample shows how to call Suggest with all request content and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); using RequestContent content = RequestContent.Create(new { - keywords = "", - limit = 1234, - filter = new object(), + keywords = "exampledata", + filter = new Dictionary + { + ["$id"] = "5869", + ["and"] = new object[] + { + new Dictionary + { + ["$id"] = "5870", + ["entityType"] = "azure_blob_path", + ["includeSubTypes"] = false + } + } + }, + limit = 10, }); Response response = client.Suggest(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("value")[0].GetProperty("@search.score").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("@search.text").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("objectType").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("qualifiedName").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("entityType").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("endorsement").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("owner").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("classification")[0].ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("label")[0].ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("term")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("term")[0].GetProperty("glossaryName").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("term")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("contact")[0].GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("contact")[0].GetProperty("info").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("contact")[0].GetProperty("contactType").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("assetType")[0].ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("glossaryType").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("glossary").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("termStatus").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("termTemplate")[0].ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("longDescription").ToString()); +Console.WriteLine(result.ToString()); ]]> This sample shows how to call AutoCompleteAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); - -AutoCompleteConfig body = new AutoCompleteConfig(); -Response response = await client.AutoCompleteAsync(body); -]]> -This sample shows how to call AutoCompleteAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); AutoCompleteConfig body = new AutoCompleteConfig { - Keywords = "", - Limit = 1234, - Filter = BinaryData.FromObjectAsJson(new object()), + Keywords = "exa", + Limit = 10, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "5924", + ["and"] = new object[] + { + new Dictionary + { + ["$id"] = "5925", + ["entityType"] = "azure_blob_path", + ["includeSubTypes"] = false + } + } + }), }; Response response = await client.AutoCompleteAsync(body); ]]> @@ -501,24 +4680,27 @@ Response response = await client.AutoCompleteAsync(body); This sample shows how to call AutoComplete. "); -TokenCredential credential = new DefaultAzureCredential(); -Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); - -AutoCompleteConfig body = new AutoCompleteConfig(); -Response response = client.AutoComplete(body); -]]> -This sample shows how to call AutoComplete with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); AutoCompleteConfig body = new AutoCompleteConfig { - Keywords = "", - Limit = 1234, - Filter = BinaryData.FromObjectAsJson(new object()), + Keywords = "exa", + Limit = 10, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "5924", + ["and"] = new object[] + { + new Dictionary + { + ["$id"] = "5925", + ["entityType"] = "azure_blob_path", + ["includeSubTypes"] = false + } + } + }), }; Response response = client.AutoComplete(body); ]]> @@ -527,66 +4709,64 @@ Response response = client.AutoComplete(body); This sample shows how to call AutoCompleteAsync and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); - -using RequestContent content = RequestContent.Create(new object()); -Response response = await client.AutoCompleteAsync(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.ToString()); -]]> -This sample shows how to call AutoCompleteAsync with all request content and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); using RequestContent content = RequestContent.Create(new { - keywords = "", - limit = 1234, - filter = new object(), + keywords = "exa", + filter = new Dictionary + { + ["$id"] = "5924", + ["and"] = new object[] + { + new Dictionary + { + ["$id"] = "5925", + ["entityType"] = "azure_blob_path", + ["includeSubTypes"] = false + } + } + }, + limit = 10, }); Response response = await client.AutoCompleteAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("value")[0].GetProperty("text").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("queryPlusText").ToString()); +Console.WriteLine(result.ToString()); ]]> This sample shows how to call AutoComplete and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); - -using RequestContent content = RequestContent.Create(new object()); -Response response = client.AutoComplete(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.ToString()); -]]> -This sample shows how to call AutoComplete with all request content and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); using RequestContent content = RequestContent.Create(new { - keywords = "", - limit = 1234, - filter = new object(), + keywords = "exa", + filter = new Dictionary + { + ["$id"] = "5924", + ["and"] = new object[] + { + new Dictionary + { + ["$id"] = "5925", + ["entityType"] = "azure_blob_path", + ["includeSubTypes"] = false + } + } + }, + limit = 10, }); Response response = client.AutoComplete(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("value")[0].GetProperty("text").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("queryPlusText").ToString()); +Console.WriteLine(result.ToString()); ]]> diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/Entity.xml b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/Entity.xml index 710a1ffe5853..217187c7c1ae 100644 --- a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/Entity.xml +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/Entity.xml @@ -5,1554 +5,1095 @@ This sample shows how to call CreateOrUpdateAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); -AtlasEntityWithExtInfo body = new AtlasEntityWithExtInfo(); +AtlasEntityWithExtInfo body = new AtlasEntityWithExtInfo +{ + ReferredEntities = { }, + Entity = new AtlasEntity + { + Attributes = + { + ["owner"] = BinaryData.FromObjectAsJson("ExampleOwner"), + ["modifiedTime"] = BinaryData.FromObjectAsJson(0), + ["createTime"] = BinaryData.FromObjectAsJson(0), + ["qualifiedName"] = BinaryData.FromObjectAsJson("https://exampleaccount.core.windows.net"), + ["name"] = BinaryData.FromObjectAsJson("ExampleStorageAccount"), + ["description"] = null, + ["publicAccessLevel"] = null + }, + TypeName = "azure_storage_account", + CustomAttributes = + { + ["custAttr1"] = "attr1", + ["custAttr2"] = "attr2" + }, + }, +}; Response response = await client.CreateOrUpdateAsync(body); ]]> -This sample shows how to call CreateOrUpdateAsync with all parameters. +This sample shows how to call CreateOrUpdateAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); AtlasEntityWithExtInfo body = new AtlasEntityWithExtInfo { - ReferredEntities = + ReferredEntities = { }, + Entity = new AtlasEntity { - ["key"] = new AtlasEntity + Attributes = { - Attributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - TypeName = "", - LastModifiedTS = "", - BusinessAttributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - Classifications = {new AtlasClassification + ["owner"] = BinaryData.FromObjectAsJson("ExampleOwner"), + ["modifiedTime"] = BinaryData.FromObjectAsJson(0), + ["createTime"] = BinaryData.FromObjectAsJson(0), + ["qualifiedName"] = BinaryData.FromObjectAsJson("https://exampleaccount.core.windows.net"), + ["name"] = BinaryData.FromObjectAsJson("ExampleStorageAccount"), + ["description"] = null, + ["publicAccessLevel"] = null + }, + TypeName = "azure_storage_account", + CreatedBy = "ExampleCreator", + Status = EntityStatus.Active, + UpdatedBy = "ExampleUpdator", + Version = 0, + Contacts = + { + ["Expert"] = {new ContactInfo { - Attributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - TypeName = "", - LastModifiedTS = "", - EntityGuid = "", - EntityStatus = EntityStatus.Active, - RemovePropagationsOnEntityDelete = true, - ValidityPeriods = {new TimeBoundary - { - EndTime = "", - StartTime = "", - TimeZone = "", - }}, + Id = "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", + Info = "Example Expert Info", }}, - CreateTime = 1234L, - CreatedBy = "", - CustomAttributes = + ["Owner"] = {new ContactInfo { - ["key"] = "" - }, - Guid = "", - HomeId = "", - IsIncomplete = true, - Labels = {""}, - Meanings = {new AtlasTermAssignmentHeader + Id = "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", + Info = "Example Owner Info", + }} + }, + }, +}; +Response response = await client.CreateOrUpdateAsync(body); +]]> +This sample shows how to call CreateOrUpdateAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); + +AtlasEntityWithExtInfo body = new AtlasEntityWithExtInfo +{ + ReferredEntities = { }, + Entity = new AtlasEntity + { + Attributes = + { + ["owner"] = BinaryData.FromObjectAsJson("ExampleOwner"), + ["modifiedTime"] = BinaryData.FromObjectAsJson(0), + ["createTime"] = BinaryData.FromObjectAsJson(0), + ["qualifiedName"] = BinaryData.FromObjectAsJson("https://exampleaccount.core.windows.net"), + ["name"] = BinaryData.FromObjectAsJson("ExampleStorageAccount"), + ["description"] = null, + ["userDescription"] = BinaryData.FromObjectAsJson("
testing
"), + ["publicAccessLevel"] = null + }, + TypeName = "azure_storage_account", + CreatedBy = "ExampleCreator", + CustomAttributes = + { + ["microsoft_isDescriptionRichText"] = "true" + }, + Status = EntityStatus.Active, + UpdatedBy = "ExampleUpdator", + Version = 0, + }, +}; +Response response = await client.CreateOrUpdateAsync(body); +]]>
+This sample shows how to call CreateOrUpdateAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); + +AtlasEntityWithExtInfo body = new AtlasEntityWithExtInfo +{ + ReferredEntities = { }, + Entity = new AtlasEntity + { + Attributes = + { + ["owner"] = BinaryData.FromObjectAsJson("ExampleOwner"), + ["modifiedTime"] = BinaryData.FromObjectAsJson(0), + ["createTime"] = BinaryData.FromObjectAsJson(0), + ["qualifiedName"] = BinaryData.FromObjectAsJson("exampleaccount"), + ["name"] = BinaryData.FromObjectAsJson("ExampleStorageAccount"), + ["description"] = null, + ["publicAccessLevel"] = null + }, + TypeName = "azure_storage_account", + CreatedBy = "ExampleCreator", + Status = EntityStatus.Active, + UpdatedBy = "ExampleUpdator", + Version = 0, + Contacts = + { + ["Expert"] = {new ContactInfo { - Confidence = 1234, - CreatedBy = "", - Description = "", - DisplayText = "", - Expression = "", - RelationGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), - Status = AtlasTermAssignmentStatus.Discovered, - Steward = "", - TermGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), + Id = "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", + Info = "Example Expert Info", }}, - ProvenanceType = 1234, - Proxy = true, - RelationshipAttributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - Status = EntityStatus.Active, - UpdateTime = 1234L, - UpdatedBy = "", - Version = 1234L, - Contacts = + ["Owner"] = {new ContactInfo { - ["key"] = {new ContactInfo - { - Id = "", - Info = "", - }} - }, - } + Id = "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", + Info = "Example Owner Info", + }} + }, }, - Entity = default, }; -Response response = await client.CreateOrUpdateAsync(body, businessAttributeUpdateBehavior: BusinessAttributeUpdateBehavior.Ignore, collectionId: ""); +Response response = await client.CreateOrUpdateAsync(body); ]]>
This sample shows how to call CreateOrUpdate. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); -AtlasEntityWithExtInfo body = new AtlasEntityWithExtInfo(); +AtlasEntityWithExtInfo body = new AtlasEntityWithExtInfo +{ + ReferredEntities = { }, + Entity = new AtlasEntity + { + Attributes = + { + ["owner"] = BinaryData.FromObjectAsJson("ExampleOwner"), + ["modifiedTime"] = BinaryData.FromObjectAsJson(0), + ["createTime"] = BinaryData.FromObjectAsJson(0), + ["qualifiedName"] = BinaryData.FromObjectAsJson("https://exampleaccount.core.windows.net"), + ["name"] = BinaryData.FromObjectAsJson("ExampleStorageAccount"), + ["description"] = null, + ["publicAccessLevel"] = null + }, + TypeName = "azure_storage_account", + CustomAttributes = + { + ["custAttr1"] = "attr1", + ["custAttr2"] = "attr2" + }, + }, +}; Response response = client.CreateOrUpdate(body); ]]> -This sample shows how to call CreateOrUpdate with all parameters. +This sample shows how to call CreateOrUpdate. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); AtlasEntityWithExtInfo body = new AtlasEntityWithExtInfo { - ReferredEntities = + ReferredEntities = { }, + Entity = new AtlasEntity { - ["key"] = new AtlasEntity + Attributes = { - Attributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - TypeName = "", - LastModifiedTS = "", - BusinessAttributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - Classifications = {new AtlasClassification + ["owner"] = BinaryData.FromObjectAsJson("ExampleOwner"), + ["modifiedTime"] = BinaryData.FromObjectAsJson(0), + ["createTime"] = BinaryData.FromObjectAsJson(0), + ["qualifiedName"] = BinaryData.FromObjectAsJson("https://exampleaccount.core.windows.net"), + ["name"] = BinaryData.FromObjectAsJson("ExampleStorageAccount"), + ["description"] = null, + ["publicAccessLevel"] = null + }, + TypeName = "azure_storage_account", + CreatedBy = "ExampleCreator", + Status = EntityStatus.Active, + UpdatedBy = "ExampleUpdator", + Version = 0, + Contacts = + { + ["Expert"] = {new ContactInfo { - Attributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - TypeName = "", - LastModifiedTS = "", - EntityGuid = "", - EntityStatus = EntityStatus.Active, - RemovePropagationsOnEntityDelete = true, - ValidityPeriods = {new TimeBoundary - { - EndTime = "", - StartTime = "", - TimeZone = "", - }}, + Id = "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", + Info = "Example Expert Info", }}, - CreateTime = 1234L, - CreatedBy = "", - CustomAttributes = + ["Owner"] = {new ContactInfo { - ["key"] = "" - }, - Guid = "", - HomeId = "", - IsIncomplete = true, - Labels = {""}, - Meanings = {new AtlasTermAssignmentHeader + Id = "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", + Info = "Example Owner Info", + }} + }, + }, +}; +Response response = client.CreateOrUpdate(body); +]]> +This sample shows how to call CreateOrUpdate. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); + +AtlasEntityWithExtInfo body = new AtlasEntityWithExtInfo +{ + ReferredEntities = { }, + Entity = new AtlasEntity + { + Attributes = + { + ["owner"] = BinaryData.FromObjectAsJson("ExampleOwner"), + ["modifiedTime"] = BinaryData.FromObjectAsJson(0), + ["createTime"] = BinaryData.FromObjectAsJson(0), + ["qualifiedName"] = BinaryData.FromObjectAsJson("https://exampleaccount.core.windows.net"), + ["name"] = BinaryData.FromObjectAsJson("ExampleStorageAccount"), + ["description"] = null, + ["userDescription"] = BinaryData.FromObjectAsJson("
testing
"), + ["publicAccessLevel"] = null + }, + TypeName = "azure_storage_account", + CreatedBy = "ExampleCreator", + CustomAttributes = + { + ["microsoft_isDescriptionRichText"] = "true" + }, + Status = EntityStatus.Active, + UpdatedBy = "ExampleUpdator", + Version = 0, + }, +}; +Response response = client.CreateOrUpdate(body); +]]>
+This sample shows how to call CreateOrUpdate. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); + +AtlasEntityWithExtInfo body = new AtlasEntityWithExtInfo +{ + ReferredEntities = { }, + Entity = new AtlasEntity + { + Attributes = + { + ["owner"] = BinaryData.FromObjectAsJson("ExampleOwner"), + ["modifiedTime"] = BinaryData.FromObjectAsJson(0), + ["createTime"] = BinaryData.FromObjectAsJson(0), + ["qualifiedName"] = BinaryData.FromObjectAsJson("exampleaccount"), + ["name"] = BinaryData.FromObjectAsJson("ExampleStorageAccount"), + ["description"] = null, + ["publicAccessLevel"] = null + }, + TypeName = "azure_storage_account", + CreatedBy = "ExampleCreator", + Status = EntityStatus.Active, + UpdatedBy = "ExampleUpdator", + Version = 0, + Contacts = + { + ["Expert"] = {new ContactInfo { - Confidence = 1234, - CreatedBy = "", - Description = "", - DisplayText = "", - Expression = "", - RelationGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), - Status = AtlasTermAssignmentStatus.Discovered, - Steward = "", - TermGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), + Id = "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", + Info = "Example Expert Info", }}, - ProvenanceType = 1234, - Proxy = true, - RelationshipAttributes = + ["Owner"] = {new ContactInfo { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - Status = EntityStatus.Active, - UpdateTime = 1234L, - UpdatedBy = "", - Version = 1234L, - Contacts = - { - ["key"] = {new ContactInfo - { - Id = "", - Info = "", - }} - }, - } + Id = "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", + Info = "Example Owner Info", + }} + }, }, - Entity = default, }; -Response response = client.CreateOrUpdate(body, businessAttributeUpdateBehavior: BusinessAttributeUpdateBehavior.Ignore, collectionId: ""); +Response response = client.CreateOrUpdate(body); ]]>
This sample shows how to call CreateOrUpdateAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); -using RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new +{ + referredEntities = new object(), + entity = new + { + typeName = "azure_storage_account", + attributes = new + { + owner = "ExampleOwner", + modifiedTime = 0, + createTime = 0, + qualifiedName = "https://exampleaccount.core.windows.net", + name = "ExampleStorageAccount", + }, + customAttributes = new + { + custAttr1 = "attr1", + custAttr2 = "attr2", + }, + }, +}); Response response = await client.CreateOrUpdateAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateOrUpdateAsync with all parameters and request content and parse the result. +This sample shows how to call CreateOrUpdateAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); using RequestContent content = RequestContent.Create(new { - referredEntities = new + referredEntities = new object(), + entity = new { - key = new + typeName = "azure_storage_account", + attributes = new { - attributes = new - { - key = new object(), - }, - typeName = "", - lastModifiedTS = "", - businessAttributes = new - { - key = new object(), - }, - classifications = new object[] + owner = "ExampleOwner", + modifiedTime = 0, + createTime = 0, + qualifiedName = "https://exampleaccount.core.windows.net", + name = "ExampleStorageAccount", + }, + contacts = new + { + Expert = new object[] { new { - attributes = new - { - key = new object(), - }, - typeName = "", - lastModifiedTS = "", - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new object[] - { - new - { - endTime = "", - startTime = "", - timeZone = "", - } - }, + id = "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", + info = "Example Expert Info", } }, - createTime = 1234L, - createdBy = "", - customAttributes = new - { - key = "", - }, - guid = "", - homeId = "", - isIncomplete = true, - labels = new object[] - { - "" - }, - meanings = new object[] + Owner = new object[] { new { - confidence = 1234, - createdBy = "", - description = "", - displayText = "", - expression = "", - relationGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", - status = "DISCOVERED", - steward = "", - termGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", + id = "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", + info = "Example Owner Info", } }, - provenanceType = 1234, - proxy = true, - relationshipAttributes = new + }, + status = "ACTIVE", + createdBy = "ExampleCreator", + updatedBy = "ExampleUpdator", + version = 0, + }, +}); +Response response = await client.CreateOrUpdateAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call CreateOrUpdateAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); + +using RequestContent content = RequestContent.Create(new +{ + referredEntities = new object(), + entity = new + { + typeName = "azure_storage_account", + attributes = new + { + owner = "ExampleOwner", + modifiedTime = 0, + createTime = 0, + qualifiedName = "https://exampleaccount.core.windows.net", + name = "ExampleStorageAccount", + userDescription = "
testing
", + }, + customAttributes = new + { + microsoft_isDescriptionRichText = "true", + }, + status = "ACTIVE", + createdBy = "ExampleCreator", + updatedBy = "ExampleUpdator", + version = 0, + }, +}); +Response response = await client.CreateOrUpdateAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]>
+This sample shows how to call CreateOrUpdateAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); + +using RequestContent content = RequestContent.Create(new +{ + referredEntities = new object(), + entity = new + { + typeName = "azure_storage_account", + attributes = new + { + owner = "ExampleOwner", + modifiedTime = 0, + createTime = 0, + qualifiedName = "exampleaccount", + name = "ExampleStorageAccount", + }, + contacts = new + { + Expert = new object[] { - key = new object(), + new + { + id = "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", + info = "Example Expert Info", + } }, - status = "ACTIVE", - updateTime = 1234L, - updatedBy = "", - version = 1234L, - contacts = new + Owner = new object[] { - key = new object[] + new { - new - { - id = "", - info = "", - } - }, + id = "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", + info = "Example Owner Info", + } }, }, + status = "ACTIVE", + createdBy = "ExampleCreator", + updatedBy = "ExampleUpdator", + version = 0, }, }); -Response response = await client.CreateOrUpdateAsync(content, businessAttributeUpdateBehavior: "ignore", collectionId: ""); +Response response = await client.CreateOrUpdateAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meaningNames")[0].ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); +Console.WriteLine(result.ToString()); ]]>
This sample shows how to call CreateOrUpdate and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); -using RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new +{ + referredEntities = new object(), + entity = new + { + typeName = "azure_storage_account", + attributes = new + { + owner = "ExampleOwner", + modifiedTime = 0, + createTime = 0, + qualifiedName = "https://exampleaccount.core.windows.net", + name = "ExampleStorageAccount", + }, + customAttributes = new + { + custAttr1 = "attr1", + custAttr2 = "attr2", + }, + }, +}); Response response = client.CreateOrUpdate(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateOrUpdate with all parameters and request content and parse the result. +This sample shows how to call CreateOrUpdate and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); using RequestContent content = RequestContent.Create(new { - referredEntities = new + referredEntities = new object(), + entity = new { - key = new + typeName = "azure_storage_account", + attributes = new { - attributes = new - { - key = new object(), - }, - typeName = "", - lastModifiedTS = "", - businessAttributes = new - { - key = new object(), - }, - classifications = new object[] + owner = "ExampleOwner", + modifiedTime = 0, + createTime = 0, + qualifiedName = "https://exampleaccount.core.windows.net", + name = "ExampleStorageAccount", + }, + contacts = new + { + Expert = new object[] { new { - attributes = new - { - key = new object(), - }, - typeName = "", - lastModifiedTS = "", - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new object[] - { - new - { - endTime = "", - startTime = "", - timeZone = "", - } - }, + id = "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", + info = "Example Expert Info", } }, - createTime = 1234L, - createdBy = "", - customAttributes = new - { - key = "", - }, - guid = "", - homeId = "", - isIncomplete = true, - labels = new object[] - { - "" - }, - meanings = new object[] + Owner = new object[] { new { - confidence = 1234, - createdBy = "", - description = "", - displayText = "", - expression = "", - relationGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", - status = "DISCOVERED", - steward = "", - termGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", + id = "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", + info = "Example Owner Info", } }, - provenanceType = 1234, - proxy = true, - relationshipAttributes = new + }, + status = "ACTIVE", + createdBy = "ExampleCreator", + updatedBy = "ExampleUpdator", + version = 0, + }, +}); +Response response = client.CreateOrUpdate(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call CreateOrUpdate and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); + +using RequestContent content = RequestContent.Create(new +{ + referredEntities = new object(), + entity = new + { + typeName = "azure_storage_account", + attributes = new + { + owner = "ExampleOwner", + modifiedTime = 0, + createTime = 0, + qualifiedName = "https://exampleaccount.core.windows.net", + name = "ExampleStorageAccount", + userDescription = "
testing
", + }, + customAttributes = new + { + microsoft_isDescriptionRichText = "true", + }, + status = "ACTIVE", + createdBy = "ExampleCreator", + updatedBy = "ExampleUpdator", + version = 0, + }, +}); +Response response = client.CreateOrUpdate(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]>
+This sample shows how to call CreateOrUpdate and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); + +using RequestContent content = RequestContent.Create(new +{ + referredEntities = new object(), + entity = new + { + typeName = "azure_storage_account", + attributes = new + { + owner = "ExampleOwner", + modifiedTime = 0, + createTime = 0, + qualifiedName = "exampleaccount", + name = "ExampleStorageAccount", + }, + contacts = new + { + Expert = new object[] { - key = new object(), + new + { + id = "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", + info = "Example Expert Info", + } }, - status = "ACTIVE", - updateTime = 1234L, - updatedBy = "", - version = 1234L, - contacts = new + Owner = new object[] { - key = new object[] + new { - new - { - id = "", - info = "", - } - }, + id = "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", + info = "Example Owner Info", + } }, }, + status = "ACTIVE", + createdBy = "ExampleCreator", + updatedBy = "ExampleUpdator", + version = 0, }, }); -Response response = client.CreateOrUpdate(content, businessAttributeUpdateBehavior: "ignore", collectionId: ""); +Response response = client.CreateOrUpdate(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meaningNames")[0].ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); +Console.WriteLine(result.ToString()); ]]>
This sample shows how to call GetByIdsAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -Response response = await client.GetByIdsAsync(new string[] { "" }); -]]> -This sample shows how to call GetByIdsAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); - -Response response = await client.GetByIdsAsync(new string[] { "" }, minExtInfo: true, ignoreRelationships: true); +Response response = await client.GetByIdsAsync(new string[] { "784c0f2f-afd2-e26b-f9cb-984f6c2c5021", "b4ebc8be-cef4-860a-bee9-28cc34cb5caa" }); ]]> This sample shows how to call GetByIds. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -Response response = client.GetByIds(new string[] { "" }); -]]> -This sample shows how to call GetByIds with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); - -Response response = client.GetByIds(new string[] { "" }, minExtInfo: true, ignoreRelationships: true); +Response response = client.GetByIds(new string[] { "784c0f2f-afd2-e26b-f9cb-984f6c2c5021", "b4ebc8be-cef4-860a-bee9-28cc34cb5caa" }); ]]> This sample shows how to call GetByIdsAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -Response response = await client.GetByIdsAsync(new string[] { "" }, null, null, null); +Response response = await client.GetByIdsAsync(new string[] { "784c0f2f-afd2-e26b-f9cb-984f6c2c5021", "b4ebc8be-cef4-860a-bee9-28cc34cb5caa" }, true, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetByIdsAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); - -Response response = await client.GetByIdsAsync(new string[] { "" }, true, true, null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("businessAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("customAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("homeId").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("collectionId").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("provenanceType").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("proxy").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("relationshipAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("businessAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("customAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("homeId").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("collectionId").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("provenanceType").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("proxy").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("relationshipAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); ]]> This sample shows how to call GetByIds and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -Response response = client.GetByIds(new string[] { "" }, null, null, null); +Response response = client.GetByIds(new string[] { "784c0f2f-afd2-e26b-f9cb-984f6c2c5021", "b4ebc8be-cef4-860a-bee9-28cc34cb5caa" }, true, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetByIds with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); - -Response response = client.GetByIds(new string[] { "" }, true, true, null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("businessAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("customAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("homeId").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("collectionId").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("provenanceType").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("proxy").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("relationshipAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("businessAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("customAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("homeId").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("collectionId").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("provenanceType").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("proxy").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("relationshipAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); ]]> This sample shows how to call BatchCreateOrUpdateAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -AtlasEntitiesWithExtInfo body = new AtlasEntitiesWithExtInfo(); -Response response = await client.BatchCreateOrUpdateAsync(body); -]]> -This sample shows how to call BatchCreateOrUpdateAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); - AtlasEntitiesWithExtInfo body = new AtlasEntitiesWithExtInfo { - ReferredEntities = + ReferredEntities = { }, + Entities = {new AtlasEntity { - ["key"] = new AtlasEntity + Attributes = { - Attributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - TypeName = "", - LastModifiedTS = "", - BusinessAttributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - Classifications = {new AtlasClassification + ["owner"] = BinaryData.FromObjectAsJson("ExampleOwner"), + ["modifiedTime"] = BinaryData.FromObjectAsJson(0), + ["createTime"] = BinaryData.FromObjectAsJson(0), + ["qualifiedName"] = BinaryData.FromObjectAsJson("exampleaccount1"), + ["name"] = BinaryData.FromObjectAsJson("ExampleStorageAccount1"), + ["description"] = null, + ["publicAccessLevel"] = null + }, + TypeName = "azure_storage_account", + CreatedBy = "ExampleCreator", + Status = EntityStatus.Active, + UpdatedBy = "ExampleUpdator", + Version = 0, + Contacts = + { + ["Expert"] = {new ContactInfo { - Attributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - TypeName = "", - LastModifiedTS = "", - EntityGuid = "", - EntityStatus = EntityStatus.Active, - RemovePropagationsOnEntityDelete = true, - ValidityPeriods = {new TimeBoundary - { - EndTime = "", - StartTime = "", - TimeZone = "", - }}, + Id = "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", + Info = "Example Expert Info", }}, - CreateTime = 1234L, - CreatedBy = "", - CustomAttributes = + ["Owner"] = {new ContactInfo { - ["key"] = "" - }, - Guid = "", - HomeId = "", - IsIncomplete = true, - Labels = {""}, - Meanings = {new AtlasTermAssignmentHeader + Id = "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", + Info = "Example Owner Info", + }} + }, + }, new AtlasEntity + { + Attributes = + { + ["owner"] = BinaryData.FromObjectAsJson("ExampleOwner"), + ["modifiedTime"] = BinaryData.FromObjectAsJson(0), + ["createTime"] = BinaryData.FromObjectAsJson(0), + ["qualifiedName"] = BinaryData.FromObjectAsJson("exampleaccount2"), + ["name"] = BinaryData.FromObjectAsJson("ExampleStorageAccount2"), + ["description"] = BinaryData.FromObjectAsJson("Example Description"), + ["publicAccessLevel"] = null + }, + TypeName = "azure_storage_account", + CreatedBy = "ExampleCreator", + Status = EntityStatus.Active, + UpdatedBy = "ExampleUpdator", + Version = 0, + Contacts = + { + ["Expert"] = {new ContactInfo { - Confidence = 1234, - CreatedBy = "", - Description = "", - DisplayText = "", - Expression = "", - RelationGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), - Status = AtlasTermAssignmentStatus.Discovered, - Steward = "", - TermGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), + Id = "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", + Info = "Example Expert Info", }}, - ProvenanceType = 1234, - Proxy = true, - RelationshipAttributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - Status = EntityStatus.Active, - UpdateTime = 1234L, - UpdatedBy = "", - Version = 1234L, - Contacts = + ["Owner"] = {new ContactInfo { - ["key"] = {new ContactInfo - { - Id = "", - Info = "", - }} - }, - } - }, - Entities = { default }, + Id = "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", + Info = "Example Owner Info", + }} + }, + }}, }; -Response response = await client.BatchCreateOrUpdateAsync(body, collectionId: "", businessAttributeUpdateBehavior: BusinessAttributeUpdateBehavior.Ignore); +Response response = await client.BatchCreateOrUpdateAsync(body); ]]> This sample shows how to call BatchCreateOrUpdate. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -AtlasEntitiesWithExtInfo body = new AtlasEntitiesWithExtInfo(); -Response response = client.BatchCreateOrUpdate(body); -]]> -This sample shows how to call BatchCreateOrUpdate with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); - AtlasEntitiesWithExtInfo body = new AtlasEntitiesWithExtInfo { - ReferredEntities = + ReferredEntities = { }, + Entities = {new AtlasEntity { - ["key"] = new AtlasEntity + Attributes = { - Attributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - TypeName = "", - LastModifiedTS = "", - BusinessAttributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - Classifications = {new AtlasClassification + ["owner"] = BinaryData.FromObjectAsJson("ExampleOwner"), + ["modifiedTime"] = BinaryData.FromObjectAsJson(0), + ["createTime"] = BinaryData.FromObjectAsJson(0), + ["qualifiedName"] = BinaryData.FromObjectAsJson("exampleaccount1"), + ["name"] = BinaryData.FromObjectAsJson("ExampleStorageAccount1"), + ["description"] = null, + ["publicAccessLevel"] = null + }, + TypeName = "azure_storage_account", + CreatedBy = "ExampleCreator", + Status = EntityStatus.Active, + UpdatedBy = "ExampleUpdator", + Version = 0, + Contacts = + { + ["Expert"] = {new ContactInfo { - Attributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - TypeName = "", - LastModifiedTS = "", - EntityGuid = "", - EntityStatus = EntityStatus.Active, - RemovePropagationsOnEntityDelete = true, - ValidityPeriods = {new TimeBoundary - { - EndTime = "", - StartTime = "", - TimeZone = "", - }}, + Id = "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", + Info = "Example Expert Info", }}, - CreateTime = 1234L, - CreatedBy = "", - CustomAttributes = + ["Owner"] = {new ContactInfo { - ["key"] = "" - }, - Guid = "", - HomeId = "", - IsIncomplete = true, - Labels = {""}, - Meanings = {new AtlasTermAssignmentHeader + Id = "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", + Info = "Example Owner Info", + }} + }, + }, new AtlasEntity + { + Attributes = + { + ["owner"] = BinaryData.FromObjectAsJson("ExampleOwner"), + ["modifiedTime"] = BinaryData.FromObjectAsJson(0), + ["createTime"] = BinaryData.FromObjectAsJson(0), + ["qualifiedName"] = BinaryData.FromObjectAsJson("exampleaccount2"), + ["name"] = BinaryData.FromObjectAsJson("ExampleStorageAccount2"), + ["description"] = BinaryData.FromObjectAsJson("Example Description"), + ["publicAccessLevel"] = null + }, + TypeName = "azure_storage_account", + CreatedBy = "ExampleCreator", + Status = EntityStatus.Active, + UpdatedBy = "ExampleUpdator", + Version = 0, + Contacts = + { + ["Expert"] = {new ContactInfo { - Confidence = 1234, - CreatedBy = "", - Description = "", - DisplayText = "", - Expression = "", - RelationGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), - Status = AtlasTermAssignmentStatus.Discovered, - Steward = "", - TermGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), + Id = "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", + Info = "Example Expert Info", }}, - ProvenanceType = 1234, - Proxy = true, - RelationshipAttributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - Status = EntityStatus.Active, - UpdateTime = 1234L, - UpdatedBy = "", - Version = 1234L, - Contacts = + ["Owner"] = {new ContactInfo { - ["key"] = {new ContactInfo - { - Id = "", - Info = "", - }} - }, - } - }, - Entities = { default }, + Id = "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", + Info = "Example Owner Info", + }} + }, + }}, }; -Response response = client.BatchCreateOrUpdate(body, collectionId: "", businessAttributeUpdateBehavior: BusinessAttributeUpdateBehavior.Ignore); +Response response = client.BatchCreateOrUpdate(body); ]]> This sample shows how to call BatchCreateOrUpdateAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -using RequestContent content = RequestContent.Create(new object()); -Response response = await client.BatchCreateOrUpdateAsync(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.ToString()); -]]> -This sample shows how to call BatchCreateOrUpdateAsync with all parameters and request content and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); - using RequestContent content = RequestContent.Create(new { - referredEntities = new + referredEntities = new object(), + entities = new object[] { - key = new + new { + typeName = "azure_storage_account", attributes = new { - key = new object(), - }, - typeName = "", - lastModifiedTS = "", - businessAttributes = new - { - key = new object(), + owner = "ExampleOwner", + modifiedTime = 0, + createTime = 0, + qualifiedName = "exampleaccount1", + name = "ExampleStorageAccount1", }, - classifications = new object[] + contacts = new { - new + Expert = new object[] { - attributes = new - { - key = new object(), - }, - typeName = "", - lastModifiedTS = "", - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new object[] + new { - new - { - endTime = "", - startTime = "", - timeZone = "", - } - }, - } - }, - createTime = 1234L, - createdBy = "", - customAttributes = new - { - key = "", - }, - guid = "", - homeId = "", - isIncomplete = true, - labels = new object[] - { - "" - }, - meanings = new object[] - { - new + id = "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", + info = "Example Expert Info", + } + }, + Owner = new object[] { - confidence = 1234, - createdBy = "", - description = "", - displayText = "", - expression = "", - relationGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", - status = "DISCOVERED", - steward = "", - termGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", - } + new + { + id = "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", + info = "Example Owner Info", + } + }, }, - provenanceType = 1234, - proxy = true, - relationshipAttributes = new + status = "ACTIVE", + createdBy = "ExampleCreator", + updatedBy = "ExampleUpdator", + version = 0, + }, + new + { + typeName = "azure_storage_account", + attributes = new { - key = new object(), + owner = "ExampleOwner", + modifiedTime = 0, + createTime = 0, + qualifiedName = "exampleaccount2", + name = "ExampleStorageAccount2", + description = "Example Description", }, - status = "ACTIVE", - updateTime = 1234L, - updatedBy = "", - version = 1234L, contacts = new { - key = new object[] + Expert = new object[] + { + new + { + id = "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", + info = "Example Expert Info", + } + }, + Owner = new object[] { new { - id = "", - info = "", + id = "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", + info = "Example Owner Info", } }, }, - }, - }, - entities = new object[] - { - null + status = "ACTIVE", + createdBy = "ExampleCreator", + updatedBy = "ExampleUpdator", + version = 0, + } }, }); -Response response = await client.BatchCreateOrUpdateAsync(content, collectionId: "", businessAttributeUpdateBehavior: "ignore"); +Response response = await client.BatchCreateOrUpdateAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meaningNames")[0].ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); +Console.WriteLine(result.ToString()); ]]> This sample shows how to call BatchCreateOrUpdate and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -using RequestContent content = RequestContent.Create(new object()); -Response response = client.BatchCreateOrUpdate(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.ToString()); -]]> -This sample shows how to call BatchCreateOrUpdate with all parameters and request content and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); - using RequestContent content = RequestContent.Create(new { - referredEntities = new + referredEntities = new object(), + entities = new object[] { - key = new + new { + typeName = "azure_storage_account", attributes = new { - key = new object(), - }, - typeName = "", - lastModifiedTS = "", - businessAttributes = new - { - key = new object(), + owner = "ExampleOwner", + modifiedTime = 0, + createTime = 0, + qualifiedName = "exampleaccount1", + name = "ExampleStorageAccount1", }, - classifications = new object[] + contacts = new { - new + Expert = new object[] { - attributes = new - { - key = new object(), - }, - typeName = "", - lastModifiedTS = "", - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new object[] + new { - new - { - endTime = "", - startTime = "", - timeZone = "", - } - }, - } - }, - createTime = 1234L, - createdBy = "", - customAttributes = new - { - key = "", - }, - guid = "", - homeId = "", - isIncomplete = true, - labels = new object[] - { - "" - }, - meanings = new object[] - { - new + id = "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", + info = "Example Expert Info", + } + }, + Owner = new object[] { - confidence = 1234, - createdBy = "", - description = "", - displayText = "", - expression = "", - relationGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", - status = "DISCOVERED", - steward = "", - termGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", - } + new + { + id = "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", + info = "Example Owner Info", + } + }, }, - provenanceType = 1234, - proxy = true, - relationshipAttributes = new + status = "ACTIVE", + createdBy = "ExampleCreator", + updatedBy = "ExampleUpdator", + version = 0, + }, + new + { + typeName = "azure_storage_account", + attributes = new { - key = new object(), + owner = "ExampleOwner", + modifiedTime = 0, + createTime = 0, + qualifiedName = "exampleaccount2", + name = "ExampleStorageAccount2", + description = "Example Description", }, - status = "ACTIVE", - updateTime = 1234L, - updatedBy = "", - version = 1234L, contacts = new { - key = new object[] + Expert = new object[] + { + new + { + id = "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", + info = "Example Expert Info", + } + }, + Owner = new object[] { new { - id = "", - info = "", + id = "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", + info = "Example Owner Info", } }, }, - }, - }, - entities = new object[] - { - null + status = "ACTIVE", + createdBy = "ExampleCreator", + updatedBy = "ExampleUpdator", + version = 0, + } }, }); -Response response = client.BatchCreateOrUpdate(content, collectionId: "", businessAttributeUpdateBehavior: "ignore"); +Response response = client.BatchCreateOrUpdate(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meaningNames")[0].ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); +Console.WriteLine(result.ToString()); ]]> This sample shows how to call BatchDeleteAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -Response response = await client.BatchDeleteAsync(new string[] { "" }); -]]> -This sample shows how to call BatchDeleteAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -Response response = await client.BatchDeleteAsync(new string[] { "" }); +Response response = await client.BatchDeleteAsync(new string[] { "18e06957-e265-967a-07f1-e14e2ab8940f", "cc0730ba-9b30-41f0-6953-559d17626d2b" }); ]]> This sample shows how to call BatchDelete. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -Response response = client.BatchDelete(new string[] { "" }); -]]> -This sample shows how to call BatchDelete with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -Response response = client.BatchDelete(new string[] { "" }); +Response response = client.BatchDelete(new string[] { "18e06957-e265-967a-07f1-e14e2ab8940f", "cc0730ba-9b30-41f0-6953-559d17626d2b" }); ]]> This sample shows how to call BatchDeleteAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -Response response = await client.BatchDeleteAsync(new string[] { "" }, null); +Response response = await client.BatchDeleteAsync(new string[] { "18e06957-e265-967a-07f1-e14e2ab8940f", "cc0730ba-9b30-41f0-6953-559d17626d2b" }, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call BatchDeleteAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -Response response = await client.BatchDeleteAsync(new string[] { "" }, null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meaningNames")[0].ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); ]]> This sample shows how to call BatchDelete and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -Response response = client.BatchDelete(new string[] { "" }, null); +Response response = client.BatchDelete(new string[] { "18e06957-e265-967a-07f1-e14e2ab8940f", "cc0730ba-9b30-41f0-6953-559d17626d2b" }, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call BatchDelete with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -Response response = client.BatchDelete(new string[] { "" }, null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meaningNames")[0].ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); ]]> This sample shows how to call AddClassificationAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -ClassificationAssociateConfig body = new ClassificationAssociateConfig(); -Response response = await client.AddClassificationAsync(body); -]]> -This sample shows how to call AddClassificationAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); @@ -1560,23 +1101,11 @@ ClassificationAssociateConfig body = new ClassificationAssociateConfig { Classification = new AtlasClassification { - Attributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - TypeName = "", - LastModifiedTS = "", - EntityGuid = "", - EntityStatus = EntityStatus.Active, - RemovePropagationsOnEntityDelete = true, - ValidityPeriods = {new TimeBoundary - { - EndTime = "", - StartTime = "", - TimeZone = "", - }}, + Attributes = { }, + TypeName = "MICROSOFT.FINANCIAL.US.ABA_ROUTING_NUMBER", + ValidityPeriods = { }, }, - EntityGuids = { "" }, + EntityGuids = { "784c0f2f-afd2-e26b-f9cb-984f6c2c5021", "b4ebc8be-cef4-860a-bee9-28cc34cb5caa" }, }; Response response = await client.AddClassificationAsync(body); ]]> @@ -1585,16 +1114,7 @@ Response response = await client.AddClassificationAsync(body); This sample shows how to call AddClassification. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -ClassificationAssociateConfig body = new ClassificationAssociateConfig(); -Response response = client.AddClassification(body); -]]> -This sample shows how to call AddClassification with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); @@ -1602,23 +1122,11 @@ ClassificationAssociateConfig body = new ClassificationAssociateConfig { Classification = new AtlasClassification { - Attributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - TypeName = "", - LastModifiedTS = "", - EntityGuid = "", - EntityStatus = EntityStatus.Active, - RemovePropagationsOnEntityDelete = true, - ValidityPeriods = {new TimeBoundary - { - EndTime = "", - StartTime = "", - TimeZone = "", - }}, + Attributes = { }, + TypeName = "MICROSOFT.FINANCIAL.US.ABA_ROUTING_NUMBER", + ValidityPeriods = { }, }, - EntityGuids = { "" }, + EntityGuids = { "784c0f2f-afd2-e26b-f9cb-984f6c2c5021", "b4ebc8be-cef4-860a-bee9-28cc34cb5caa" }, }; Response response = client.AddClassification(body); ]]> @@ -1627,18 +1135,7 @@ Response response = client.AddClassification(body); This sample shows how to call AddClassificationAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -using RequestContent content = RequestContent.Create(new object()); -Response response = await client.AddClassificationAsync(content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call AddClassificationAsync with all request content. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); @@ -1646,28 +1143,14 @@ using RequestContent content = RequestContent.Create(new { classification = new { - attributes = new - { - key = new object(), - }, - typeName = "", - lastModifiedTS = "", - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new object[] - { - new - { - endTime = "", - startTime = "", - timeZone = "", - } - }, + typeName = "MICROSOFT.FINANCIAL.US.ABA_ROUTING_NUMBER", + attributes = new object(), + validityPeriods = Array.Empty(), }, entityGuids = new object[] { - "" + "784c0f2f-afd2-e26b-f9cb-984f6c2c5021", + "b4ebc8be-cef4-860a-bee9-28cc34cb5caa" }, }); Response response = await client.AddClassificationAsync(content); @@ -1679,18 +1162,7 @@ Console.WriteLine(response.Status); This sample shows how to call AddClassification. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -using RequestContent content = RequestContent.Create(new object()); -Response response = client.AddClassification(content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call AddClassification with all request content. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); @@ -1698,28 +1170,14 @@ using RequestContent content = RequestContent.Create(new { classification = new { - attributes = new - { - key = new object(), - }, - typeName = "", - lastModifiedTS = "", - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new object[] - { - new - { - endTime = "", - startTime = "", - timeZone = "", - } - }, + typeName = "MICROSOFT.FINANCIAL.US.ABA_ROUTING_NUMBER", + attributes = new object(), + validityPeriods = Array.Empty(), }, entityGuids = new object[] { - "" + "784c0f2f-afd2-e26b-f9cb-984f6c2c5021", + "b4ebc8be-cef4-860a-bee9-28cc34cb5caa" }, }); Response response = client.AddClassification(content); @@ -1731,771 +1189,213 @@ Console.WriteLine(response.Status); This sample shows how to call GetEntityAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -Response response = await client.GetEntityAsync(""); -]]> -This sample shows how to call GetEntityAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -Response response = await client.GetEntityAsync("", minExtInfo: true, ignoreRelationships: true); +Response response = await client.GetEntityAsync("5cf8a9e5-c9fd-abe0-2e8c-d40024263dcb"); ]]> This sample shows how to call GetEntity. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -Response response = client.GetEntity(""); -]]> -This sample shows how to call GetEntity with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -Response response = client.GetEntity("", minExtInfo: true, ignoreRelationships: true); +Response response = client.GetEntity("5cf8a9e5-c9fd-abe0-2e8c-d40024263dcb"); ]]> This sample shows how to call GetEntityAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -Response response = await client.GetEntityAsync("", null, null, null); +Response response = await client.GetEntityAsync("5cf8a9e5-c9fd-abe0-2e8c-d40024263dcb", true, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetEntityAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -Response response = await client.GetEntityAsync("", true, true, null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("businessAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("customAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("homeId").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("collectionId").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("provenanceType").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("proxy").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("relationshipAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("businessAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("customAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("homeId").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("collectionId").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("provenanceType").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("proxy").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("relationshipAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); ]]> This sample shows how to call GetEntity and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -Response response = client.GetEntity("", null, null, null); +Response response = client.GetEntity("5cf8a9e5-c9fd-abe0-2e8c-d40024263dcb", true, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetEntity with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -Response response = client.GetEntity("", true, true, null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("businessAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("customAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("homeId").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("collectionId").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("provenanceType").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("proxy").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("relationshipAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("businessAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("customAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("homeId").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("collectionId").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("provenanceType").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("proxy").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("relationshipAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); ]]> This sample shows how to call UpdateAttributeByIdAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -Response response = await client.UpdateAttributeByIdAsync("", "", BinaryData.FromObjectAsJson(new object())); -]]> -This sample shows how to call UpdateAttributeByIdAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -Response response = await client.UpdateAttributeByIdAsync("", "", BinaryData.FromObjectAsJson(new object())); +Response response = await client.UpdateAttributeByIdAsync("394d9a03-912e-483b-bbd2-bedee1a69798", "ExampleName", BinaryData.FromObjectAsJson("ExampleNewName")); ]]> This sample shows how to call UpdateAttributeById. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -Response response = client.UpdateAttributeById("", "", BinaryData.FromObjectAsJson(new object())); -]]> -This sample shows how to call UpdateAttributeById with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -Response response = client.UpdateAttributeById("", "", BinaryData.FromObjectAsJson(new object())); +Response response = client.UpdateAttributeById("394d9a03-912e-483b-bbd2-bedee1a69798", "ExampleName", BinaryData.FromObjectAsJson("ExampleNewName")); ]]> This sample shows how to call UpdateAttributeByIdAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -using RequestContent content = RequestContent.Create(new object()); -Response response = await client.UpdateAttributeByIdAsync("", "", content); +using RequestContent content = RequestContent.Create("ExampleNewName"); +Response response = await client.UpdateAttributeByIdAsync("394d9a03-912e-483b-bbd2-bedee1a69798", "ExampleName", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call UpdateAttributeByIdAsync with all parameters and request content and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -using RequestContent content = RequestContent.Create(new object()); -Response response = await client.UpdateAttributeByIdAsync("", "", content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meaningNames")[0].ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); ]]> This sample shows how to call UpdateAttributeById and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -using RequestContent content = RequestContent.Create(new object()); -Response response = client.UpdateAttributeById("", "", content); +using RequestContent content = RequestContent.Create("ExampleNewName"); +Response response = client.UpdateAttributeById("394d9a03-912e-483b-bbd2-bedee1a69798", "ExampleName", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call UpdateAttributeById with all parameters and request content and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -using RequestContent content = RequestContent.Create(new object()); -Response response = client.UpdateAttributeById("", "", content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meaningNames")[0].ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); ]]> This sample shows how to call DeleteAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -Response response = await client.DeleteAsync(""); -]]> -This sample shows how to call DeleteAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -Response response = await client.DeleteAsync(""); +Response response = await client.DeleteAsync("fd279eb4-f6c3-1b0b-ad67-e4f8abd2972f"); ]]> This sample shows how to call Delete. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -Response response = client.Delete(""); -]]> -This sample shows how to call Delete with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -Response response = client.Delete(""); +Response response = client.Delete("fd279eb4-f6c3-1b0b-ad67-e4f8abd2972f"); ]]> This sample shows how to call DeleteAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -Response response = await client.DeleteAsync("", null); +Response response = await client.DeleteAsync("fd279eb4-f6c3-1b0b-ad67-e4f8abd2972f", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call DeleteAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -Response response = await client.DeleteAsync("", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meaningNames")[0].ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); ]]> This sample shows how to call Delete and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -Response response = client.Delete("", null); +Response response = client.Delete("fd279eb4-f6c3-1b0b-ad67-e4f8abd2972f", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call Delete with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -Response response = client.Delete("", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meaningNames")[0].ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); ]]> This sample shows how to call GetClassificationAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -Response response = await client.GetClassificationAsync("", ""); -]]> -This sample shows how to call GetClassificationAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -Response response = await client.GetClassificationAsync("", ""); +Response response = await client.GetClassificationAsync("9347abc5-7b86-4b82-a1e2-ad77c7c3cac3", "MICROSOFT.PERSONAL.DATE_OF_BIRTH"); ]]> This sample shows how to call GetClassification. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -Response response = client.GetClassification("", ""); -]]> -This sample shows how to call GetClassification with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -Response response = client.GetClassification("", ""); +Response response = client.GetClassification("9347abc5-7b86-4b82-a1e2-ad77c7c3cac3", "MICROSOFT.PERSONAL.DATE_OF_BIRTH"); ]]> This sample shows how to call GetClassificationAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -Response response = await client.GetClassificationAsync("", "", null); +Response response = await client.GetClassificationAsync("9347abc5-7b86-4b82-a1e2-ad77c7c3cac3", "MICROSOFT.PERSONAL.DATE_OF_BIRTH", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetClassificationAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -Response response = await client.GetClassificationAsync("", "", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); ]]> This sample shows how to call GetClassification and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -Response response = client.GetClassification("", "", null); +Response response = client.GetClassification("9347abc5-7b86-4b82-a1e2-ad77c7c3cac3", "MICROSOFT.PERSONAL.DATE_OF_BIRTH", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetClassification with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -Response response = client.GetClassification("", "", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); ]]> This sample shows how to call RemoveClassificationAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -Response response = await client.RemoveClassificationAsync("", ""); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call RemoveClassificationAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -Response response = await client.RemoveClassificationAsync("", ""); +Response response = await client.RemoveClassificationAsync("cc0730ba-9b30-41f0-6953-559d17626d2b", "MICROSOFT.FINANCIAL.US.ABA_ROUTING_NUMBER"); Console.WriteLine(response.Status); ]]> @@ -2504,21 +1404,11 @@ Console.WriteLine(response.Status); This sample shows how to call RemoveClassification. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -Response response = client.RemoveClassification("", ""); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call RemoveClassification with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -Response response = client.RemoveClassification("", ""); +Response response = client.RemoveClassification("cc0730ba-9b30-41f0-6953-559d17626d2b", "MICROSOFT.FINANCIAL.US.ABA_ROUTING_NUMBER"); Console.WriteLine(response.Status); ]]> @@ -2527,180 +1417,94 @@ Console.WriteLine(response.Status); This sample shows how to call GetClassificationsAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -Response response = await client.GetClassificationsAsync(""); -]]> -This sample shows how to call GetClassificationsAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -Response response = await client.GetClassificationsAsync(""); +Response response = await client.GetClassificationsAsync("67d26de6-771d-1a2d-cb2b-dec4dbd2a9bd"); ]]> This sample shows how to call GetClassifications. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -Response response = client.GetClassifications(""); -]]> -This sample shows how to call GetClassifications with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -Response response = client.GetClassifications(""); +Response response = client.GetClassifications("67d26de6-771d-1a2d-cb2b-dec4dbd2a9bd"); ]]> This sample shows how to call GetClassificationsAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -Response response = await client.GetClassificationsAsync("", null); +Response response = await client.GetClassificationsAsync("67d26de6-771d-1a2d-cb2b-dec4dbd2a9bd", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetClassificationsAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -Response response = await client.GetClassificationsAsync("", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("list")[0].ToString()); -Console.WriteLine(result.GetProperty("pageSize").ToString()); -Console.WriteLine(result.GetProperty("sortBy").ToString()); -Console.WriteLine(result.GetProperty("sortType").ToString()); -Console.WriteLine(result.GetProperty("startIndex").ToString()); -Console.WriteLine(result.GetProperty("totalCount").ToString()); ]]> This sample shows how to call GetClassifications and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -Response response = client.GetClassifications("", null); +Response response = client.GetClassifications("67d26de6-771d-1a2d-cb2b-dec4dbd2a9bd", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetClassifications with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -Response response = client.GetClassifications("", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("list")[0].ToString()); -Console.WriteLine(result.GetProperty("pageSize").ToString()); -Console.WriteLine(result.GetProperty("sortBy").ToString()); -Console.WriteLine(result.GetProperty("sortType").ToString()); -Console.WriteLine(result.GetProperty("startIndex").ToString()); -Console.WriteLine(result.GetProperty("totalCount").ToString()); ]]> This sample shows how to call AddClassificationsAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -Response response = await client.AddClassificationsAsync("", new AtlasClassification[] -{ - new AtlasClassification() -}); -]]> -This sample shows how to call AddClassificationsAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -Response response = await client.AddClassificationsAsync("", new AtlasClassification[] +Response response = await client.AddClassificationsAsync("cc0730ba-9b30-41f0-6953-559d17626d2b", new AtlasClassification[] { new AtlasClassification { - Attributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - TypeName = "", - LastModifiedTS = "", - EntityGuid = "", - EntityStatus = EntityStatus.Active, - RemovePropagationsOnEntityDelete = true, - ValidityPeriods = {new TimeBoundary - { - EndTime = "", - StartTime = "", - TimeZone = "", - }}, + TypeName = "MICROSOFT.FINANCIAL.US.ABA_ROUTING_NUMBER", + EntityGuid = "cc0730ba-9b30-41f0-6953-559d17626d2b", + }, + new AtlasClassification + { + TypeName = "MICROSOFT.FINANCIAL.CREDIT_CARD_NUMBER", + EntityGuid = "cc0730ba-9b30-41f0-6953-559d17626d2b", } }); -]]> - - - -This sample shows how to call AddClassifications. -"); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -Response response = client.AddClassifications("", new AtlasClassification[] -{ - new AtlasClassification() -}); -]]> -This sample shows how to call AddClassifications with all parameters. +]]> + + + +This sample shows how to call AddClassifications. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -Response response = client.AddClassifications("", new AtlasClassification[] +Response response = client.AddClassifications("cc0730ba-9b30-41f0-6953-559d17626d2b", new AtlasClassification[] { new AtlasClassification { - Attributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - TypeName = "", - LastModifiedTS = "", - EntityGuid = "", - EntityStatus = EntityStatus.Active, - RemovePropagationsOnEntityDelete = true, - ValidityPeriods = {new TimeBoundary - { - EndTime = "", - StartTime = "", - TimeZone = "", - }}, + TypeName = "MICROSOFT.FINANCIAL.US.ABA_ROUTING_NUMBER", + EntityGuid = "cc0730ba-9b30-41f0-6953-559d17626d2b", + }, + new AtlasClassification + { + TypeName = "MICROSOFT.FINANCIAL.CREDIT_CARD_NUMBER", + EntityGuid = "cc0730ba-9b30-41f0-6953-559d17626d2b", } }); ]]> @@ -2709,21 +1513,7 @@ Response response = client.AddClassifications("", new AtlasClassification[ This sample shows how to call AddClassificationsAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -using RequestContent content = RequestContent.Create(new object[] -{ - new object() -}); -Response response = await client.AddClassificationsAsync("", content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call AddClassificationsAsync with all parameters and request content. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); @@ -2731,27 +1521,16 @@ using RequestContent content = RequestContent.Create(new object[] { new { - attributes = new - { - key = new object(), - }, - typeName = "", - lastModifiedTS = "", - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new object[] - { - new - { - endTime = "", - startTime = "", - timeZone = "", - } - }, + typeName = "MICROSOFT.FINANCIAL.US.ABA_ROUTING_NUMBER", + entityGuid = "cc0730ba-9b30-41f0-6953-559d17626d2b", + }, + new + { + typeName = "MICROSOFT.FINANCIAL.CREDIT_CARD_NUMBER", + entityGuid = "cc0730ba-9b30-41f0-6953-559d17626d2b", } }); -Response response = await client.AddClassificationsAsync("", content); +Response response = await client.AddClassificationsAsync("cc0730ba-9b30-41f0-6953-559d17626d2b", content); Console.WriteLine(response.Status); ]]> @@ -2760,21 +1539,7 @@ Console.WriteLine(response.Status); This sample shows how to call AddClassifications. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -using RequestContent content = RequestContent.Create(new object[] -{ - new object() -}); -Response response = client.AddClassifications("", content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call AddClassifications with all parameters and request content. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); @@ -2782,27 +1547,16 @@ using RequestContent content = RequestContent.Create(new object[] { new { - attributes = new - { - key = new object(), - }, - typeName = "", - lastModifiedTS = "", - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new object[] - { - new - { - endTime = "", - startTime = "", - timeZone = "", - } - }, + typeName = "MICROSOFT.FINANCIAL.US.ABA_ROUTING_NUMBER", + entityGuid = "cc0730ba-9b30-41f0-6953-559d17626d2b", + }, + new + { + typeName = "MICROSOFT.FINANCIAL.CREDIT_CARD_NUMBER", + entityGuid = "cc0730ba-9b30-41f0-6953-559d17626d2b", } }); -Response response = client.AddClassifications("", content); +Response response = client.AddClassifications("cc0730ba-9b30-41f0-6953-559d17626d2b", content); Console.WriteLine(response.Status); ]]> @@ -2811,40 +1565,21 @@ Console.WriteLine(response.Status); This sample shows how to call UpdateClassificationsAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -Response response = await client.UpdateClassificationsAsync("", new AtlasClassification[] -{ - new AtlasClassification() -}); -]]> -This sample shows how to call UpdateClassificationsAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -Response response = await client.UpdateClassificationsAsync("", new AtlasClassification[] +Response response = await client.UpdateClassificationsAsync("45dd4404-e897-b7e2-ca3c-f6e6b11b4f24", new AtlasClassification[] { new AtlasClassification { - Attributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - TypeName = "", - LastModifiedTS = "", - EntityGuid = "", - EntityStatus = EntityStatus.Active, - RemovePropagationsOnEntityDelete = true, - ValidityPeriods = {new TimeBoundary - { - EndTime = "", - StartTime = "", - TimeZone = "", - }}, + TypeName = "MICROSOFT.FINANCIAL.CREDIT_CARD_NUMBER", + EntityGuid = "45dd4404-e897-b7e2-ca3c-f6e6b11b4f24", + }, + new AtlasClassification + { + TypeName = "MICROSOFT.FINANCIAL.US_BANK_ACCOUNT_NUMBER", + EntityGuid = "45dd4404-e897-b7e2-ca3c-f6e6b11b4f24", } }); ]]> @@ -2853,40 +1588,21 @@ Response response = await client.UpdateClassificationsAsync("", new AtlasC This sample shows how to call UpdateClassifications. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -Response response = client.UpdateClassifications("", new AtlasClassification[] -{ - new AtlasClassification() -}); -]]> -This sample shows how to call UpdateClassifications with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -Response response = client.UpdateClassifications("", new AtlasClassification[] +Response response = client.UpdateClassifications("45dd4404-e897-b7e2-ca3c-f6e6b11b4f24", new AtlasClassification[] { new AtlasClassification { - Attributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - TypeName = "", - LastModifiedTS = "", - EntityGuid = "", - EntityStatus = EntityStatus.Active, - RemovePropagationsOnEntityDelete = true, - ValidityPeriods = {new TimeBoundary - { - EndTime = "", - StartTime = "", - TimeZone = "", - }}, + TypeName = "MICROSOFT.FINANCIAL.CREDIT_CARD_NUMBER", + EntityGuid = "45dd4404-e897-b7e2-ca3c-f6e6b11b4f24", + }, + new AtlasClassification + { + TypeName = "MICROSOFT.FINANCIAL.US_BANK_ACCOUNT_NUMBER", + EntityGuid = "45dd4404-e897-b7e2-ca3c-f6e6b11b4f24", } }); ]]> @@ -2895,21 +1611,7 @@ Response response = client.UpdateClassifications("", new AtlasClassificati This sample shows how to call UpdateClassificationsAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -using RequestContent content = RequestContent.Create(new object[] -{ - new object() -}); -Response response = await client.UpdateClassificationsAsync("", content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call UpdateClassificationsAsync with all parameters and request content. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); @@ -2917,27 +1619,16 @@ using RequestContent content = RequestContent.Create(new object[] { new { - attributes = new - { - key = new object(), - }, - typeName = "", - lastModifiedTS = "", - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new object[] - { - new - { - endTime = "", - startTime = "", - timeZone = "", - } - }, + typeName = "MICROSOFT.FINANCIAL.CREDIT_CARD_NUMBER", + entityGuid = "45dd4404-e897-b7e2-ca3c-f6e6b11b4f24", + }, + new + { + typeName = "MICROSOFT.FINANCIAL.US_BANK_ACCOUNT_NUMBER", + entityGuid = "45dd4404-e897-b7e2-ca3c-f6e6b11b4f24", } }); -Response response = await client.UpdateClassificationsAsync("", content); +Response response = await client.UpdateClassificationsAsync("45dd4404-e897-b7e2-ca3c-f6e6b11b4f24", content); Console.WriteLine(response.Status); ]]> @@ -2946,21 +1637,7 @@ Console.WriteLine(response.Status); This sample shows how to call UpdateClassifications. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -using RequestContent content = RequestContent.Create(new object[] -{ - new object() -}); -Response response = client.UpdateClassifications("", content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call UpdateClassifications with all parameters and request content. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); @@ -2968,27 +1645,16 @@ using RequestContent content = RequestContent.Create(new object[] { new { - attributes = new - { - key = new object(), - }, - typeName = "", - lastModifiedTS = "", - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new object[] - { - new - { - endTime = "", - startTime = "", - timeZone = "", - } - }, + typeName = "MICROSOFT.FINANCIAL.CREDIT_CARD_NUMBER", + entityGuid = "45dd4404-e897-b7e2-ca3c-f6e6b11b4f24", + }, + new + { + typeName = "MICROSOFT.FINANCIAL.US_BANK_ACCOUNT_NUMBER", + entityGuid = "45dd4404-e897-b7e2-ca3c-f6e6b11b4f24", } }); -Response response = client.UpdateClassifications("", content); +Response response = client.UpdateClassifications("45dd4404-e897-b7e2-ca3c-f6e6b11b4f24", content); Console.WriteLine(response.Status); ]]> @@ -2997,1007 +1663,273 @@ Console.WriteLine(response.Status); This sample shows how to call GetByUniqueAttributeAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -Response response = await client.GetByUniqueAttributeAsync(""); -]]> -This sample shows how to call GetByUniqueAttributeAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -Response response = await client.GetByUniqueAttributeAsync("", minExtInfo: true, ignoreRelationships: true, attribute: ""); +Response response = await client.GetByUniqueAttributeAsync("azure_storage_account"); ]]> This sample shows how to call GetByUniqueAttribute. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -Response response = client.GetByUniqueAttribute(""); -]]> -This sample shows how to call GetByUniqueAttribute with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -Response response = client.GetByUniqueAttribute("", minExtInfo: true, ignoreRelationships: true, attribute: ""); +Response response = client.GetByUniqueAttribute("azure_storage_account"); ]]> This sample shows how to call GetByUniqueAttributeAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -Response response = await client.GetByUniqueAttributeAsync("", null, null, null, null); +Response response = await client.GetByUniqueAttributeAsync("azure_storage_account", true, null, "https://exampleaccount.core.windows.net", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetByUniqueAttributeAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -Response response = await client.GetByUniqueAttributeAsync("", true, true, "", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("businessAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("customAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("homeId").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("collectionId").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("provenanceType").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("proxy").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("relationshipAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("businessAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("customAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("homeId").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("collectionId").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("provenanceType").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("proxy").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("relationshipAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); ]]> This sample shows how to call GetByUniqueAttribute and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -Response response = client.GetByUniqueAttribute("", null, null, null, null); +Response response = client.GetByUniqueAttribute("azure_storage_account", true, null, "https://exampleaccount.core.windows.net", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetByUniqueAttribute with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -Response response = client.GetByUniqueAttribute("", true, true, "", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("businessAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("customAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("homeId").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("collectionId").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("provenanceType").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("proxy").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("relationshipAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("businessAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("customAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("homeId").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("collectionId").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("provenanceType").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("proxy").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("relationshipAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); ]]> This sample shows how to call UpdateByUniqueAttributeAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -AtlasEntityWithExtInfo body = new AtlasEntityWithExtInfo(); -Response response = await client.UpdateByUniqueAttributeAsync("", body); -]]> -This sample shows how to call UpdateByUniqueAttributeAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); AtlasEntityWithExtInfo body = new AtlasEntityWithExtInfo { - ReferredEntities = + ReferredEntities = { }, + Entity = new AtlasEntity { - ["key"] = new AtlasEntity + Attributes = { - Attributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - TypeName = "", - LastModifiedTS = "", - BusinessAttributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - Classifications = {new AtlasClassification - { - Attributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - TypeName = "", - LastModifiedTS = "", - EntityGuid = "", - EntityStatus = EntityStatus.Active, - RemovePropagationsOnEntityDelete = true, - ValidityPeriods = {new TimeBoundary - { - EndTime = "", - StartTime = "", - TimeZone = "", - }}, - }}, - CreateTime = 1234L, - CreatedBy = "", - CustomAttributes = - { - ["key"] = "" - }, - Guid = "", - HomeId = "", - IsIncomplete = true, - Labels = {""}, - Meanings = {new AtlasTermAssignmentHeader - { - Confidence = 1234, - CreatedBy = "", - Description = "", - DisplayText = "", - Expression = "", - RelationGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), - Status = AtlasTermAssignmentStatus.Discovered, - Steward = "", - TermGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), - }}, - ProvenanceType = 1234, - Proxy = true, - RelationshipAttributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - Status = EntityStatus.Active, - UpdateTime = 1234L, - UpdatedBy = "", - Version = 1234L, - Contacts = - { - ["key"] = {new ContactInfo - { - Id = "", - Info = "", - }} - }, - } + ["owner"] = BinaryData.FromObjectAsJson("ExampleOwner"), + ["qualifiedName"] = BinaryData.FromObjectAsJson("https://exampleaccount.core.windows.net"), + ["createTime"] = BinaryData.FromObjectAsJson(0), + ["name"] = BinaryData.FromObjectAsJson("ExampleNewName") + }, + TypeName = "azure_storage_account", + LastModifiedTS = "1", + CreateTime = 1605766397985, + CreatedBy = "8c062c84-5d25-449f-a990-9d8ab70b8ec7", + Guid = "dc507ccf-0c57-4165-9327-f37b0d13fda0", + RelationshipAttributes = + { + ["services"] = BinaryData.FromObjectAsJson(Array.Empty()), + ["meanings"] = BinaryData.FromObjectAsJson(Array.Empty()) + }, + Status = EntityStatus.Active, + UpdateTime = 1605766397985, + UpdatedBy = "8c062c84-5d25-449f-a990-9d8ab70b8ec7", + Version = 0, }, - Entity = default, }; -Response response = await client.UpdateByUniqueAttributeAsync("", body, attribute: ""); +Response response = await client.UpdateByUniqueAttributeAsync("azure_storage_account", body); ]]> This sample shows how to call UpdateByUniqueAttribute. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -AtlasEntityWithExtInfo body = new AtlasEntityWithExtInfo(); -Response response = client.UpdateByUniqueAttribute("", body); -]]> -This sample shows how to call UpdateByUniqueAttribute with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); AtlasEntityWithExtInfo body = new AtlasEntityWithExtInfo { - ReferredEntities = + ReferredEntities = { }, + Entity = new AtlasEntity { - ["key"] = new AtlasEntity + Attributes = { - Attributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - TypeName = "", - LastModifiedTS = "", - BusinessAttributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - Classifications = {new AtlasClassification - { - Attributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - TypeName = "", - LastModifiedTS = "", - EntityGuid = "", - EntityStatus = EntityStatus.Active, - RemovePropagationsOnEntityDelete = true, - ValidityPeriods = {new TimeBoundary - { - EndTime = "", - StartTime = "", - TimeZone = "", - }}, - }}, - CreateTime = 1234L, - CreatedBy = "", - CustomAttributes = - { - ["key"] = "" - }, - Guid = "", - HomeId = "", - IsIncomplete = true, - Labels = {""}, - Meanings = {new AtlasTermAssignmentHeader - { - Confidence = 1234, - CreatedBy = "", - Description = "", - DisplayText = "", - Expression = "", - RelationGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), - Status = AtlasTermAssignmentStatus.Discovered, - Steward = "", - TermGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), - }}, - ProvenanceType = 1234, - Proxy = true, - RelationshipAttributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - Status = EntityStatus.Active, - UpdateTime = 1234L, - UpdatedBy = "", - Version = 1234L, - Contacts = - { - ["key"] = {new ContactInfo - { - Id = "", - Info = "", - }} - }, - } - }, - Entity = default, -}; -Response response = client.UpdateByUniqueAttribute("", body, attribute: ""); -]]> - - - -This sample shows how to call UpdateByUniqueAttributeAsync and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -using RequestContent content = RequestContent.Create(new object()); -Response response = await client.UpdateByUniqueAttributeAsync("", content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.ToString()); -]]> -This sample shows how to call UpdateByUniqueAttributeAsync with all parameters and request content and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -using RequestContent content = RequestContent.Create(new -{ - referredEntities = new - { - key = new + ["owner"] = BinaryData.FromObjectAsJson("ExampleOwner"), + ["qualifiedName"] = BinaryData.FromObjectAsJson("https://exampleaccount.core.windows.net"), + ["createTime"] = BinaryData.FromObjectAsJson(0), + ["name"] = BinaryData.FromObjectAsJson("ExampleNewName") + }, + TypeName = "azure_storage_account", + LastModifiedTS = "1", + CreateTime = 1605766397985, + CreatedBy = "8c062c84-5d25-449f-a990-9d8ab70b8ec7", + Guid = "dc507ccf-0c57-4165-9327-f37b0d13fda0", + RelationshipAttributes = { - attributes = new - { - key = new object(), - }, - typeName = "", - lastModifiedTS = "", - businessAttributes = new - { - key = new object(), - }, - classifications = new object[] - { - new - { - attributes = new - { - key = new object(), - }, - typeName = "", - lastModifiedTS = "", - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new object[] - { - new - { - endTime = "", - startTime = "", - timeZone = "", - } - }, - } - }, - createTime = 1234L, - createdBy = "", - customAttributes = new - { - key = "", - }, - guid = "", - homeId = "", - isIncomplete = true, - labels = new object[] - { - "" - }, - meanings = new object[] - { - new - { - confidence = 1234, - createdBy = "", - description = "", - displayText = "", - expression = "", - relationGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", - status = "DISCOVERED", - steward = "", - termGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", - } - }, - provenanceType = 1234, - proxy = true, - relationshipAttributes = new - { - key = new object(), - }, - status = "ACTIVE", - updateTime = 1234L, - updatedBy = "", - version = 1234L, - contacts = new - { - key = new object[] - { - new - { - id = "", - info = "", - } - }, - }, + ["services"] = BinaryData.FromObjectAsJson(Array.Empty()), + ["meanings"] = BinaryData.FromObjectAsJson(Array.Empty()) }, + Status = EntityStatus.Active, + UpdateTime = 1605766397985, + UpdatedBy = "8c062c84-5d25-449f-a990-9d8ab70b8ec7", + Version = 0, }, -}); -Response response = await client.UpdateByUniqueAttributeAsync("", content, attribute: ""); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meaningNames")[0].ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); +}; +Response response = client.UpdateByUniqueAttribute("azure_storage_account", body); ]]> - + -This sample shows how to call UpdateByUniqueAttribute and parse the result. +This sample shows how to call UpdateByUniqueAttributeAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -using RequestContent content = RequestContent.Create(new object()); -Response response = client.UpdateByUniqueAttribute("", content); +using RequestContent content = RequestContent.Create(new +{ + entity = new + { + createTime = 1605766397985, + createdBy = "8c062c84-5d25-449f-a990-9d8ab70b8ec7", + guid = "dc507ccf-0c57-4165-9327-f37b0d13fda0", + relationshipAttributes = new + { + services = Array.Empty(), + meanings = Array.Empty(), + }, + status = "ACTIVE", + updateTime = 1605766397985, + updatedBy = "8c062c84-5d25-449f-a990-9d8ab70b8ec7", + lastModifiedTS = "1", + version = 0, + attributes = new + { + owner = "ExampleOwner", + qualifiedName = "https://exampleaccount.core.windows.net", + createTime = 0, + name = "ExampleNewName", + }, + typeName = "azure_storage_account", + }, + referredEntities = new object(), +}); +Response response = await client.UpdateByUniqueAttributeAsync("azure_storage_account", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call UpdateByUniqueAttribute with all parameters and request content and parse the result. +]]> + + + +This sample shows how to call UpdateByUniqueAttribute and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); using RequestContent content = RequestContent.Create(new { - referredEntities = new + entity = new { - key = new + createTime = 1605766397985, + createdBy = "8c062c84-5d25-449f-a990-9d8ab70b8ec7", + guid = "dc507ccf-0c57-4165-9327-f37b0d13fda0", + relationshipAttributes = new { - attributes = new - { - key = new object(), - }, - typeName = "", - lastModifiedTS = "", - businessAttributes = new - { - key = new object(), - }, - classifications = new object[] - { - new - { - attributes = new - { - key = new object(), - }, - typeName = "", - lastModifiedTS = "", - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new object[] - { - new - { - endTime = "", - startTime = "", - timeZone = "", - } - }, - } - }, - createTime = 1234L, - createdBy = "", - customAttributes = new - { - key = "", - }, - guid = "", - homeId = "", - isIncomplete = true, - labels = new object[] - { - "" - }, - meanings = new object[] - { - new - { - confidence = 1234, - createdBy = "", - description = "", - displayText = "", - expression = "", - relationGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", - status = "DISCOVERED", - steward = "", - termGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", - } - }, - provenanceType = 1234, - proxy = true, - relationshipAttributes = new - { - key = new object(), - }, - status = "ACTIVE", - updateTime = 1234L, - updatedBy = "", - version = 1234L, - contacts = new - { - key = new object[] - { - new - { - id = "", - info = "", - } - }, - }, + services = Array.Empty(), + meanings = Array.Empty(), + }, + status = "ACTIVE", + updateTime = 1605766397985, + updatedBy = "8c062c84-5d25-449f-a990-9d8ab70b8ec7", + lastModifiedTS = "1", + version = 0, + attributes = new + { + owner = "ExampleOwner", + qualifiedName = "https://exampleaccount.core.windows.net", + createTime = 0, + name = "ExampleNewName", }, + typeName = "azure_storage_account", }, + referredEntities = new object(), }); -Response response = client.UpdateByUniqueAttribute("", content, attribute: ""); +Response response = client.UpdateByUniqueAttribute("azure_storage_account", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meaningNames")[0].ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); +Console.WriteLine(result.ToString()); ]]> This sample shows how to call DeleteByUniqueAttributeAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -Response response = await client.DeleteByUniqueAttributeAsync(""); -]]> -This sample shows how to call DeleteByUniqueAttributeAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -Response response = await client.DeleteByUniqueAttributeAsync("", attribute: ""); +Response response = await client.DeleteByUniqueAttributeAsync("azure_storage_account"); ]]> This sample shows how to call DeleteByUniqueAttribute. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -Response response = client.DeleteByUniqueAttribute(""); -]]> -This sample shows how to call DeleteByUniqueAttribute with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -Response response = client.DeleteByUniqueAttribute("", attribute: ""); +Response response = client.DeleteByUniqueAttribute("azure_storage_account"); ]]> This sample shows how to call DeleteByUniqueAttributeAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -Response response = await client.DeleteByUniqueAttributeAsync("", null, null); +Response response = await client.DeleteByUniqueAttributeAsync("azure_storage_account", "https://exampleaccount.core.windows.net", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call DeleteByUniqueAttributeAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -Response response = await client.DeleteByUniqueAttributeAsync("", "", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meaningNames")[0].ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); ]]> This sample shows how to call DeleteByUniqueAttribute and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -Response response = client.DeleteByUniqueAttribute("", null, null); +Response response = client.DeleteByUniqueAttribute("azure_storage_account", "https://exampleaccount.core.windows.net", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call DeleteByUniqueAttribute with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -Response response = client.DeleteByUniqueAttribute("", "", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meaningNames")[0].ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); ]]> This sample shows how to call RemoveClassificationByUniqueAttributeAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -Response response = await client.RemoveClassificationByUniqueAttributeAsync("", ""); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call RemoveClassificationByUniqueAttributeAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -Response response = await client.RemoveClassificationByUniqueAttributeAsync("", "", attribute: ""); +Response response = await client.RemoveClassificationByUniqueAttributeAsync("column", "MICROSOFT.FINANCIAL.US.ABA_ROUTING_NUMBER"); Console.WriteLine(response.Status); ]]> @@ -4006,21 +1938,11 @@ Console.WriteLine(response.Status); This sample shows how to call RemoveClassificationByUniqueAttribute. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -Response response = client.RemoveClassificationByUniqueAttribute("", ""); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call RemoveClassificationByUniqueAttribute with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -Response response = client.RemoveClassificationByUniqueAttribute("", "", attribute: ""); +Response response = client.RemoveClassificationByUniqueAttribute("column", "MICROSOFT.FINANCIAL.US.ABA_ROUTING_NUMBER"); Console.WriteLine(response.Status); ]]> @@ -4029,105 +1951,49 @@ Console.WriteLine(response.Status); This sample shows how to call AddClassificationsByUniqueAttributeAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -Response response = await client.AddClassificationsByUniqueAttributeAsync("", new AtlasClassification[] -{ - new AtlasClassification() -}); -]]> -This sample shows how to call AddClassificationsByUniqueAttributeAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -Response response = await client.AddClassificationsByUniqueAttributeAsync("", new AtlasClassification[] +Response response = await client.AddClassificationsByUniqueAttributeAsync("azure_storage_account", new AtlasClassification[] { new AtlasClassification { - Attributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - TypeName = "", - LastModifiedTS = "", - EntityGuid = "", - EntityStatus = EntityStatus.Active, - RemovePropagationsOnEntityDelete = true, - ValidityPeriods = {new TimeBoundary - { - EndTime = "", - StartTime = "", - TimeZone = "", - }}, + TypeName = "MICROSOFT.FINANCIAL.US.ABA_ROUTING_NUMBER", + }, + new AtlasClassification + { + TypeName = "MICROSOFT.FINANCIAL.CREDIT_CARD_NUMBER", } -}, attribute: ""); +}); ]]> This sample shows how to call AddClassificationsByUniqueAttribute. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -Response response = client.AddClassificationsByUniqueAttribute("", new AtlasClassification[] -{ - new AtlasClassification() -}); -]]> -This sample shows how to call AddClassificationsByUniqueAttribute with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -Response response = client.AddClassificationsByUniqueAttribute("", new AtlasClassification[] +Response response = client.AddClassificationsByUniqueAttribute("azure_storage_account", new AtlasClassification[] { new AtlasClassification { - Attributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - TypeName = "", - LastModifiedTS = "", - EntityGuid = "", - EntityStatus = EntityStatus.Active, - RemovePropagationsOnEntityDelete = true, - ValidityPeriods = {new TimeBoundary - { - EndTime = "", - StartTime = "", - TimeZone = "", - }}, + TypeName = "MICROSOFT.FINANCIAL.US.ABA_ROUTING_NUMBER", + }, + new AtlasClassification + { + TypeName = "MICROSOFT.FINANCIAL.CREDIT_CARD_NUMBER", } -}, attribute: ""); +}); ]]> This sample shows how to call AddClassificationsByUniqueAttributeAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -using RequestContent content = RequestContent.Create(new object[] -{ - new object() -}); -Response response = await client.AddClassificationsByUniqueAttributeAsync("", content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call AddClassificationsByUniqueAttributeAsync with all parameters and request content. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); @@ -4135,27 +2001,14 @@ using RequestContent content = RequestContent.Create(new object[] { new { - attributes = new - { - key = new object(), - }, - typeName = "", - lastModifiedTS = "", - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new object[] - { - new - { - endTime = "", - startTime = "", - timeZone = "", - } - }, + typeName = "MICROSOFT.FINANCIAL.US.ABA_ROUTING_NUMBER", + }, + new + { + typeName = "MICROSOFT.FINANCIAL.CREDIT_CARD_NUMBER", } }); -Response response = await client.AddClassificationsByUniqueAttributeAsync("", content, attribute: ""); +Response response = await client.AddClassificationsByUniqueAttributeAsync("azure_storage_account", content); Console.WriteLine(response.Status); ]]> @@ -4164,21 +2017,7 @@ Console.WriteLine(response.Status); This sample shows how to call AddClassificationsByUniqueAttribute. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -using RequestContent content = RequestContent.Create(new object[] -{ - new object() -}); -Response response = client.AddClassificationsByUniqueAttribute("", content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call AddClassificationsByUniqueAttribute with all parameters and request content. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); @@ -4186,27 +2025,14 @@ using RequestContent content = RequestContent.Create(new object[] { new { - attributes = new - { - key = new object(), - }, - typeName = "", - lastModifiedTS = "", - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new object[] - { - new - { - endTime = "", - startTime = "", - timeZone = "", - } - }, + typeName = "MICROSOFT.FINANCIAL.US.ABA_ROUTING_NUMBER", + }, + new + { + typeName = "MICROSOFT.FINANCIAL.CREDIT_CARD_NUMBER", } }); -Response response = client.AddClassificationsByUniqueAttribute("", content, attribute: ""); +Response response = client.AddClassificationsByUniqueAttribute("azure_storage_account", content); Console.WriteLine(response.Status); ]]> @@ -4215,105 +2041,49 @@ Console.WriteLine(response.Status); This sample shows how to call UpdateClassificationsUniqueByAttributeAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -Response response = await client.UpdateClassificationsUniqueByAttributeAsync("", new AtlasClassification[] -{ - new AtlasClassification() -}); -]]> -This sample shows how to call UpdateClassificationsUniqueByAttributeAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -Response response = await client.UpdateClassificationsUniqueByAttributeAsync("", new AtlasClassification[] +Response response = await client.UpdateClassificationsUniqueByAttributeAsync("azure_storage_account", new AtlasClassification[] { new AtlasClassification { - Attributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - TypeName = "", - LastModifiedTS = "", - EntityGuid = "", - EntityStatus = EntityStatus.Active, - RemovePropagationsOnEntityDelete = true, - ValidityPeriods = {new TimeBoundary - { - EndTime = "", - StartTime = "", - TimeZone = "", - }}, + TypeName = "MICROSOFT.FINANCIAL.US.ABA_ROUTING_NUMBER", + }, + new AtlasClassification + { + TypeName = "MICROSOFT.FINANCIAL.CREDIT_CARD_NUMBER", } -}, attribute: ""); +}); ]]> This sample shows how to call UpdateClassificationsUniqueByAttribute. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -Response response = client.UpdateClassificationsUniqueByAttribute("", new AtlasClassification[] -{ - new AtlasClassification() -}); -]]> -This sample shows how to call UpdateClassificationsUniqueByAttribute with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -Response response = client.UpdateClassificationsUniqueByAttribute("", new AtlasClassification[] +Response response = client.UpdateClassificationsUniqueByAttribute("azure_storage_account", new AtlasClassification[] { new AtlasClassification { - Attributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - TypeName = "", - LastModifiedTS = "", - EntityGuid = "", - EntityStatus = EntityStatus.Active, - RemovePropagationsOnEntityDelete = true, - ValidityPeriods = {new TimeBoundary - { - EndTime = "", - StartTime = "", - TimeZone = "", - }}, + TypeName = "MICROSOFT.FINANCIAL.US.ABA_ROUTING_NUMBER", + }, + new AtlasClassification + { + TypeName = "MICROSOFT.FINANCIAL.CREDIT_CARD_NUMBER", } -}, attribute: ""); +}); ]]> This sample shows how to call UpdateClassificationsUniqueByAttributeAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -using RequestContent content = RequestContent.Create(new object[] -{ - new object() -}); -Response response = await client.UpdateClassificationsUniqueByAttributeAsync("", content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call UpdateClassificationsUniqueByAttributeAsync with all parameters and request content. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); @@ -4321,27 +2091,14 @@ using RequestContent content = RequestContent.Create(new object[] { new { - attributes = new - { - key = new object(), - }, - typeName = "", - lastModifiedTS = "", - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new object[] - { - new - { - endTime = "", - startTime = "", - timeZone = "", - } - }, + typeName = "MICROSOFT.FINANCIAL.US.ABA_ROUTING_NUMBER", + }, + new + { + typeName = "MICROSOFT.FINANCIAL.CREDIT_CARD_NUMBER", } }); -Response response = await client.UpdateClassificationsUniqueByAttributeAsync("", content, attribute: ""); +Response response = await client.UpdateClassificationsUniqueByAttributeAsync("azure_storage_account", content); Console.WriteLine(response.Status); ]]> @@ -4350,21 +2107,7 @@ Console.WriteLine(response.Status); This sample shows how to call UpdateClassificationsUniqueByAttribute. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -using RequestContent content = RequestContent.Create(new object[] -{ - new object() -}); -Response response = client.UpdateClassificationsUniqueByAttribute("", content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call UpdateClassificationsUniqueByAttribute with all parameters and request content. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); @@ -4372,27 +2115,14 @@ using RequestContent content = RequestContent.Create(new object[] { new { - attributes = new - { - key = new object(), - }, - typeName = "", - lastModifiedTS = "", - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new object[] - { - new - { - endTime = "", - startTime = "", - timeZone = "", - } - }, + typeName = "MICROSOFT.FINANCIAL.US.ABA_ROUTING_NUMBER", + }, + new + { + typeName = "MICROSOFT.FINANCIAL.CREDIT_CARD_NUMBER", } }); -Response response = client.UpdateClassificationsUniqueByAttribute("", content, attribute: ""); +Response response = client.UpdateClassificationsUniqueByAttribute("azure_storage_account", content); Console.WriteLine(response.Status); ]]> @@ -4401,16 +2131,7 @@ Console.WriteLine(response.Status); This sample shows how to call BatchSetClassificationsAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -AtlasEntityHeaders body = new AtlasEntityHeaders(); -Response> response = await client.BatchSetClassificationsAsync(body); -]]> -This sample shows how to call BatchSetClassificationsAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); @@ -4418,71 +2139,40 @@ AtlasEntityHeaders body = new AtlasEntityHeaders { GuidHeaderMap = { - ["key"] = new AtlasEntityHeader + ["9fb74c11-ac48-4650-95bc-760665c5bd92"] = new AtlasEntityHeader { Attributes = { - ["key"] = BinaryData.FromObjectAsJson(new object()) + ["qualifiedName"] = BinaryData.FromObjectAsJson("https://exampleaccount1.core.windows.net") }, - TypeName = "", - LastModifiedTS = "", - ClassificationNames = {""}, + TypeName = "azure_storage_account", Classifications = {new AtlasClassification { - Attributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - TypeName = "", - LastModifiedTS = "", - EntityGuid = "", - EntityStatus = EntityStatus.Active, - RemovePropagationsOnEntityDelete = true, - ValidityPeriods = {new TimeBoundary - { - EndTime = "", - StartTime = "", - TimeZone = "", - }}, + TypeName = "MICROSOFT.PERSONAL.EMAIL", }}, - DisplayText = "", - Guid = "", - IsIncomplete = true, - Labels = {""}, - MeaningNames = {""}, - Meanings = {new AtlasTermAssignmentHeader + }, + ["7fcc43ab-55ea-45d4-9971-ce0443cb10bb"] = new AtlasEntityHeader + { + Attributes = { - Confidence = 1234, - CreatedBy = "", - Description = "", - DisplayText = "", - Expression = "", - RelationGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), - Status = AtlasTermAssignmentStatus.Discovered, - Steward = "", - TermGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), + ["qualifiedName"] = BinaryData.FromObjectAsJson("https://exampleaccount2.core.windows.net") + }, + TypeName = "azure_storage_account", + Classifications = {new AtlasClassification + { + TypeName = "MICROSOFT.PERSONAL.IPADDRESS", }}, - Status = EntityStatus.Active, } }, }; Response> response = await client.BatchSetClassificationsAsync(body); ]]> - - -This sample shows how to call BatchSetClassifications. -"); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -AtlasEntityHeaders body = new AtlasEntityHeaders(); -Response> response = client.BatchSetClassifications(body); -]]> -This sample shows how to call BatchSetClassifications with all parameters. + + +This sample shows how to call BatchSetClassifications. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); @@ -4490,51 +2180,29 @@ AtlasEntityHeaders body = new AtlasEntityHeaders { GuidHeaderMap = { - ["key"] = new AtlasEntityHeader + ["9fb74c11-ac48-4650-95bc-760665c5bd92"] = new AtlasEntityHeader { Attributes = { - ["key"] = BinaryData.FromObjectAsJson(new object()) + ["qualifiedName"] = BinaryData.FromObjectAsJson("https://exampleaccount1.core.windows.net") }, - TypeName = "", - LastModifiedTS = "", - ClassificationNames = {""}, + TypeName = "azure_storage_account", Classifications = {new AtlasClassification { - Attributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - TypeName = "", - LastModifiedTS = "", - EntityGuid = "", - EntityStatus = EntityStatus.Active, - RemovePropagationsOnEntityDelete = true, - ValidityPeriods = {new TimeBoundary - { - EndTime = "", - StartTime = "", - TimeZone = "", - }}, + TypeName = "MICROSOFT.PERSONAL.EMAIL", }}, - DisplayText = "", - Guid = "", - IsIncomplete = true, - Labels = {""}, - MeaningNames = {""}, - Meanings = {new AtlasTermAssignmentHeader + }, + ["7fcc43ab-55ea-45d4-9971-ce0443cb10bb"] = new AtlasEntityHeader + { + Attributes = + { + ["qualifiedName"] = BinaryData.FromObjectAsJson("https://exampleaccount2.core.windows.net") + }, + TypeName = "azure_storage_account", + Classifications = {new AtlasClassification { - Confidence = 1234, - CreatedBy = "", - Description = "", - DisplayText = "", - Expression = "", - RelationGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), - Status = AtlasTermAssignmentStatus.Discovered, - Steward = "", - TermGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), + TypeName = "MICROSOFT.PERSONAL.IPADDRESS", }}, - Status = EntityStatus.Active, } }, }; @@ -4545,90 +2213,44 @@ Response> response = client.BatchSetClassifications(body); This sample shows how to call BatchSetClassificationsAsync and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -using RequestContent content = RequestContent.Create(new object()); -Response response = await client.BatchSetClassificationsAsync(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result[0].ToString()); -]]> -This sample shows how to call BatchSetClassificationsAsync with all request content and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); using RequestContent content = RequestContent.Create(new { - guidHeaderMap = new + guidHeaderMap = new Dictionary { - key = new + ["9fb74c11-ac48-4650-95bc-760665c5bd92"] = new { attributes = new { - key = new object(), - }, - typeName = "", - lastModifiedTS = "", - classificationNames = new object[] - { - "" + qualifiedName = "https://exampleaccount1.core.windows.net", }, + typeName = "azure_storage_account", classifications = new object[] { new { - attributes = new - { - key = new object(), - }, - typeName = "", - lastModifiedTS = "", - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new object[] - { - new - { - endTime = "", - startTime = "", - timeZone = "", - } - }, + typeName = "MICROSOFT.PERSONAL.EMAIL", } }, - displayText = "", - guid = "", - isIncomplete = true, - labels = new object[] - { - "" - }, - meaningNames = new object[] + }, + ["7fcc43ab-55ea-45d4-9971-ce0443cb10bb"] = new + { + attributes = new { - "" + qualifiedName = "https://exampleaccount2.core.windows.net", }, - meanings = new object[] + typeName = "azure_storage_account", + classifications = new object[] { new { - confidence = 1234, - createdBy = "", - description = "", - displayText = "", - expression = "", - relationGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", - status = "DISCOVERED", - steward = "", - termGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", + typeName = "MICROSOFT.PERSONAL.IPADDRESS", } }, - status = "ACTIVE", - }, + } }, }); Response response = await client.BatchSetClassificationsAsync(content); @@ -4641,90 +2263,44 @@ Console.WriteLine(result[0].ToString()); This sample shows how to call BatchSetClassifications and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -using RequestContent content = RequestContent.Create(new object()); -Response response = client.BatchSetClassifications(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result[0].ToString()); -]]> -This sample shows how to call BatchSetClassifications with all request content and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); using RequestContent content = RequestContent.Create(new { - guidHeaderMap = new + guidHeaderMap = new Dictionary { - key = new + ["9fb74c11-ac48-4650-95bc-760665c5bd92"] = new { attributes = new { - key = new object(), - }, - typeName = "", - lastModifiedTS = "", - classificationNames = new object[] - { - "" + qualifiedName = "https://exampleaccount1.core.windows.net", }, + typeName = "azure_storage_account", classifications = new object[] { new { - attributes = new - { - key = new object(), - }, - typeName = "", - lastModifiedTS = "", - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new object[] - { - new - { - endTime = "", - startTime = "", - timeZone = "", - } - }, + typeName = "MICROSOFT.PERSONAL.EMAIL", } }, - displayText = "", - guid = "", - isIncomplete = true, - labels = new object[] - { - "" - }, - meaningNames = new object[] + }, + ["7fcc43ab-55ea-45d4-9971-ce0443cb10bb"] = new + { + attributes = new { - "" + qualifiedName = "https://exampleaccount2.core.windows.net", }, - meanings = new object[] + typeName = "azure_storage_account", + classifications = new object[] { new { - confidence = 1234, - createdBy = "", - description = "", - displayText = "", - expression = "", - relationGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", - status = "DISCOVERED", - steward = "", - termGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", + typeName = "MICROSOFT.PERSONAL.IPADDRESS", } }, - status = "ACTIVE", - }, + } }, }); Response response = client.BatchSetClassifications(content); @@ -4737,413 +2313,115 @@ Console.WriteLine(result[0].ToString()); This sample shows how to call BatchGetByUniqueAttributesAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -Response response = await client.BatchGetByUniqueAttributesAsync(""); -]]> -This sample shows how to call BatchGetByUniqueAttributesAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -Response response = await client.BatchGetByUniqueAttributesAsync("", minExtInfo: true, ignoreRelationships: true, attrNQualifiedName: ""); +Response response = await client.BatchGetByUniqueAttributesAsync("azure_storage_account"); ]]> This sample shows how to call BatchGetByUniqueAttributes. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -Response response = client.BatchGetByUniqueAttributes(""); -]]> -This sample shows how to call BatchGetByUniqueAttributes with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -Response response = client.BatchGetByUniqueAttributes("", minExtInfo: true, ignoreRelationships: true, attrNQualifiedName: ""); +Response response = client.BatchGetByUniqueAttributes("azure_storage_account"); ]]> This sample shows how to call BatchGetByUniqueAttributesAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -Response response = await client.BatchGetByUniqueAttributesAsync("", null, null, null, null); +Response response = await client.BatchGetByUniqueAttributesAsync("azure_storage_account", true, null, "adl://exampleaccount.azuredatalakestore.net/123/1/DP_TFS/CBT/Extensions/DTTP.targets#:xml/Project/PropertyGroup/ExampleName1", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call BatchGetByUniqueAttributesAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -Response response = await client.BatchGetByUniqueAttributesAsync("", true, true, "", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("businessAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("customAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("homeId").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("collectionId").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("provenanceType").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("proxy").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("relationshipAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("businessAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("customAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("homeId").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("collectionId").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("provenanceType").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("proxy").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("relationshipAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); ]]> This sample shows how to call BatchGetByUniqueAttributes and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -Response response = client.BatchGetByUniqueAttributes("", null, null, null, null); +Response response = client.BatchGetByUniqueAttributes("azure_storage_account", true, null, "adl://exampleaccount.azuredatalakestore.net/123/1/DP_TFS/CBT/Extensions/DTTP.targets#:xml/Project/PropertyGroup/ExampleName1", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call BatchGetByUniqueAttributes with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -Response response = client.BatchGetByUniqueAttributes("", true, true, "", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("businessAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("customAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("homeId").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("collectionId").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("provenanceType").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("proxy").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("relationshipAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("businessAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("customAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("homeId").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("collectionId").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("provenanceType").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("proxy").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("relationshipAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); ]]> This sample shows how to call GetHeaderAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -Response response = await client.GetHeaderAsync(""); -]]> -This sample shows how to call GetHeaderAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -Response response = await client.GetHeaderAsync(""); +Response response = await client.GetHeaderAsync("9fb74c11-ac48-4650-95bc-760665c5bd92"); ]]> This sample shows how to call GetHeader. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -Response response = client.GetHeader(""); -]]> -This sample shows how to call GetHeader with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -Response response = client.GetHeader(""); +Response response = client.GetHeader("9fb74c11-ac48-4650-95bc-760665c5bd92"); ]]> This sample shows how to call GetHeaderAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -Response response = await client.GetHeaderAsync("", null); +Response response = await client.GetHeaderAsync("9fb74c11-ac48-4650-95bc-760665c5bd92", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetHeaderAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -Response response = await client.GetHeaderAsync("", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("classificationNames")[0].ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("meaningNames")[0].ToString()); -Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("status").ToString()); ]]> This sample shows how to call GetHeader and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -Response response = client.GetHeader("", null); +Response response = client.GetHeader("9fb74c11-ac48-4650-95bc-760665c5bd92", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetHeader with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -Response response = client.GetHeader("", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("classificationNames")[0].ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("meaningNames")[0].ToString()); -Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("status").ToString()); ]]> This sample shows how to call RemoveBusinessMetadataAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -Response response = await client.RemoveBusinessMetadataAsync("", new Dictionary> -{ - ["key"] = new Dictionary - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - } -}); -]]> -This sample shows how to call RemoveBusinessMetadataAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -Response response = await client.RemoveBusinessMetadataAsync("", new Dictionary> +Response response = await client.RemoveBusinessMetadataAsync("02c373fe-2823-4be3-97fa-55180a9faa06", new Dictionary> { - ["key"] = new Dictionary + ["myBizMetadata1"] = new Dictionary { - ["key"] = BinaryData.FromObjectAsJson(new object()) + ["bizAttr1"] = BinaryData.FromObjectAsJson("myBizMetaData1.bizAttr1") } }); ]]> @@ -5152,29 +2430,15 @@ Response response = await client.RemoveBusinessMetadataAsync("", new Dicti This sample shows how to call RemoveBusinessMetadata. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -Response response = client.RemoveBusinessMetadata("", new Dictionary> -{ - ["key"] = new Dictionary - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - } -}); -]]> -This sample shows how to call RemoveBusinessMetadata with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -Response response = client.RemoveBusinessMetadata("", new Dictionary> +Response response = client.RemoveBusinessMetadata("02c373fe-2823-4be3-97fa-55180a9faa06", new Dictionary> { - ["key"] = new Dictionary + ["myBizMetadata1"] = new Dictionary { - ["key"] = BinaryData.FromObjectAsJson(new object()) + ["bizAttr1"] = BinaryData.FromObjectAsJson("myBizMetaData1.bizAttr1") } }); ]]> @@ -5183,35 +2447,18 @@ Response response = client.RemoveBusinessMetadata("", new Dictionary This sample shows how to call RemoveBusinessMetadataAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -using RequestContent content = RequestContent.Create(new -{ - key = new - { - key = new object(), - }, -}); -Response response = await client.RemoveBusinessMetadataAsync("", content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call RemoveBusinessMetadataAsync with all parameters and request content. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); using RequestContent content = RequestContent.Create(new { - key = new + myBizMetadata1 = new { - key = new object(), + bizAttr1 = "myBizMetaData1.bizAttr1", }, }); -Response response = await client.RemoveBusinessMetadataAsync("", content); +Response response = await client.RemoveBusinessMetadataAsync("02c373fe-2823-4be3-97fa-55180a9faa06", content); Console.WriteLine(response.Status); ]]> @@ -5220,35 +2467,18 @@ Console.WriteLine(response.Status); This sample shows how to call RemoveBusinessMetadata. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -using RequestContent content = RequestContent.Create(new -{ - key = new - { - key = new object(), - }, -}); -Response response = client.RemoveBusinessMetadata("", content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call RemoveBusinessMetadata with all parameters and request content. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); using RequestContent content = RequestContent.Create(new { - key = new + myBizMetadata1 = new { - key = new object(), + bizAttr1 = "myBizMetaData1.bizAttr1", }, }); -Response response = client.RemoveBusinessMetadata("", content); +Response response = client.RemoveBusinessMetadata("02c373fe-2823-4be3-97fa-55180a9faa06", content); Console.WriteLine(response.Status); ]]> @@ -5257,97 +2487,52 @@ Console.WriteLine(response.Status); This sample shows how to call AddOrUpdateBusinessMetadataAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -Response response = await client.AddOrUpdateBusinessMetadataAsync("", new Dictionary> +Response response = await client.AddOrUpdateBusinessMetadataAsync("02c373fe-2823-4be3-97fa-55180a9faa06", new Dictionary> { - ["key"] = new Dictionary + ["myBizMetadata1"] = new Dictionary { - ["key"] = BinaryData.FromObjectAsJson(new object()) + ["bizAttr1"] = BinaryData.FromObjectAsJson("myBizMetaData1.bizAttr1") } }); -]]> -This sample shows how to call AddOrUpdateBusinessMetadataAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -Response response = await client.AddOrUpdateBusinessMetadataAsync("", new Dictionary> -{ - ["key"] = new Dictionary - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - } -}, overwrite: true); ]]> This sample shows how to call AddOrUpdateBusinessMetadata. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -Response response = client.AddOrUpdateBusinessMetadata("", new Dictionary> +Response response = client.AddOrUpdateBusinessMetadata("02c373fe-2823-4be3-97fa-55180a9faa06", new Dictionary> { - ["key"] = new Dictionary + ["myBizMetadata1"] = new Dictionary { - ["key"] = BinaryData.FromObjectAsJson(new object()) + ["bizAttr1"] = BinaryData.FromObjectAsJson("myBizMetaData1.bizAttr1") } }); -]]> -This sample shows how to call AddOrUpdateBusinessMetadata with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -Response response = client.AddOrUpdateBusinessMetadata("", new Dictionary> -{ - ["key"] = new Dictionary - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - } -}, overwrite: true); ]]> This sample shows how to call AddOrUpdateBusinessMetadataAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -using RequestContent content = RequestContent.Create(new -{ - key = new - { - key = new object(), - }, -}); -Response response = await client.AddOrUpdateBusinessMetadataAsync("", content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call AddOrUpdateBusinessMetadataAsync with all parameters and request content. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); using RequestContent content = RequestContent.Create(new { - key = new + myBizMetadata1 = new { - key = new object(), + bizAttr1 = "myBizMetaData1.bizAttr1", }, }); -Response response = await client.AddOrUpdateBusinessMetadataAsync("", content, overwrite: true); +Response response = await client.AddOrUpdateBusinessMetadataAsync("02c373fe-2823-4be3-97fa-55180a9faa06", content); Console.WriteLine(response.Status); ]]> @@ -5356,35 +2541,18 @@ Console.WriteLine(response.Status); This sample shows how to call AddOrUpdateBusinessMetadata. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -using RequestContent content = RequestContent.Create(new -{ - key = new - { - key = new object(), - }, -}); -Response response = client.AddOrUpdateBusinessMetadata("", content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call AddOrUpdateBusinessMetadata with all parameters and request content. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); using RequestContent content = RequestContent.Create(new { - key = new + myBizMetadata1 = new { - key = new object(), + bizAttr1 = "myBizMetaData1.bizAttr1", }, }); -Response response = client.AddOrUpdateBusinessMetadata("", content, overwrite: true); +Response response = client.AddOrUpdateBusinessMetadata("02c373fe-2823-4be3-97fa-55180a9faa06", content); Console.WriteLine(response.Status); ]]> @@ -5393,24 +2561,13 @@ Console.WriteLine(response.Status); This sample shows how to call RemoveBusinessMetadataAttributesAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -Response response = await client.RemoveBusinessMetadataAttributesAsync("", "", new Dictionary -{ - ["key"] = BinaryData.FromObjectAsJson(new object()) -}); -]]> -This sample shows how to call RemoveBusinessMetadataAttributesAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -Response response = await client.RemoveBusinessMetadataAttributesAsync("", "", new Dictionary +Response response = await client.RemoveBusinessMetadataAttributesAsync("02c373fe-2823-4be3-97fa-55180a9faa06", "myBizMetaData1", new Dictionary { - ["key"] = BinaryData.FromObjectAsJson(new object()) + ["bizAttr1"] = BinaryData.FromObjectAsJson("bizAttr1") }); ]]> @@ -5418,24 +2575,13 @@ Response response = await client.RemoveBusinessMetadataAttributesAsync("", This sample shows how to call RemoveBusinessMetadataAttributes. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -Response response = client.RemoveBusinessMetadataAttributes("", "", new Dictionary -{ - ["key"] = BinaryData.FromObjectAsJson(new object()) -}); -]]> -This sample shows how to call RemoveBusinessMetadataAttributes with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -Response response = client.RemoveBusinessMetadataAttributes("", "", new Dictionary +Response response = client.RemoveBusinessMetadataAttributes("02c373fe-2823-4be3-97fa-55180a9faa06", "myBizMetaData1", new Dictionary { - ["key"] = BinaryData.FromObjectAsJson(new object()) + ["bizAttr1"] = BinaryData.FromObjectAsJson("bizAttr1") }); ]]> @@ -5443,29 +2589,15 @@ Response response = client.RemoveBusinessMetadataAttributes("", " This sample shows how to call RemoveBusinessMetadataAttributesAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -using RequestContent content = RequestContent.Create(new -{ - key = new object(), -}); -Response response = await client.RemoveBusinessMetadataAttributesAsync("", "", content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call RemoveBusinessMetadataAttributesAsync with all parameters and request content. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); using RequestContent content = RequestContent.Create(new { - key = new object(), + bizAttr1 = "bizAttr1", }); -Response response = await client.RemoveBusinessMetadataAttributesAsync("", "", content); +Response response = await client.RemoveBusinessMetadataAttributesAsync("02c373fe-2823-4be3-97fa-55180a9faa06", "myBizMetaData1", content); Console.WriteLine(response.Status); ]]> @@ -5474,29 +2606,15 @@ Console.WriteLine(response.Status); This sample shows how to call RemoveBusinessMetadataAttributes. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -using RequestContent content = RequestContent.Create(new -{ - key = new object(), -}); -Response response = client.RemoveBusinessMetadataAttributes("", "", content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call RemoveBusinessMetadataAttributes with all parameters and request content. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); using RequestContent content = RequestContent.Create(new { - key = new object(), + bizAttr1 = "bizAttr1", }); -Response response = client.RemoveBusinessMetadataAttributes("", "", content); +Response response = client.RemoveBusinessMetadataAttributes("02c373fe-2823-4be3-97fa-55180a9faa06", "myBizMetaData1", content); Console.WriteLine(response.Status); ]]> @@ -5505,24 +2623,13 @@ Console.WriteLine(response.Status); This sample shows how to call AddOrUpdateBusinessMetadataAttributesAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -Response response = await client.AddOrUpdateBusinessMetadataAttributesAsync("", "", new Dictionary -{ - ["key"] = BinaryData.FromObjectAsJson(new object()) -}); -]]> -This sample shows how to call AddOrUpdateBusinessMetadataAttributesAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -Response response = await client.AddOrUpdateBusinessMetadataAttributesAsync("", "", new Dictionary +Response response = await client.AddOrUpdateBusinessMetadataAttributesAsync("02c373fe-2823-4be3-97fa-55180a9faa06", "myBizMetaData1", new Dictionary { - ["key"] = BinaryData.FromObjectAsJson(new object()) + ["bizAttr1"] = BinaryData.FromObjectAsJson("bizAttr1") }); ]]> @@ -5530,24 +2637,13 @@ Response response = await client.AddOrUpdateBusinessMetadataAttributesAsync(" This sample shows how to call AddOrUpdateBusinessMetadataAttributes. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -Response response = client.AddOrUpdateBusinessMetadataAttributes("", "", new Dictionary -{ - ["key"] = BinaryData.FromObjectAsJson(new object()) -}); -]]> -This sample shows how to call AddOrUpdateBusinessMetadataAttributes with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -Response response = client.AddOrUpdateBusinessMetadataAttributes("", "", new Dictionary +Response response = client.AddOrUpdateBusinessMetadataAttributes("02c373fe-2823-4be3-97fa-55180a9faa06", "myBizMetaData1", new Dictionary { - ["key"] = BinaryData.FromObjectAsJson(new object()) + ["bizAttr1"] = BinaryData.FromObjectAsJson("bizAttr1") }); ]]> @@ -5555,60 +2651,32 @@ Response response = client.AddOrUpdateBusinessMetadataAttributes("", " This sample shows how to call AddOrUpdateBusinessMetadataAttributesAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -using RequestContent content = RequestContent.Create(new -{ - key = new object(), -}); -Response response = await client.AddOrUpdateBusinessMetadataAttributesAsync("", "", content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call AddOrUpdateBusinessMetadataAttributesAsync with all parameters and request content. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); using RequestContent content = RequestContent.Create(new { - key = new object(), + bizAttr1 = "bizAttr1", }); -Response response = await client.AddOrUpdateBusinessMetadataAttributesAsync("", "", content); +Response response = await client.AddOrUpdateBusinessMetadataAttributesAsync("02c373fe-2823-4be3-97fa-55180a9faa06", "myBizMetaData1", content); Console.WriteLine(response.Status); ]]> - -This sample shows how to call AddOrUpdateBusinessMetadataAttributes. -"); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -using RequestContent content = RequestContent.Create(new -{ - key = new object(), -}); -Response response = client.AddOrUpdateBusinessMetadataAttributes("", "", content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call AddOrUpdateBusinessMetadataAttributes with all parameters and request content. + +This sample shows how to call AddOrUpdateBusinessMetadataAttributes. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); using RequestContent content = RequestContent.Create(new { - key = new object(), + bizAttr1 = "bizAttr1", }); -Response response = client.AddOrUpdateBusinessMetadataAttributes("", "", content); +Response response = client.AddOrUpdateBusinessMetadataAttributes("02c373fe-2823-4be3-97fa-55180a9faa06", "myBizMetaData1", content); Console.WriteLine(response.Status); ]]> @@ -5617,15 +2685,7 @@ Console.WriteLine(response.Status); This sample shows how to call GetBusinessMetadataTemplateAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -Response response = await client.GetBusinessMetadataTemplateAsync(); -]]> -This sample shows how to call GetBusinessMetadataTemplateAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); @@ -5636,15 +2696,7 @@ Response response = await client.GetBusinessMetadataTemplateAsync(); This sample shows how to call GetBusinessMetadataTemplate. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -Response response = client.GetBusinessMetadataTemplate(); -]]> -This sample shows how to call GetBusinessMetadataTemplate with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); @@ -5655,18 +2707,7 @@ Response response = client.GetBusinessMetadataTemplate(); This sample shows how to call GetBusinessMetadataTemplateAsync and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -Response response = await client.GetBusinessMetadataTemplateAsync(null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetBusinessMetadataTemplateAsync with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); @@ -5680,18 +2721,7 @@ Console.WriteLine(result.ToString()); This sample shows how to call GetBusinessMetadataTemplate and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -Response response = client.GetBusinessMetadataTemplate(null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetBusinessMetadataTemplate with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); @@ -5705,20 +2735,11 @@ Console.WriteLine(result.ToString()); This sample shows how to call ImportBusinessMetadataAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -BusinessMetadataOptions body = new BusinessMetadataOptions(null); -Response response = await client.ImportBusinessMetadataAsync(body); -]]> -This sample shows how to call ImportBusinessMetadataAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -BusinessMetadataOptions body = new BusinessMetadataOptions(null); +BusinessMetadataOptions body = null; Response response = await client.ImportBusinessMetadataAsync(body); ]]> @@ -5726,20 +2747,11 @@ Response response = await client.ImportBusinessMetadataAsync(b This sample shows how to call ImportBusinessMetadata. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -BusinessMetadataOptions body = new BusinessMetadataOptions(null); -Response response = client.ImportBusinessMetadata(body); -]]> -This sample shows how to call ImportBusinessMetadata with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -BusinessMetadataOptions body = new BusinessMetadataOptions(null); +BusinessMetadataOptions body = null; Response response = client.ImportBusinessMetadata(body); ]]> @@ -5747,144 +2759,68 @@ Response response = client.ImportBusinessMetadata(body); This sample shows how to call ImportBusinessMetadataAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -using RequestContent content = RequestContent.Create(new -{ - file = File.OpenRead(""), -}); -Response response = await client.ImportBusinessMetadataAsync(content, "multipart/form-data"); +using RequestContent content = null; +Response response = await client.ImportBusinessMetadataAsync(content, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call ImportBusinessMetadataAsync with all parameters and request content and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -using RequestContent content = RequestContent.Create(new -{ - file = File.OpenRead(""), -}); -Response response = await client.ImportBusinessMetadataAsync(content, "multipart/form-data"); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("failedImportInfoList")[0].GetProperty("childObjectName").ToString()); -Console.WriteLine(result.GetProperty("failedImportInfoList")[0].GetProperty("importStatus").ToString()); -Console.WriteLine(result.GetProperty("failedImportInfoList")[0].GetProperty("parentObjectName").ToString()); -Console.WriteLine(result.GetProperty("failedImportInfoList")[0].GetProperty("remarks").ToString()); -Console.WriteLine(result.GetProperty("successImportInfoList")[0].GetProperty("childObjectName").ToString()); -Console.WriteLine(result.GetProperty("successImportInfoList")[0].GetProperty("importStatus").ToString()); -Console.WriteLine(result.GetProperty("successImportInfoList")[0].GetProperty("parentObjectName").ToString()); -Console.WriteLine(result.GetProperty("successImportInfoList")[0].GetProperty("remarks").ToString()); ]]> This sample shows how to call ImportBusinessMetadata and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -using RequestContent content = RequestContent.Create(new -{ - file = File.OpenRead(""), -}); -Response response = client.ImportBusinessMetadata(content, "multipart/form-data"); +using RequestContent content = null; +Response response = client.ImportBusinessMetadata(content, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call ImportBusinessMetadata with all parameters and request content and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -using RequestContent content = RequestContent.Create(new -{ - file = File.OpenRead(""), -}); -Response response = client.ImportBusinessMetadata(content, "multipart/form-data"); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("failedImportInfoList")[0].GetProperty("childObjectName").ToString()); -Console.WriteLine(result.GetProperty("failedImportInfoList")[0].GetProperty("importStatus").ToString()); -Console.WriteLine(result.GetProperty("failedImportInfoList")[0].GetProperty("parentObjectName").ToString()); -Console.WriteLine(result.GetProperty("failedImportInfoList")[0].GetProperty("remarks").ToString()); -Console.WriteLine(result.GetProperty("successImportInfoList")[0].GetProperty("childObjectName").ToString()); -Console.WriteLine(result.GetProperty("successImportInfoList")[0].GetProperty("importStatus").ToString()); -Console.WriteLine(result.GetProperty("successImportInfoList")[0].GetProperty("parentObjectName").ToString()); -Console.WriteLine(result.GetProperty("successImportInfoList")[0].GetProperty("remarks").ToString()); ]]> This sample shows how to call RemoveLabelsAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -Response response = await client.RemoveLabelsAsync(""); -]]> -This sample shows how to call RemoveLabelsAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -Response response = await client.RemoveLabelsAsync("", body: new string[] { "" }); +Response response = await client.RemoveLabelsAsync("02c373fe-2823-4be3-97fa-55180a9faa06"); ]]> This sample shows how to call RemoveLabels. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -Response response = client.RemoveLabels(""); -]]> -This sample shows how to call RemoveLabels with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -Response response = client.RemoveLabels("", body: new string[] { "" }); +Response response = client.RemoveLabels("02c373fe-2823-4be3-97fa-55180a9faa06"); ]]> This sample shows how to call RemoveLabelsAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -using RequestContent content = null; -Response response = await client.RemoveLabelsAsync("", content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call RemoveLabelsAsync with all parameters and request content. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); using RequestContent content = RequestContent.Create(new object[] { - "" + "label1", + "label2" }); -Response response = await client.RemoveLabelsAsync("", content); +Response response = await client.RemoveLabelsAsync("02c373fe-2823-4be3-97fa-55180a9faa06", content); Console.WriteLine(response.Status); ]]> @@ -5893,26 +2829,16 @@ Console.WriteLine(response.Status); This sample shows how to call RemoveLabels. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -using RequestContent content = null; -Response response = client.RemoveLabels("", content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call RemoveLabels with all parameters and request content. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); using RequestContent content = RequestContent.Create(new object[] { - "" + "label1", + "label2" }); -Response response = client.RemoveLabels("", content); +Response response = client.RemoveLabels("02c373fe-2823-4be3-97fa-55180a9faa06", content); Console.WriteLine(response.Status); ]]> @@ -5921,64 +2847,38 @@ Console.WriteLine(response.Status); This sample shows how to call SetLabelsAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -Response response = await client.SetLabelsAsync(""); -]]> -This sample shows how to call SetLabelsAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -Response response = await client.SetLabelsAsync("", body: new string[] { "" }); +Response response = await client.SetLabelsAsync("02c373fe-2823-4be3-97fa-55180a9faa06"); ]]> This sample shows how to call SetLabels. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -Response response = client.SetLabels(""); -]]> -This sample shows how to call SetLabels with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -Response response = client.SetLabels("", body: new string[] { "" }); +Response response = client.SetLabels("02c373fe-2823-4be3-97fa-55180a9faa06"); ]]> This sample shows how to call SetLabelsAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -using RequestContent content = null; -Response response = await client.SetLabelsAsync("", content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call SetLabelsAsync with all parameters and request content. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); using RequestContent content = RequestContent.Create(new object[] { - "" + "label1", + "label2" }); -Response response = await client.SetLabelsAsync("", content); +Response response = await client.SetLabelsAsync("02c373fe-2823-4be3-97fa-55180a9faa06", content); Console.WriteLine(response.Status); ]]> @@ -5987,26 +2887,16 @@ Console.WriteLine(response.Status); This sample shows how to call SetLabels. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -using RequestContent content = null; -Response response = client.SetLabels("", content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call SetLabels with all parameters and request content. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); using RequestContent content = RequestContent.Create(new object[] { - "" + "label1", + "label2" }); -Response response = client.SetLabels("", content); +Response response = client.SetLabels("02c373fe-2823-4be3-97fa-55180a9faa06", content); Console.WriteLine(response.Status); ]]> @@ -6015,64 +2905,38 @@ Console.WriteLine(response.Status); This sample shows how to call AddLabelAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -Response response = await client.AddLabelAsync(""); -]]> -This sample shows how to call AddLabelAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -Response response = await client.AddLabelAsync("", body: new string[] { "" }); +Response response = await client.AddLabelAsync("02c373fe-2823-4be3-97fa-55180a9faa06"); ]]> This sample shows how to call AddLabel. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -Response response = client.AddLabel(""); -]]> -This sample shows how to call AddLabel with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -Response response = client.AddLabel("", body: new string[] { "" }); +Response response = client.AddLabel("02c373fe-2823-4be3-97fa-55180a9faa06"); ]]> This sample shows how to call AddLabelAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -using RequestContent content = null; -Response response = await client.AddLabelAsync("", content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call AddLabelAsync with all parameters and request content. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); using RequestContent content = RequestContent.Create(new object[] { - "" + "label1", + "label2" }); -Response response = await client.AddLabelAsync("", content); +Response response = await client.AddLabelAsync("02c373fe-2823-4be3-97fa-55180a9faa06", content); Console.WriteLine(response.Status); ]]> @@ -6081,26 +2945,16 @@ Console.WriteLine(response.Status); This sample shows how to call AddLabel. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -using RequestContent content = null; -Response response = client.AddLabel("", content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call AddLabel with all parameters and request content. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); using RequestContent content = RequestContent.Create(new object[] { - "" + "label1", + "label2" }); -Response response = client.AddLabel("", content); +Response response = client.AddLabel("02c373fe-2823-4be3-97fa-55180a9faa06", content); Console.WriteLine(response.Status); ]]> @@ -6109,64 +2963,37 @@ Console.WriteLine(response.Status); This sample shows how to call RemoveLabelsByUniqueAttributeAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -Response response = await client.RemoveLabelsByUniqueAttributeAsync(""); -]]> -This sample shows how to call RemoveLabelsByUniqueAttributeAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -Response response = await client.RemoveLabelsByUniqueAttributeAsync("", body: new string[] { "" }, attribute: ""); +Response response = await client.RemoveLabelsByUniqueAttributeAsync("Asset"); ]]> This sample shows how to call RemoveLabelsByUniqueAttribute. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -Response response = client.RemoveLabelsByUniqueAttribute(""); -]]> -This sample shows how to call RemoveLabelsByUniqueAttribute with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -Response response = client.RemoveLabelsByUniqueAttribute("", body: new string[] { "" }, attribute: ""); +Response response = client.RemoveLabelsByUniqueAttribute("Asset"); ]]> This sample shows how to call RemoveLabelsByUniqueAttributeAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -using RequestContent content = null; -Response response = await client.RemoveLabelsByUniqueAttributeAsync("", content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call RemoveLabelsByUniqueAttributeAsync with all parameters and request content. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); using RequestContent content = RequestContent.Create(new object[] { - "" + "label1" }); -Response response = await client.RemoveLabelsByUniqueAttributeAsync("", content, attribute: ""); +Response response = await client.RemoveLabelsByUniqueAttributeAsync("Asset", content); Console.WriteLine(response.Status); ]]> @@ -6175,26 +3002,15 @@ Console.WriteLine(response.Status); This sample shows how to call RemoveLabelsByUniqueAttribute. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -using RequestContent content = null; -Response response = client.RemoveLabelsByUniqueAttribute("", content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call RemoveLabelsByUniqueAttribute with all parameters and request content. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); using RequestContent content = RequestContent.Create(new object[] { - "" + "label1" }); -Response response = client.RemoveLabelsByUniqueAttribute("", content, attribute: ""); +Response response = client.RemoveLabelsByUniqueAttribute("Asset", content); Console.WriteLine(response.Status); ]]> @@ -6203,64 +3019,38 @@ Console.WriteLine(response.Status); This sample shows how to call SetLabelsByUniqueAttributeAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -Response response = await client.SetLabelsByUniqueAttributeAsync(""); -]]> -This sample shows how to call SetLabelsByUniqueAttributeAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -Response response = await client.SetLabelsByUniqueAttributeAsync("", body: new string[] { "" }, attribute: ""); +Response response = await client.SetLabelsByUniqueAttributeAsync("Asset"); ]]> This sample shows how to call SetLabelsByUniqueAttribute. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -Response response = client.SetLabelsByUniqueAttribute(""); -]]> -This sample shows how to call SetLabelsByUniqueAttribute with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -Response response = client.SetLabelsByUniqueAttribute("", body: new string[] { "" }, attribute: ""); +Response response = client.SetLabelsByUniqueAttribute("Asset"); ]]> This sample shows how to call SetLabelsByUniqueAttributeAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -using RequestContent content = null; -Response response = await client.SetLabelsByUniqueAttributeAsync("", content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call SetLabelsByUniqueAttributeAsync with all parameters and request content. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); using RequestContent content = RequestContent.Create(new object[] { - "" + "label1", + "label2" }); -Response response = await client.SetLabelsByUniqueAttributeAsync("", content, attribute: ""); +Response response = await client.SetLabelsByUniqueAttributeAsync("Asset", content); Console.WriteLine(response.Status); ]]> @@ -6269,26 +3059,16 @@ Console.WriteLine(response.Status); This sample shows how to call SetLabelsByUniqueAttribute. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -using RequestContent content = null; -Response response = client.SetLabelsByUniqueAttribute("", content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call SetLabelsByUniqueAttribute with all parameters and request content. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); using RequestContent content = RequestContent.Create(new object[] { - "" + "label1", + "label2" }); -Response response = client.SetLabelsByUniqueAttribute("", content, attribute: ""); +Response response = client.SetLabelsByUniqueAttribute("Asset", content); Console.WriteLine(response.Status); ]]> @@ -6297,64 +3077,37 @@ Console.WriteLine(response.Status); This sample shows how to call AddLabelsByUniqueAttributeAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -Response response = await client.AddLabelsByUniqueAttributeAsync(""); -]]> -This sample shows how to call AddLabelsByUniqueAttributeAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -Response response = await client.AddLabelsByUniqueAttributeAsync("", body: new string[] { "" }, attribute: ""); +Response response = await client.AddLabelsByUniqueAttributeAsync("Asset"); ]]> This sample shows how to call AddLabelsByUniqueAttribute. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -Response response = client.AddLabelsByUniqueAttribute(""); -]]> -This sample shows how to call AddLabelsByUniqueAttribute with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -Response response = client.AddLabelsByUniqueAttribute("", body: new string[] { "" }, attribute: ""); +Response response = client.AddLabelsByUniqueAttribute("Asset"); ]]> This sample shows how to call AddLabelsByUniqueAttributeAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -using RequestContent content = null; -Response response = await client.AddLabelsByUniqueAttributeAsync("", content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call AddLabelsByUniqueAttributeAsync with all parameters and request content. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); using RequestContent content = RequestContent.Create(new object[] { - "" + "label3" }); -Response response = await client.AddLabelsByUniqueAttributeAsync("", content, attribute: ""); +Response response = await client.AddLabelsByUniqueAttributeAsync("Asset", content); Console.WriteLine(response.Status); ]]> @@ -6363,26 +3116,15 @@ Console.WriteLine(response.Status); This sample shows how to call AddLabelsByUniqueAttribute. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - -using RequestContent content = null; -Response response = client.AddLabelsByUniqueAttribute("", content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call AddLabelsByUniqueAttribute with all parameters and request content. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); using RequestContent content = RequestContent.Create(new object[] { - "" + "label3" }); -Response response = client.AddLabelsByUniqueAttribute("", content, attribute: ""); +Response response = client.AddLabelsByUniqueAttribute("Asset", content); Console.WriteLine(response.Status); ]]> @@ -6391,67 +3133,37 @@ Console.WriteLine(response.Status); This sample shows how to call MoveEntitiesToCollectionAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); - -MoveEntitiesConfig body = new MoveEntitiesConfig(); -Response response = await client.MoveEntitiesToCollectionAsync("", body); -]]> -This sample shows how to call MoveEntitiesToCollectionAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); MoveEntitiesConfig body = new MoveEntitiesConfig { - EntityGuids = { "" }, + EntityGuids = { "321493e3-3fb7-4b3e-9df7-3b69154174c2", "b2f9c306-cf65-4bb0-878e-cfaafde156b1" }, }; -Response response = await client.MoveEntitiesToCollectionAsync("", body); +Response response = await client.MoveEntitiesToCollectionAsync("ExampleNewCollection", body); ]]> This sample shows how to call MoveEntitiesToCollection. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); - -MoveEntitiesConfig body = new MoveEntitiesConfig(); -Response response = client.MoveEntitiesToCollection("", body); -]]> -This sample shows how to call MoveEntitiesToCollection with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); MoveEntitiesConfig body = new MoveEntitiesConfig { - EntityGuids = { "" }, + EntityGuids = { "321493e3-3fb7-4b3e-9df7-3b69154174c2", "b2f9c306-cf65-4bb0-878e-cfaafde156b1" }, }; -Response response = client.MoveEntitiesToCollection("", body); +Response response = client.MoveEntitiesToCollection("ExampleNewCollection", body); ]]> This sample shows how to call MoveEntitiesToCollectionAsync and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); - -using RequestContent content = RequestContent.Create(new object()); -Response response = await client.MoveEntitiesToCollectionAsync("", content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.ToString()); -]]> -This sample shows how to call MoveEntitiesToCollectionAsync with all parameters and request content and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); @@ -6459,88 +3171,21 @@ using RequestContent content = RequestContent.Create(new { entityGuids = new object[] { - "" + "321493e3-3fb7-4b3e-9df7-3b69154174c2", + "b2f9c306-cf65-4bb0-878e-cfaafde156b1" }, }); -Response response = await client.MoveEntitiesToCollectionAsync("", content); +Response response = await client.MoveEntitiesToCollectionAsync("ExampleNewCollection", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meaningNames")[0].ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); +Console.WriteLine(result.ToString()); ]]> This sample shows how to call MoveEntitiesToCollection and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); - -using RequestContent content = RequestContent.Create(new object()); -Response response = client.MoveEntitiesToCollection("", content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.ToString()); -]]> -This sample shows how to call MoveEntitiesToCollection with all parameters and request content and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); @@ -6548,69 +3193,14 @@ using RequestContent content = RequestContent.Create(new { entityGuids = new object[] { - "" + "321493e3-3fb7-4b3e-9df7-3b69154174c2", + "b2f9c306-cf65-4bb0-878e-cfaafde156b1" }, }); -Response response = client.MoveEntitiesToCollection("", content); +Response response = client.MoveEntitiesToCollection("ExampleNewCollection", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meaningNames")[0].ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); +Console.WriteLine(result.ToString()); ]]> diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/Glossary.xml b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/Glossary.xml index 5a6a48f9976b..8cd07fbad95f 100644 --- a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/Glossary.xml +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/Glossary.xml @@ -5,221 +5,67 @@ This sample shows how to call BatchGetAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); Response> response = await client.BatchGetAsync(); -]]> -This sample shows how to call BatchGetAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); - -Response> response = await client.BatchGetAsync(limit: 1234, offset: 1234, sort: "", ignoreTermsAndCategories: true); ]]> This sample shows how to call BatchGet. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); Response> response = client.BatchGet(); -]]> -This sample shows how to call BatchGet with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); - -Response> response = client.BatchGet(limit: 1234, offset: 1234, sort: "", ignoreTermsAndCategories: true); ]]> This sample shows how to call BatchGetAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -Response response = await client.BatchGetAsync(null, null, null, null, null); +Response response = await client.BatchGetAsync(null, null, "ASC", null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].ToString()); -]]> -This sample shows how to call BatchGetAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); - -Response response = await client.BatchGetAsync(1234, 1234, "", true, null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result[0].GetProperty("guid").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result[0].GetProperty("longDescription").ToString()); -Console.WriteLine(result[0].GetProperty("name").ToString()); -Console.WriteLine(result[0].GetProperty("qualifiedName").ToString()); -Console.WriteLine(result[0].GetProperty("shortDescription").ToString()); -Console.WriteLine(result[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result[0].GetProperty("createTime").ToString()); -Console.WriteLine(result[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result[0].GetProperty("updateTime").ToString()); -Console.WriteLine(result[0].GetProperty("updatedBy").ToString()); -Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); -Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("description").ToString()); -Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("parentCategoryGuid").ToString()); -Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("language").ToString()); -Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("description").ToString()); -Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("status").ToString()); -Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result[0].GetProperty("usage").ToString()); ]]> This sample shows how to call BatchGet and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -Response response = client.BatchGet(null, null, null, null, null); +Response response = client.BatchGet(null, null, "ASC", null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].ToString()); -]]> -This sample shows how to call BatchGet with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); - -Response response = client.BatchGet(1234, 1234, "", true, null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result[0].GetProperty("guid").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result[0].GetProperty("longDescription").ToString()); -Console.WriteLine(result[0].GetProperty("name").ToString()); -Console.WriteLine(result[0].GetProperty("qualifiedName").ToString()); -Console.WriteLine(result[0].GetProperty("shortDescription").ToString()); -Console.WriteLine(result[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result[0].GetProperty("createTime").ToString()); -Console.WriteLine(result[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result[0].GetProperty("updateTime").ToString()); -Console.WriteLine(result[0].GetProperty("updatedBy").ToString()); -Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); -Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("description").ToString()); -Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("parentCategoryGuid").ToString()); -Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("language").ToString()); -Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("description").ToString()); -Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("status").ToString()); -Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result[0].GetProperty("usage").ToString()); ]]> This sample shows how to call CreateAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - -AtlasGlossary body = new AtlasGlossary(); -Response response = await client.CreateAsync(body); -]]> -This sample shows how to call CreateAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); AtlasGlossary body = new AtlasGlossary { - Guid = "", - Classifications = {new AtlasClassification - { - Attributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - TypeName = "", - LastModifiedTS = "", - EntityGuid = "", - EntityStatus = EntityStatus.Active, - RemovePropagationsOnEntityDelete = true, - ValidityPeriods = {new TimeBoundary - { - EndTime = "", - StartTime = "", - TimeZone = "", - }}, - }}, - LongDescription = "", - Name = "", - QualifiedName = "", - ShortDescription = "", - LastModifiedTS = "", - CreateTime = 1234L, - CreatedBy = "", - UpdateTime = 1234L, - UpdatedBy = "", - Categories = {new AtlasRelatedCategoryHeader - { - CategoryGuid = "", - Description = "", - DisplayText = "", - ParentCategoryGuid = "", - RelationGuid = "", - }}, - Language = "", - Terms = {new AtlasRelatedTermHeader - { - Description = "", - DisplayText = "", - Expression = "", - RelationGuid = "", - Status = AtlasTermRelationshipStatus.Draft, - Steward = "", - TermGuid = "", - }}, - Usage = "", + LongDescription = "Example Long Description", + Name = "Glossary", + ShortDescription = "Example Short Description", + Language = "en", + Usage = "Example Glossary", }; Response response = await client.CreateAsync(body); ]]> @@ -228,69 +74,17 @@ Response response = await client.CreateAsync(body); This sample shows how to call Create. "); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - -AtlasGlossary body = new AtlasGlossary(); -Response response = client.Create(body); -]]> -This sample shows how to call Create with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); AtlasGlossary body = new AtlasGlossary { - Guid = "", - Classifications = {new AtlasClassification - { - Attributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - TypeName = "", - LastModifiedTS = "", - EntityGuid = "", - EntityStatus = EntityStatus.Active, - RemovePropagationsOnEntityDelete = true, - ValidityPeriods = {new TimeBoundary - { - EndTime = "", - StartTime = "", - TimeZone = "", - }}, - }}, - LongDescription = "", - Name = "", - QualifiedName = "", - ShortDescription = "", - LastModifiedTS = "", - CreateTime = 1234L, - CreatedBy = "", - UpdateTime = 1234L, - UpdatedBy = "", - Categories = {new AtlasRelatedCategoryHeader - { - CategoryGuid = "", - Description = "", - DisplayText = "", - ParentCategoryGuid = "", - RelationGuid = "", - }}, - Language = "", - Terms = {new AtlasRelatedTermHeader - { - Description = "", - DisplayText = "", - Expression = "", - RelationGuid = "", - Status = AtlasTermRelationshipStatus.Draft, - Steward = "", - TermGuid = "", - }}, - Usage = "", + LongDescription = "Example Long Description", + Name = "Glossary", + ShortDescription = "Example Short Description", + Language = "en", + Usage = "Example Glossary", }; Response response = client.Create(body); ]]> @@ -299,260 +93,51 @@ Response response = client.Create(body); This sample shows how to call CreateAsync and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - -using RequestContent content = RequestContent.Create(new object()); -Response response = await client.CreateAsync(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.ToString()); -]]> -This sample shows how to call CreateAsync with all request content and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); using RequestContent content = RequestContent.Create(new { - guid = "", - classifications = new object[] - { - new - { - attributes = new - { - key = new object(), - }, - typeName = "", - lastModifiedTS = "", - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new object[] - { - new - { - endTime = "", - startTime = "", - timeZone = "", - } - }, - } - }, - longDescription = "", - name = "", - qualifiedName = "", - shortDescription = "", - lastModifiedTS = "", - createTime = 1234L, - createdBy = "", - updateTime = 1234L, - updatedBy = "", - categories = new object[] - { - new - { - categoryGuid = "", - description = "", - displayText = "", - parentCategoryGuid = "", - relationGuid = "", - } - }, - language = "", - terms = new object[] - { - new - { - description = "", - displayText = "", - expression = "", - relationGuid = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - usage = "", + name = "Glossary", + shortDescription = "Example Short Description", + longDescription = "Example Long Description", + language = "en", + usage = "Example Glossary", }); Response response = await client.CreateAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("longDescription").ToString()); -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("qualifiedName").ToString()); -Console.WriteLine(result.GetProperty("shortDescription").ToString()); -Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("parentCategoryGuid").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("language").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("usage").ToString()); +Console.WriteLine(result.ToString()); ]]> This sample shows how to call Create and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - -using RequestContent content = RequestContent.Create(new object()); -Response response = client.Create(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.ToString()); -]]> -This sample shows how to call Create with all request content and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); using RequestContent content = RequestContent.Create(new { - guid = "", - classifications = new object[] - { - new - { - attributes = new - { - key = new object(), - }, - typeName = "", - lastModifiedTS = "", - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new object[] - { - new - { - endTime = "", - startTime = "", - timeZone = "", - } - }, - } - }, - longDescription = "", - name = "", - qualifiedName = "", - shortDescription = "", - lastModifiedTS = "", - createTime = 1234L, - createdBy = "", - updateTime = 1234L, - updatedBy = "", - categories = new object[] - { - new - { - categoryGuid = "", - description = "", - displayText = "", - parentCategoryGuid = "", - relationGuid = "", - } - }, - language = "", - terms = new object[] - { - new - { - description = "", - displayText = "", - expression = "", - relationGuid = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - usage = "", + name = "Glossary", + shortDescription = "Example Short Description", + longDescription = "Example Long Description", + language = "en", + usage = "Example Glossary", }); Response response = client.Create(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("longDescription").ToString()); -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("qualifiedName").ToString()); -Console.WriteLine(result.GetProperty("shortDescription").ToString()); -Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("parentCategoryGuid").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("language").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("usage").ToString()); +Console.WriteLine(result.ToString()); ]]> This sample shows how to call CreateCategoriesAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - -Response> response = await client.CreateCategoriesAsync(new AtlasGlossaryCategory[] -{ - new AtlasGlossaryCategory() -}); -]]> -This sample shows how to call CreateCategoriesAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); @@ -560,59 +145,19 @@ Response> response = await client.CreateCat { new AtlasGlossaryCategory { - Guid = "", - Classifications = {new AtlasClassification - { - Attributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - TypeName = "", - LastModifiedTS = "", - EntityGuid = "", - EntityStatus = EntityStatus.Active, - RemovePropagationsOnEntityDelete = true, - ValidityPeriods = {new TimeBoundary - { - EndTime = "", - StartTime = "", - TimeZone = "", - }}, - }}, - LongDescription = "", - Name = "", - QualifiedName = "", - ShortDescription = "", - LastModifiedTS = "", - CreateTime = 1234L, - CreatedBy = "", - UpdateTime = 1234L, - UpdatedBy = "", + Name = "ExampleCategory2", Anchor = new AtlasGlossaryHeader { - DisplayText = "", - GlossaryGuid = "", - RelationGuid = "", + GlossaryGuid = "c018ddaf-7c21-4b37-a838-dae5f110c3d8", }, - ChildrenCategories = {new AtlasRelatedCategoryHeader - { - CategoryGuid = "", - Description = "", - DisplayText = "", - ParentCategoryGuid = "", - RelationGuid = "", - }}, - ParentCategory = default, - Terms = {new AtlasRelatedTermHeader + }, + new AtlasGlossaryCategory + { + Name = "ExampleCategory3", + Anchor = new AtlasGlossaryHeader { - Description = "", - DisplayText = "", - Expression = "", - RelationGuid = "", - Status = AtlasTermRelationshipStatus.Draft, - Steward = "", - TermGuid = "", - }}, + GlossaryGuid = "c018ddaf-7c21-4b37-a838-dae5f110c3d8", + }, } }); ]]> @@ -621,18 +166,7 @@ Response> response = await client.CreateCat This sample shows how to call CreateCategories. "); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - -Response> response = client.CreateCategories(new AtlasGlossaryCategory[] -{ - new AtlasGlossaryCategory() -}); -]]> -This sample shows how to call CreateCategories with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); @@ -640,59 +174,19 @@ Response> response = client.CreateCategorie { new AtlasGlossaryCategory { - Guid = "", - Classifications = {new AtlasClassification - { - Attributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - TypeName = "", - LastModifiedTS = "", - EntityGuid = "", - EntityStatus = EntityStatus.Active, - RemovePropagationsOnEntityDelete = true, - ValidityPeriods = {new TimeBoundary - { - EndTime = "", - StartTime = "", - TimeZone = "", - }}, - }}, - LongDescription = "", - Name = "", - QualifiedName = "", - ShortDescription = "", - LastModifiedTS = "", - CreateTime = 1234L, - CreatedBy = "", - UpdateTime = 1234L, - UpdatedBy = "", + Name = "ExampleCategory2", Anchor = new AtlasGlossaryHeader { - DisplayText = "", - GlossaryGuid = "", - RelationGuid = "", + GlossaryGuid = "c018ddaf-7c21-4b37-a838-dae5f110c3d8", }, - ChildrenCategories = {new AtlasRelatedCategoryHeader - { - CategoryGuid = "", - Description = "", - DisplayText = "", - ParentCategoryGuid = "", - RelationGuid = "", - }}, - ParentCategory = default, - Terms = {new AtlasRelatedTermHeader + }, + new AtlasGlossaryCategory + { + Name = "ExampleCategory3", + Anchor = new AtlasGlossaryHeader { - Description = "", - DisplayText = "", - Expression = "", - RelationGuid = "", - Status = AtlasTermRelationshipStatus.Draft, - Steward = "", - TermGuid = "", - }}, + GlossaryGuid = "c018ddaf-7c21-4b37-a838-dae5f110c3d8", + }, } }); ]]> @@ -701,22 +195,7 @@ Response> response = client.CreateCategorie This sample shows how to call CreateCategoriesAsync and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - -using RequestContent content = RequestContent.Create(new object[] -{ - new object() -}); -Response response = await client.CreateCategoriesAsync(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result[0].ToString()); -]]> -This sample shows how to call CreateCategoriesAsync with all request content and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); @@ -724,136 +203,32 @@ using RequestContent content = RequestContent.Create(new object[] { new { - guid = "", - classifications = new object[] - { - new - { - attributes = new - { - key = new object(), - }, - typeName = "", - lastModifiedTS = "", - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new object[] - { - new - { - endTime = "", - startTime = "", - timeZone = "", - } - }, - } - }, - longDescription = "", - name = "", - qualifiedName = "", - shortDescription = "", - lastModifiedTS = "", - createTime = 1234L, - createdBy = "", - updateTime = 1234L, - updatedBy = "", + name = "ExampleCategory2", anchor = new { - displayText = "", - glossaryGuid = "", - relationGuid = "", - }, - childrenCategories = new object[] - { - new - { - categoryGuid = "", - description = "", - displayText = "", - parentCategoryGuid = "", - relationGuid = "", - } + glossaryGuid = "c018ddaf-7c21-4b37-a838-dae5f110c3d8", }, - terms = new object[] + }, + new + { + name = "ExampleCategory3", + anchor = new { - new - { - description = "", - displayText = "", - expression = "", - relationGuid = "", - status = "DRAFT", - steward = "", - termGuid = "", - } + glossaryGuid = "c018ddaf-7c21-4b37-a838-dae5f110c3d8", }, } }); Response response = await client.CreateCategoriesAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result[0].GetProperty("guid").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result[0].GetProperty("longDescription").ToString()); -Console.WriteLine(result[0].GetProperty("name").ToString()); -Console.WriteLine(result[0].GetProperty("qualifiedName").ToString()); -Console.WriteLine(result[0].GetProperty("shortDescription").ToString()); -Console.WriteLine(result[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result[0].GetProperty("createTime").ToString()); -Console.WriteLine(result[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result[0].GetProperty("updateTime").ToString()); -Console.WriteLine(result[0].GetProperty("updatedBy").ToString()); -Console.WriteLine(result[0].GetProperty("anchor").GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("anchor").GetProperty("glossaryGuid").ToString()); -Console.WriteLine(result[0].GetProperty("anchor").GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("childrenCategories")[0].GetProperty("categoryGuid").ToString()); -Console.WriteLine(result[0].GetProperty("childrenCategories")[0].GetProperty("description").ToString()); -Console.WriteLine(result[0].GetProperty("childrenCategories")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("childrenCategories")[0].GetProperty("parentCategoryGuid").ToString()); -Console.WriteLine(result[0].GetProperty("childrenCategories")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("parentCategory").GetProperty("categoryGuid").ToString()); -Console.WriteLine(result[0].GetProperty("parentCategory").GetProperty("description").ToString()); -Console.WriteLine(result[0].GetProperty("parentCategory").GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("parentCategory").GetProperty("parentCategoryGuid").ToString()); -Console.WriteLine(result[0].GetProperty("parentCategory").GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("description").ToString()); -Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("status").ToString()); -Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result[0].ToString()); ]]> This sample shows how to call CreateCategories and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - -using RequestContent content = RequestContent.Create(new object[] -{ - new object() -}); -Response response = client.CreateCategories(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result[0].ToString()); -]]> -This sample shows how to call CreateCategories with all request content and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); @@ -861,187 +236,45 @@ using RequestContent content = RequestContent.Create(new object[] { new { - guid = "", - classifications = new object[] - { - new - { - attributes = new - { - key = new object(), - }, - typeName = "", - lastModifiedTS = "", - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new object[] - { - new - { - endTime = "", - startTime = "", - timeZone = "", - } - }, - } - }, - longDescription = "", - name = "", - qualifiedName = "", - shortDescription = "", - lastModifiedTS = "", - createTime = 1234L, - createdBy = "", - updateTime = 1234L, - updatedBy = "", + name = "ExampleCategory2", anchor = new { - displayText = "", - glossaryGuid = "", - relationGuid = "", - }, - childrenCategories = new object[] - { - new - { - categoryGuid = "", - description = "", - displayText = "", - parentCategoryGuid = "", - relationGuid = "", - } + glossaryGuid = "c018ddaf-7c21-4b37-a838-dae5f110c3d8", }, - terms = new object[] + }, + new + { + name = "ExampleCategory3", + anchor = new { - new - { - description = "", - displayText = "", - expression = "", - relationGuid = "", - status = "DRAFT", - steward = "", - termGuid = "", - } + glossaryGuid = "c018ddaf-7c21-4b37-a838-dae5f110c3d8", }, } }); Response response = client.CreateCategories(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result[0].GetProperty("guid").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result[0].GetProperty("longDescription").ToString()); -Console.WriteLine(result[0].GetProperty("name").ToString()); -Console.WriteLine(result[0].GetProperty("qualifiedName").ToString()); -Console.WriteLine(result[0].GetProperty("shortDescription").ToString()); -Console.WriteLine(result[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result[0].GetProperty("createTime").ToString()); -Console.WriteLine(result[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result[0].GetProperty("updateTime").ToString()); -Console.WriteLine(result[0].GetProperty("updatedBy").ToString()); -Console.WriteLine(result[0].GetProperty("anchor").GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("anchor").GetProperty("glossaryGuid").ToString()); -Console.WriteLine(result[0].GetProperty("anchor").GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("childrenCategories")[0].GetProperty("categoryGuid").ToString()); -Console.WriteLine(result[0].GetProperty("childrenCategories")[0].GetProperty("description").ToString()); -Console.WriteLine(result[0].GetProperty("childrenCategories")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("childrenCategories")[0].GetProperty("parentCategoryGuid").ToString()); -Console.WriteLine(result[0].GetProperty("childrenCategories")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("parentCategory").GetProperty("categoryGuid").ToString()); -Console.WriteLine(result[0].GetProperty("parentCategory").GetProperty("description").ToString()); -Console.WriteLine(result[0].GetProperty("parentCategory").GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("parentCategory").GetProperty("parentCategoryGuid").ToString()); -Console.WriteLine(result[0].GetProperty("parentCategory").GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("description").ToString()); -Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("status").ToString()); -Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result[0].ToString()); ]]> This sample shows how to call CreateCategoryAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - -AtlasGlossaryCategory body = new AtlasGlossaryCategory(); -Response response = await client.CreateCategoryAsync(body); -]]> -This sample shows how to call CreateCategoryAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); AtlasGlossaryCategory body = new AtlasGlossaryCategory { - Guid = "", - Classifications = {new AtlasClassification - { - Attributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - TypeName = "", - LastModifiedTS = "", - EntityGuid = "", - EntityStatus = EntityStatus.Active, - RemovePropagationsOnEntityDelete = true, - ValidityPeriods = {new TimeBoundary - { - EndTime = "", - StartTime = "", - TimeZone = "", - }}, - }}, - LongDescription = "", - Name = "", - QualifiedName = "", - ShortDescription = "", - LastModifiedTS = "", - CreateTime = 1234L, - CreatedBy = "", - UpdateTime = 1234L, - UpdatedBy = "", + Name = "ExampleCategory1", Anchor = new AtlasGlossaryHeader { - DisplayText = "", - GlossaryGuid = "", - RelationGuid = "", + GlossaryGuid = "c018ddaf-7c21-4b37-a838-dae5f110c3d8", }, - ChildrenCategories = {new AtlasRelatedCategoryHeader - { - CategoryGuid = "", - Description = "", - DisplayText = "", - ParentCategoryGuid = "", - RelationGuid = "", - }}, - ParentCategory = default, Terms = {new AtlasRelatedTermHeader { - Description = "", - DisplayText = "", - Expression = "", - RelationGuid = "", - Status = AtlasTermRelationshipStatus.Draft, - Steward = "", - TermGuid = "", + TermGuid = "54688d39-b298-4104-9e80-f2a16f44aaea", }}, }; Response response = await client.CreateCategoryAsync(body); @@ -1051,73 +284,20 @@ Response response = await client.CreateCategoryAsync(body This sample shows how to call CreateCategory. "); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - -AtlasGlossaryCategory body = new AtlasGlossaryCategory(); -Response response = client.CreateCategory(body); -]]> -This sample shows how to call CreateCategory with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); AtlasGlossaryCategory body = new AtlasGlossaryCategory { - Guid = "", - Classifications = {new AtlasClassification - { - Attributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - TypeName = "", - LastModifiedTS = "", - EntityGuid = "", - EntityStatus = EntityStatus.Active, - RemovePropagationsOnEntityDelete = true, - ValidityPeriods = {new TimeBoundary - { - EndTime = "", - StartTime = "", - TimeZone = "", - }}, - }}, - LongDescription = "", - Name = "", - QualifiedName = "", - ShortDescription = "", - LastModifiedTS = "", - CreateTime = 1234L, - CreatedBy = "", - UpdateTime = 1234L, - UpdatedBy = "", + Name = "ExampleCategory1", Anchor = new AtlasGlossaryHeader { - DisplayText = "", - GlossaryGuid = "", - RelationGuid = "", + GlossaryGuid = "c018ddaf-7c21-4b37-a838-dae5f110c3d8", }, - ChildrenCategories = {new AtlasRelatedCategoryHeader - { - CategoryGuid = "", - Description = "", - DisplayText = "", - ParentCategoryGuid = "", - RelationGuid = "", - }}, - ParentCategory = default, Terms = {new AtlasRelatedTermHeader { - Description = "", - DisplayText = "", - Expression = "", - RelationGuid = "", - Status = AtlasTermRelationshipStatus.Draft, - Steward = "", - TermGuid = "", + TermGuid = "54688d39-b298-4104-9e80-f2a16f44aaea", }}, }; Response response = client.CreateCategory(body); @@ -1127,861 +307,281 @@ Response response = client.CreateCategory(body); This sample shows how to call CreateCategoryAsync and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - -using RequestContent content = RequestContent.Create(new object()); -Response response = await client.CreateCategoryAsync(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.ToString()); -]]> -This sample shows how to call CreateCategoryAsync with all request content and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); using RequestContent content = RequestContent.Create(new { - guid = "", - classifications = new object[] - { - new - { - attributes = new - { - key = new object(), - }, - typeName = "", - lastModifiedTS = "", - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new object[] - { - new - { - endTime = "", - startTime = "", - timeZone = "", - } - }, - } - }, - longDescription = "", - name = "", - qualifiedName = "", - shortDescription = "", - lastModifiedTS = "", - createTime = 1234L, - createdBy = "", - updateTime = 1234L, - updatedBy = "", anchor = new { - displayText = "", - glossaryGuid = "", - relationGuid = "", - }, - childrenCategories = new object[] - { - new - { - categoryGuid = "", - description = "", - displayText = "", - parentCategoryGuid = "", - relationGuid = "", - } + glossaryGuid = "c018ddaf-7c21-4b37-a838-dae5f110c3d8", }, + name = "ExampleCategory1", terms = new object[] { new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - status = "DRAFT", - steward = "", - termGuid = "", + termGuid = "54688d39-b298-4104-9e80-f2a16f44aaea", } }, }); Response response = await client.CreateCategoryAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("longDescription").ToString()); -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("qualifiedName").ToString()); -Console.WriteLine(result.GetProperty("shortDescription").ToString()); -Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("anchor").GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("anchor").GetProperty("glossaryGuid").ToString()); -Console.WriteLine(result.GetProperty("anchor").GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("categoryGuid").ToString()); -Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("parentCategoryGuid").ToString()); -Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("parentCategory").GetProperty("categoryGuid").ToString()); -Console.WriteLine(result.GetProperty("parentCategory").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("parentCategory").GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("parentCategory").GetProperty("parentCategoryGuid").ToString()); -Console.WriteLine(result.GetProperty("parentCategory").GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.ToString()); ]]> This sample shows how to call CreateCategory and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - -using RequestContent content = RequestContent.Create(new object()); -Response response = client.CreateCategory(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.ToString()); -]]> -This sample shows how to call CreateCategory with all request content and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); using RequestContent content = RequestContent.Create(new { - guid = "", - classifications = new object[] - { - new - { - attributes = new - { - key = new object(), - }, - typeName = "", - lastModifiedTS = "", - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new object[] - { - new - { - endTime = "", - startTime = "", - timeZone = "", - } - }, - } - }, - longDescription = "", - name = "", - qualifiedName = "", - shortDescription = "", - lastModifiedTS = "", - createTime = 1234L, - createdBy = "", - updateTime = 1234L, - updatedBy = "", anchor = new { - displayText = "", - glossaryGuid = "", - relationGuid = "", - }, - childrenCategories = new object[] - { - new - { - categoryGuid = "", - description = "", - displayText = "", - parentCategoryGuid = "", - relationGuid = "", - } + glossaryGuid = "c018ddaf-7c21-4b37-a838-dae5f110c3d8", }, + name = "ExampleCategory1", terms = new object[] { new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - status = "DRAFT", - steward = "", - termGuid = "", + termGuid = "54688d39-b298-4104-9e80-f2a16f44aaea", } }, }); Response response = client.CreateCategory(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("longDescription").ToString()); -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("qualifiedName").ToString()); -Console.WriteLine(result.GetProperty("shortDescription").ToString()); -Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("anchor").GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("anchor").GetProperty("glossaryGuid").ToString()); -Console.WriteLine(result.GetProperty("anchor").GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("categoryGuid").ToString()); -Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("parentCategoryGuid").ToString()); -Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("parentCategory").GetProperty("categoryGuid").ToString()); -Console.WriteLine(result.GetProperty("parentCategory").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("parentCategory").GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("parentCategory").GetProperty("parentCategoryGuid").ToString()); -Console.WriteLine(result.GetProperty("parentCategory").GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.ToString()); ]]> This sample shows how to call GetCategoryAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - -Response response = await client.GetCategoryAsync(""); -]]> -This sample shows how to call GetCategoryAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -Response response = await client.GetCategoryAsync(""); +Response response = await client.GetCategoryAsync("ed7458f0-9463-48a5-b5c6-4f785fb34e12"); ]]> This sample shows how to call GetCategory. "); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - -Response response = client.GetCategory(""); -]]> -This sample shows how to call GetCategory with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -Response response = client.GetCategory(""); +Response response = client.GetCategory("ed7458f0-9463-48a5-b5c6-4f785fb34e12"); ]]> This sample shows how to call GetCategoryAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -Response response = await client.GetCategoryAsync("", null); +Response response = await client.GetCategoryAsync("ed7458f0-9463-48a5-b5c6-4f785fb34e12", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetCategoryAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - -Response response = await client.GetCategoryAsync("", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("longDescription").ToString()); -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("qualifiedName").ToString()); -Console.WriteLine(result.GetProperty("shortDescription").ToString()); -Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("anchor").GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("anchor").GetProperty("glossaryGuid").ToString()); -Console.WriteLine(result.GetProperty("anchor").GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("categoryGuid").ToString()); -Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("parentCategoryGuid").ToString()); -Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("parentCategory").GetProperty("categoryGuid").ToString()); -Console.WriteLine(result.GetProperty("parentCategory").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("parentCategory").GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("parentCategory").GetProperty("parentCategoryGuid").ToString()); -Console.WriteLine(result.GetProperty("parentCategory").GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("termGuid").ToString()); ]]> This sample shows how to call GetCategory and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -Response response = client.GetCategory("", null); +Response response = client.GetCategory("ed7458f0-9463-48a5-b5c6-4f785fb34e12", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetCategory with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - -Response response = client.GetCategory("", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("longDescription").ToString()); -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("qualifiedName").ToString()); -Console.WriteLine(result.GetProperty("shortDescription").ToString()); -Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("anchor").GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("anchor").GetProperty("glossaryGuid").ToString()); -Console.WriteLine(result.GetProperty("anchor").GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("categoryGuid").ToString()); -Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("parentCategoryGuid").ToString()); -Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("parentCategory").GetProperty("categoryGuid").ToString()); -Console.WriteLine(result.GetProperty("parentCategory").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("parentCategory").GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("parentCategory").GetProperty("parentCategoryGuid").ToString()); -Console.WriteLine(result.GetProperty("parentCategory").GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("termGuid").ToString()); ]]> This sample shows how to call UpdateCategoryAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - -AtlasGlossaryCategory body = new AtlasGlossaryCategory(); -Response response = await client.UpdateCategoryAsync("", body); -]]> -This sample shows how to call UpdateCategoryAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); AtlasGlossaryCategory body = new AtlasGlossaryCategory { - Guid = "", - Classifications = {new AtlasClassification - { - Attributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - TypeName = "", - LastModifiedTS = "", - EntityGuid = "", - EntityStatus = EntityStatus.Active, - RemovePropagationsOnEntityDelete = true, - ValidityPeriods = {new TimeBoundary - { - EndTime = "", - StartTime = "", - TimeZone = "", - }}, - }}, - LongDescription = "", - Name = "", - QualifiedName = "", - ShortDescription = "", - LastModifiedTS = "", - CreateTime = 1234L, - CreatedBy = "", - UpdateTime = 1234L, - UpdatedBy = "", + Guid = "ed7458f0-9463-48a5-b5c6-4f785fb34e12", + Name = "ExampleCategory1", + QualifiedName = "ExampleCategory1@Glossary", + LastModifiedTS = "1", Anchor = new AtlasGlossaryHeader { - DisplayText = "", - GlossaryGuid = "", - RelationGuid = "", + GlossaryGuid = "c018ddaf-7c21-4b37-a838-dae5f110c3d8", + RelationGuid = "7bdcef93-a57a-4d1d-95ab-9d3036f394a0", }, ChildrenCategories = {new AtlasRelatedCategoryHeader { - CategoryGuid = "", - Description = "", - DisplayText = "", - ParentCategoryGuid = "", - RelationGuid = "", + CategoryGuid = "0d6766f6-f4b6-435b-bda2-d3edc358998e", }}, - ParentCategory = default, + ParentCategory = new AtlasRelatedCategoryHeader + { + CategoryGuid = "e47c4584-daca-4f9e-9092-194e04692c9a", + }, Terms = {new AtlasRelatedTermHeader { - Description = "", - DisplayText = "", - Expression = "", - RelationGuid = "", - Status = AtlasTermRelationshipStatus.Draft, - Steward = "", - TermGuid = "", + RelationGuid = "6aebf5ac-0c83-40c0-98bf-958fe9c99007", + TermGuid = "54688d39-b298-4104-9e80-f2a16f44aaea", }}, }; -Response response = await client.UpdateCategoryAsync("", body); +Response response = await client.UpdateCategoryAsync("ed7458f0-9463-48a5-b5c6-4f785fb34e12", body); ]]> This sample shows how to call UpdateCategory. "); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - -AtlasGlossaryCategory body = new AtlasGlossaryCategory(); -Response response = client.UpdateCategory("", body); -]]> -This sample shows how to call UpdateCategory with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); AtlasGlossaryCategory body = new AtlasGlossaryCategory { - Guid = "", - Classifications = {new AtlasClassification - { - Attributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - TypeName = "", - LastModifiedTS = "", - EntityGuid = "", - EntityStatus = EntityStatus.Active, - RemovePropagationsOnEntityDelete = true, - ValidityPeriods = {new TimeBoundary - { - EndTime = "", - StartTime = "", - TimeZone = "", - }}, - }}, - LongDescription = "", - Name = "", - QualifiedName = "", - ShortDescription = "", - LastModifiedTS = "", - CreateTime = 1234L, - CreatedBy = "", - UpdateTime = 1234L, - UpdatedBy = "", + Guid = "ed7458f0-9463-48a5-b5c6-4f785fb34e12", + Name = "ExampleCategory1", + QualifiedName = "ExampleCategory1@Glossary", + LastModifiedTS = "1", Anchor = new AtlasGlossaryHeader { - DisplayText = "", - GlossaryGuid = "", - RelationGuid = "", + GlossaryGuid = "c018ddaf-7c21-4b37-a838-dae5f110c3d8", + RelationGuid = "7bdcef93-a57a-4d1d-95ab-9d3036f394a0", }, ChildrenCategories = {new AtlasRelatedCategoryHeader { - CategoryGuid = "", - Description = "", - DisplayText = "", - ParentCategoryGuid = "", - RelationGuid = "", + CategoryGuid = "0d6766f6-f4b6-435b-bda2-d3edc358998e", }}, - ParentCategory = default, + ParentCategory = new AtlasRelatedCategoryHeader + { + CategoryGuid = "e47c4584-daca-4f9e-9092-194e04692c9a", + }, Terms = {new AtlasRelatedTermHeader { - Description = "", - DisplayText = "", - Expression = "", - RelationGuid = "", - Status = AtlasTermRelationshipStatus.Draft, - Steward = "", - TermGuid = "", + RelationGuid = "6aebf5ac-0c83-40c0-98bf-958fe9c99007", + TermGuid = "54688d39-b298-4104-9e80-f2a16f44aaea", }}, }; -Response response = client.UpdateCategory("", body); +Response response = client.UpdateCategory("ed7458f0-9463-48a5-b5c6-4f785fb34e12", body); ]]> This sample shows how to call UpdateCategoryAsync and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - -using RequestContent content = RequestContent.Create(new object()); -Response response = await client.UpdateCategoryAsync("", content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.ToString()); -]]> -This sample shows how to call UpdateCategoryAsync with all parameters and request content and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); using RequestContent content = RequestContent.Create(new { - guid = "", - classifications = new object[] - { - new - { - attributes = new - { - key = new object(), - }, - typeName = "", - lastModifiedTS = "", - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new object[] - { - new - { - endTime = "", - startTime = "", - timeZone = "", - } - }, - } - }, - longDescription = "", - name = "", - qualifiedName = "", - shortDescription = "", - lastModifiedTS = "", - createTime = 1234L, - createdBy = "", - updateTime = 1234L, - updatedBy = "", + guid = "ed7458f0-9463-48a5-b5c6-4f785fb34e12", + qualifiedName = "ExampleCategory1@Glossary", + name = "ExampleCategory1", + lastModifiedTS = "1", anchor = new { - displayText = "", - glossaryGuid = "", - relationGuid = "", + glossaryGuid = "c018ddaf-7c21-4b37-a838-dae5f110c3d8", + relationGuid = "7bdcef93-a57a-4d1d-95ab-9d3036f394a0", }, - childrenCategories = new object[] + terms = new object[] { new { - categoryGuid = "", - description = "", - displayText = "", - parentCategoryGuid = "", - relationGuid = "", + termGuid = "54688d39-b298-4104-9e80-f2a16f44aaea", + relationGuid = "6aebf5ac-0c83-40c0-98bf-958fe9c99007", } }, - terms = new object[] + childrenCategories = new object[] { new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - status = "DRAFT", - steward = "", - termGuid = "", + categoryGuid = "0d6766f6-f4b6-435b-bda2-d3edc358998e", } }, + parentCategory = new + { + categoryGuid = "e47c4584-daca-4f9e-9092-194e04692c9a", + }, }); -Response response = await client.UpdateCategoryAsync("", content); +Response response = await client.UpdateCategoryAsync("ed7458f0-9463-48a5-b5c6-4f785fb34e12", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("longDescription").ToString()); -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("qualifiedName").ToString()); -Console.WriteLine(result.GetProperty("shortDescription").ToString()); -Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("anchor").GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("anchor").GetProperty("glossaryGuid").ToString()); -Console.WriteLine(result.GetProperty("anchor").GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("categoryGuid").ToString()); -Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("parentCategoryGuid").ToString()); -Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("parentCategory").GetProperty("categoryGuid").ToString()); -Console.WriteLine(result.GetProperty("parentCategory").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("parentCategory").GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("parentCategory").GetProperty("parentCategoryGuid").ToString()); -Console.WriteLine(result.GetProperty("parentCategory").GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.ToString()); ]]> This sample shows how to call UpdateCategory and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - -using RequestContent content = RequestContent.Create(new object()); -Response response = client.UpdateCategory("", content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.ToString()); -]]> -This sample shows how to call UpdateCategory with all parameters and request content and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); using RequestContent content = RequestContent.Create(new { - guid = "", - classifications = new object[] - { - new - { - attributes = new - { - key = new object(), - }, - typeName = "", - lastModifiedTS = "", - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new object[] - { - new - { - endTime = "", - startTime = "", - timeZone = "", - } - }, - } - }, - longDescription = "", - name = "", - qualifiedName = "", - shortDescription = "", - lastModifiedTS = "", - createTime = 1234L, - createdBy = "", - updateTime = 1234L, - updatedBy = "", + guid = "ed7458f0-9463-48a5-b5c6-4f785fb34e12", + qualifiedName = "ExampleCategory1@Glossary", + name = "ExampleCategory1", + lastModifiedTS = "1", anchor = new { - displayText = "", - glossaryGuid = "", - relationGuid = "", + glossaryGuid = "c018ddaf-7c21-4b37-a838-dae5f110c3d8", + relationGuid = "7bdcef93-a57a-4d1d-95ab-9d3036f394a0", }, - childrenCategories = new object[] + terms = new object[] { new { - categoryGuid = "", - description = "", - displayText = "", - parentCategoryGuid = "", - relationGuid = "", + termGuid = "54688d39-b298-4104-9e80-f2a16f44aaea", + relationGuid = "6aebf5ac-0c83-40c0-98bf-958fe9c99007", } }, - terms = new object[] + childrenCategories = new object[] { new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - status = "DRAFT", - steward = "", - termGuid = "", + categoryGuid = "0d6766f6-f4b6-435b-bda2-d3edc358998e", } }, + parentCategory = new + { + categoryGuid = "e47c4584-daca-4f9e-9092-194e04692c9a", + }, }); -Response response = client.UpdateCategory("", content); +Response response = client.UpdateCategory("ed7458f0-9463-48a5-b5c6-4f785fb34e12", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("longDescription").ToString()); -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("qualifiedName").ToString()); -Console.WriteLine(result.GetProperty("shortDescription").ToString()); -Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("anchor").GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("anchor").GetProperty("glossaryGuid").ToString()); -Console.WriteLine(result.GetProperty("anchor").GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("categoryGuid").ToString()); -Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("parentCategoryGuid").ToString()); -Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("parentCategory").GetProperty("categoryGuid").ToString()); -Console.WriteLine(result.GetProperty("parentCategory").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("parentCategory").GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("parentCategory").GetProperty("parentCategoryGuid").ToString()); -Console.WriteLine(result.GetProperty("parentCategory").GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.ToString()); ]]> This sample shows how to call DeleteCategoryAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - -Response response = await client.DeleteCategoryAsync(""); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call DeleteCategoryAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -Response response = await client.DeleteCategoryAsync(""); +Response response = await client.DeleteCategoryAsync("0e391355-252a-e5f3-ac18-5a3602df7616"); Console.WriteLine(response.Status); ]]> @@ -1990,21 +590,11 @@ Console.WriteLine(response.Status); This sample shows how to call DeleteCategory. "); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - -Response response = client.DeleteCategory(""); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call DeleteCategory with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -Response response = client.DeleteCategory(""); +Response response = client.DeleteCategory("0e391355-252a-e5f3-ac18-5a3602df7616"); Console.WriteLine(response.Status); ]]> @@ -2013,24 +603,13 @@ Console.WriteLine(response.Status); This sample shows how to call PartialUpdateCategoryAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - -Response response = await client.PartialUpdateCategoryAsync("", new Dictionary -{ - ["key"] = "" -}); -]]> -This sample shows how to call PartialUpdateCategoryAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -Response response = await client.PartialUpdateCategoryAsync("", new Dictionary +Response response = await client.PartialUpdateCategoryAsync("3243ea0a-9492-47e1-392e-a84e64980af9", new Dictionary { - ["key"] = "" + ["longDescription"] = "Example Long Description" }); ]]> @@ -2038,24 +617,13 @@ Response response = await client.PartialUpdateCategoryAsy This sample shows how to call PartialUpdateCategory. "); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - -Response response = client.PartialUpdateCategory("", new Dictionary -{ - ["key"] = "" -}); -]]> -This sample shows how to call PartialUpdateCategory with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -Response response = client.PartialUpdateCategory("", new Dictionary +Response response = client.PartialUpdateCategory("3243ea0a-9492-47e1-392e-a84e64980af9", new Dictionary { - ["key"] = "" + ["longDescription"] = "Example Long Description" }); ]]> @@ -2063,2841 +631,757 @@ Response response = client.PartialUpdateCategory(" This sample shows how to call PartialUpdateCategoryAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); using RequestContent content = RequestContent.Create(new { - key = "", + longDescription = "Example Long Description", }); -Response response = await client.PartialUpdateCategoryAsync("", content); +Response response = await client.PartialUpdateCategoryAsync("3243ea0a-9492-47e1-392e-a84e64980af9", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call PartialUpdateCategoryAsync with all parameters and request content and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - -using RequestContent content = RequestContent.Create(new -{ - key = "", -}); -Response response = await client.PartialUpdateCategoryAsync("", content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("longDescription").ToString()); -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("qualifiedName").ToString()); -Console.WriteLine(result.GetProperty("shortDescription").ToString()); -Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("anchor").GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("anchor").GetProperty("glossaryGuid").ToString()); -Console.WriteLine(result.GetProperty("anchor").GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("categoryGuid").ToString()); -Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("parentCategoryGuid").ToString()); -Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("parentCategory").GetProperty("categoryGuid").ToString()); -Console.WriteLine(result.GetProperty("parentCategory").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("parentCategory").GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("parentCategory").GetProperty("parentCategoryGuid").ToString()); -Console.WriteLine(result.GetProperty("parentCategory").GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("termGuid").ToString()); ]]> This sample shows how to call PartialUpdateCategory and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); using RequestContent content = RequestContent.Create(new { - key = "", + longDescription = "Example Long Description", }); -Response response = client.PartialUpdateCategory("", content); +Response response = client.PartialUpdateCategory("3243ea0a-9492-47e1-392e-a84e64980af9", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call PartialUpdateCategory with all parameters and request content and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - -using RequestContent content = RequestContent.Create(new -{ - key = "", -}); -Response response = client.PartialUpdateCategory("", content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("longDescription").ToString()); -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("qualifiedName").ToString()); -Console.WriteLine(result.GetProperty("shortDescription").ToString()); -Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("anchor").GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("anchor").GetProperty("glossaryGuid").ToString()); -Console.WriteLine(result.GetProperty("anchor").GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("categoryGuid").ToString()); -Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("parentCategoryGuid").ToString()); -Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("parentCategory").GetProperty("categoryGuid").ToString()); -Console.WriteLine(result.GetProperty("parentCategory").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("parentCategory").GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("parentCategory").GetProperty("parentCategoryGuid").ToString()); -Console.WriteLine(result.GetProperty("parentCategory").GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("termGuid").ToString()); ]]> This sample shows how to call GetRelatedCategoriesAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - -Response>> response = await client.GetRelatedCategoriesAsync(""); -]]> -This sample shows how to call GetRelatedCategoriesAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -Response>> response = await client.GetRelatedCategoriesAsync("", limit: 1234, offset: 1234, sort: ""); +Response>> response = await client.GetRelatedCategoriesAsync("ed7458f0-9463-48a5-b5c6-4f785fb34e12"); ]]> This sample shows how to call GetRelatedCategories. "); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - -Response>> response = client.GetRelatedCategories(""); -]]> -This sample shows how to call GetRelatedCategories with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -Response>> response = client.GetRelatedCategories("", limit: 1234, offset: 1234, sort: ""); +Response>> response = client.GetRelatedCategories("ed7458f0-9463-48a5-b5c6-4f785fb34e12"); ]]> This sample shows how to call GetRelatedCategoriesAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -Response response = await client.GetRelatedCategoriesAsync("", null, null, null, null); +Response response = await client.GetRelatedCategoriesAsync("ed7458f0-9463-48a5-b5c6-4f785fb34e12", null, null, "ASC", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("")[0].ToString()); -]]> -This sample shows how to call GetRelatedCategoriesAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - -Response response = await client.GetRelatedCategoriesAsync("", 1234, 1234, "", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("")[0].GetProperty("categoryGuid").ToString()); -Console.WriteLine(result.GetProperty("")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("")[0].GetProperty("parentCategoryGuid").ToString()); -Console.WriteLine(result.GetProperty("")[0].GetProperty("relationGuid").ToString()); ]]> This sample shows how to call GetRelatedCategories and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -Response response = client.GetRelatedCategories("", null, null, null, null); +Response response = client.GetRelatedCategories("ed7458f0-9463-48a5-b5c6-4f785fb34e12", null, null, "ASC", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("")[0].ToString()); -]]> -This sample shows how to call GetRelatedCategories with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - -Response response = client.GetRelatedCategories("", 1234, 1234, "", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("")[0].GetProperty("categoryGuid").ToString()); -Console.WriteLine(result.GetProperty("")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("")[0].GetProperty("parentCategoryGuid").ToString()); -Console.WriteLine(result.GetProperty("")[0].GetProperty("relationGuid").ToString()); ]]> This sample shows how to call GetCategoryTermsAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - -Response> response = await client.GetCategoryTermsAsync(""); -]]> -This sample shows how to call GetCategoryTermsAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -Response> response = await client.GetCategoryTermsAsync("", limit: 1234, offset: 1234, sort: ""); +Response> response = await client.GetCategoryTermsAsync("ed7458f0-9463-48a5-b5c6-4f785fb34e12"); ]]> This sample shows how to call GetCategoryTerms. "); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - -Response> response = client.GetCategoryTerms(""); -]]> -This sample shows how to call GetCategoryTerms with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -Response> response = client.GetCategoryTerms("", limit: 1234, offset: 1234, sort: ""); +Response> response = client.GetCategoryTerms("ed7458f0-9463-48a5-b5c6-4f785fb34e12"); ]]> This sample shows how to call GetCategoryTermsAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -Response response = await client.GetCategoryTermsAsync("", null, null, null, null); +Response response = await client.GetCategoryTermsAsync("ed7458f0-9463-48a5-b5c6-4f785fb34e12", null, null, "ASC", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].ToString()); -]]> -This sample shows how to call GetCategoryTermsAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - -Response response = await client.GetCategoryTermsAsync("", 1234, 1234, "", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result[0].GetProperty("description").ToString()); -Console.WriteLine(result[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("expression").ToString()); -Console.WriteLine(result[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("status").ToString()); -Console.WriteLine(result[0].GetProperty("steward").ToString()); -Console.WriteLine(result[0].GetProperty("termGuid").ToString()); ]]> This sample shows how to call GetCategoryTerms and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -Response response = client.GetCategoryTerms("", null, null, null, null); +Response response = client.GetCategoryTerms("ed7458f0-9463-48a5-b5c6-4f785fb34e12", null, null, "ASC", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].ToString()); -]]> -This sample shows how to call GetCategoryTerms with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - -Response response = client.GetCategoryTerms("", 1234, 1234, "", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result[0].GetProperty("description").ToString()); -Console.WriteLine(result[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("expression").ToString()); -Console.WriteLine(result[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("status").ToString()); -Console.WriteLine(result[0].GetProperty("steward").ToString()); -Console.WriteLine(result[0].GetProperty("termGuid").ToString()); ]]> This sample shows how to call CreateTermAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - -AtlasGlossaryTerm body = new AtlasGlossaryTerm(); -Response response = await client.CreateTermAsync(body); -]]> -This sample shows how to call CreateTermAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); AtlasGlossaryTerm body = new AtlasGlossaryTerm { - Guid = "", - Classifications = {new AtlasClassification + LongDescription = "Example Long Description", + Name = "ExampleTerm1", + ShortDescription = "Example Short Description", + Abbreviation = "T1", + Anchor = new AtlasGlossaryHeader { - Attributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - TypeName = "", - LastModifiedTS = "", - EntityGuid = "", - EntityStatus = EntityStatus.Active, - RemovePropagationsOnEntityDelete = true, - ValidityPeriods = {new TimeBoundary - { - EndTime = "", - StartTime = "", - TimeZone = "", - }}, - }}, - LongDescription = "", - Name = "", - QualifiedName = "", - ShortDescription = "", - LastModifiedTS = "", - CreateTime = 1234L, - CreatedBy = "", - UpdateTime = 1234L, - UpdatedBy = "", - Abbreviation = "", - TemplateName = { BinaryData.FromObjectAsJson(new object()) }, - Anchor = new AtlasGlossaryHeader - { - DisplayText = "", - GlossaryGuid = "", - RelationGuid = "", + GlossaryGuid = "c018ddaf-7c21-4b37-a838-dae5f110c3d8", }, - Antonyms = {new AtlasRelatedTermHeader - { - Description = "", - DisplayText = "", - Expression = "", - RelationGuid = "", - Status = AtlasTermRelationshipStatus.Draft, - Steward = "", - TermGuid = "", - }}, - Status = TermStatus.Draft, - NickName = "", - HierarchyInfo = {new PurviewObjectId - { - Guid = "", - TypeName = "", - UniqueAttributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - Name = "", - DisplayText = "", - ItemPath = "", - ResourceId = "", - Properties = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - }}, + Status = TermStatus.Approved, Resources = {new ResourceLink { - DisplayName = "", - Url = "", + DisplayName = "Example Display Name", + Url = "Example Url", }}, Contacts = { - ["key"] = {new ContactInfo + ["Expert"] = {new ContactInfo { - Id = "", - Info = "", + Id = "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", + Info = "Example Expert Info", + }}, + ["Steward"] = {new ContactInfo + { + Id = "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", + Info = "Example Steward info", }} }, - Attributes = +}; +Response response = await client.CreateTermAsync(body); +]]> +This sample shows how to call CreateTermAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +AtlasGlossaryTerm body = new AtlasGlossaryTerm +{ + Name = "ExampleTerm", + Anchor = new AtlasGlossaryHeader { - ["key"] = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - } + GlossaryGuid = "c018ddaf-7c21-4b37-a838-dae5f110c3d8", }, - AssignedEntities = {new AtlasRelatedObjectId + Attributes = { - Guid = "", - TypeName = "", - UniqueAttributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - DisplayText = "", - EntityStatus = EntityStatus.Active, - RelationshipType = "", - RelationshipAttributes = new AtlasStruct + ["ExampleTermTemplateAttribute"] = { - Attributes = + ["plain string"] = BinaryData.FromObjectAsJson("Example String"), + ["date"] = BinaryData.FromObjectAsJson(1606233600000L), + ["single choice"] = BinaryData.FromObjectAsJson("Example Single Choice A"), + ["multi choice"] = BinaryData.FromObjectAsJson(new object[] { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - TypeName = "", - LastModifiedTS = "", - }, - RelationshipGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), - RelationshipStatus = StatusAtlasRelationship.Active, - }}, - Categories = {new AtlasTermCategorizationHeader - { - CategoryGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), - Description = "", - DisplayText = "", - RelationGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), - Status = AtlasTermRelationshipStatus.Draft, - }}, - Classifies = { default }, - Examples = { "" }, - IsA = { default }, - PreferredTerms = { default }, - PreferredToTerms = { default }, - ReplacedBy = { default }, - ReplacementTerms = { default }, - SeeAlso = { default }, - Synonyms = { default }, - TranslatedTerms = { default }, - TranslationTerms = { default }, - Usage = "", - ValidValues = { default }, - ValidValuesFor = { default }, + "Example Multi Choice A", + "Example Multi Choice B" + }) + } + }, }; -Response response = await client.CreateTermAsync(body, includeTermHierarchy: true); +Response response = await client.CreateTermAsync(body); ]]> This sample shows how to call CreateTerm. "); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - -AtlasGlossaryTerm body = new AtlasGlossaryTerm(); -Response response = client.CreateTerm(body); -]]> -This sample shows how to call CreateTerm with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); AtlasGlossaryTerm body = new AtlasGlossaryTerm { - Guid = "", - Classifications = {new AtlasClassification - { - Attributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - TypeName = "", - LastModifiedTS = "", - EntityGuid = "", - EntityStatus = EntityStatus.Active, - RemovePropagationsOnEntityDelete = true, - ValidityPeriods = {new TimeBoundary - { - EndTime = "", - StartTime = "", - TimeZone = "", - }}, - }}, - LongDescription = "", - Name = "", - QualifiedName = "", - ShortDescription = "", - LastModifiedTS = "", - CreateTime = 1234L, - CreatedBy = "", - UpdateTime = 1234L, - UpdatedBy = "", - Abbreviation = "", - TemplateName = { BinaryData.FromObjectAsJson(new object()) }, + LongDescription = "Example Long Description", + Name = "ExampleTerm1", + ShortDescription = "Example Short Description", + Abbreviation = "T1", Anchor = new AtlasGlossaryHeader { - DisplayText = "", - GlossaryGuid = "", - RelationGuid = "", + GlossaryGuid = "c018ddaf-7c21-4b37-a838-dae5f110c3d8", }, - Antonyms = {new AtlasRelatedTermHeader - { - Description = "", - DisplayText = "", - Expression = "", - RelationGuid = "", - Status = AtlasTermRelationshipStatus.Draft, - Steward = "", - TermGuid = "", - }}, - Status = TermStatus.Draft, - NickName = "", - HierarchyInfo = {new PurviewObjectId - { - Guid = "", - TypeName = "", - UniqueAttributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - Name = "", - DisplayText = "", - ItemPath = "", - ResourceId = "", - Properties = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - }}, + Status = TermStatus.Approved, Resources = {new ResourceLink { - DisplayName = "", - Url = "", + DisplayName = "Example Display Name", + Url = "Example Url", }}, Contacts = { - ["key"] = {new ContactInfo + ["Expert"] = {new ContactInfo + { + Id = "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", + Info = "Example Expert Info", + }}, + ["Steward"] = {new ContactInfo { - Id = "", - Info = "", + Id = "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", + Info = "Example Steward info", }} }, - Attributes = +}; +Response response = client.CreateTerm(body); +]]> +This sample shows how to call CreateTerm. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +AtlasGlossaryTerm body = new AtlasGlossaryTerm +{ + Name = "ExampleTerm", + Anchor = new AtlasGlossaryHeader { - ["key"] = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - } + GlossaryGuid = "c018ddaf-7c21-4b37-a838-dae5f110c3d8", }, - AssignedEntities = {new AtlasRelatedObjectId + Attributes = { - Guid = "", - TypeName = "", - UniqueAttributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - DisplayText = "", - EntityStatus = EntityStatus.Active, - RelationshipType = "", - RelationshipAttributes = new AtlasStruct + ["ExampleTermTemplateAttribute"] = { - Attributes = + ["plain string"] = BinaryData.FromObjectAsJson("Example String"), + ["date"] = BinaryData.FromObjectAsJson(1606233600000L), + ["single choice"] = BinaryData.FromObjectAsJson("Example Single Choice A"), + ["multi choice"] = BinaryData.FromObjectAsJson(new object[] { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - TypeName = "", - LastModifiedTS = "", - }, - RelationshipGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), - RelationshipStatus = StatusAtlasRelationship.Active, - }}, - Categories = {new AtlasTermCategorizationHeader - { - CategoryGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), - Description = "", - DisplayText = "", - RelationGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), - Status = AtlasTermRelationshipStatus.Draft, - }}, - Classifies = { default }, - Examples = { "" }, - IsA = { default }, - PreferredTerms = { default }, - PreferredToTerms = { default }, - ReplacedBy = { default }, - ReplacementTerms = { default }, - SeeAlso = { default }, - Synonyms = { default }, - TranslatedTerms = { default }, - TranslationTerms = { default }, - Usage = "", - ValidValues = { default }, - ValidValuesFor = { default }, + "Example Multi Choice A", + "Example Multi Choice B" + }) + } + }, }; -Response response = client.CreateTerm(body, includeTermHierarchy: true); +Response response = client.CreateTerm(body); ]]> This sample shows how to call CreateTermAsync and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - -using RequestContent content = RequestContent.Create(new object()); -Response response = await client.CreateTermAsync(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.ToString()); -]]> -This sample shows how to call CreateTermAsync with all parameters and request content and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); using RequestContent content = RequestContent.Create(new { - guid = "", - classifications = new object[] - { - new - { - attributes = new - { - key = new object(), - }, - typeName = "", - lastModifiedTS = "", - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new object[] - { - new - { - endTime = "", - startTime = "", - timeZone = "", - } - }, - } - }, - longDescription = "", - name = "", - qualifiedName = "", - shortDescription = "", - lastModifiedTS = "", - createTime = 1234L, - createdBy = "", - updateTime = 1234L, - updatedBy = "", - abbreviation = "", - templateName = new object[] - { - new object() - }, + name = "ExampleTerm1", + shortDescription = "Example Short Description", + longDescription = "Example Long Description", + abbreviation = "T1", + status = "Approved", anchor = new { - displayText = "", - glossaryGuid = "", - relationGuid = "", - }, - antonyms = new object[] - { - new - { - description = "", - displayText = "", - expression = "", - relationGuid = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - status = "Draft", - nickName = "", - hierarchyInfo = new object[] - { - new - { - guid = "", - typeName = "", - uniqueAttributes = new - { - key = new object(), - }, - name = "", - displayText = "", - itemPath = "", - resourceId = "", - properties = new - { - key = new object(), - }, - } + glossaryGuid = "c018ddaf-7c21-4b37-a838-dae5f110c3d8", }, resources = new object[] { new { - displayName = "", - url = "", + displayName = "Example Display Name", + url = "Example Url", } }, contacts = new { - key = new object[] + Expert = new object[] { new { - id = "", - info = "", + id = "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", + info = "Example Expert Info", } }, - }, - attributes = new - { - key = new + Steward = new object[] { - key = new object(), + new + { + id = "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", + info = "Example Steward info", + } }, }, - assignedEntities = new object[] +}); +Response response = await client.CreateTermAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call CreateTermAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +using RequestContent content = RequestContent.Create(new +{ + name = "ExampleTerm", + anchor = new { - new - { - guid = "", - typeName = "", - uniqueAttributes = new - { - key = new object(), - }, - displayText = "", - entityStatus = "ACTIVE", - relationshipType = "", - relationshipAttributes = new - { - attributes = new - { - key = new object(), - }, - typeName = "", - lastModifiedTS = "", - }, - relationshipGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", - relationshipStatus = "ACTIVE", - } + glossaryGuid = "c018ddaf-7c21-4b37-a838-dae5f110c3d8", }, - categories = new object[] + attributes = new { - new + ExampleTermTemplateAttribute = new Dictionary { - categoryGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", - description = "", - displayText = "", - relationGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", - status = "DRAFT", - } - }, - classifies = new object[] - { - null - }, - examples = new object[] - { - "" - }, - isA = new object[] - { - null - }, - preferredTerms = new object[] - { - null - }, - preferredToTerms = new object[] - { - null - }, - replacedBy = new object[] - { - null - }, - replacementTerms = new object[] - { - null - }, - seeAlso = new object[] - { - null - }, - synonyms = new object[] - { - null - }, - translatedTerms = new object[] - { - null - }, - translationTerms = new object[] - { - null - }, - usage = "", - validValues = new object[] - { - null - }, - validValuesFor = new object[] - { - null + ["plain string"] = "Example String", + ["date"] = 1606233600000L, + ["single choice"] = "Example Single Choice A", + ["multi choice"] = new object[] + { + "Example Multi Choice A", + "Example Multi Choice B" + } + }, }, }); -Response response = await client.CreateTermAsync(content, includeTermHierarchy: true); +Response response = await client.CreateTermAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("longDescription").ToString()); -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("qualifiedName").ToString()); -Console.WriteLine(result.GetProperty("shortDescription").ToString()); -Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("abbreviation").ToString()); -Console.WriteLine(result.GetProperty("templateName")[0].ToString()); -Console.WriteLine(result.GetProperty("anchor").GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("anchor").GetProperty("glossaryGuid").ToString()); -Console.WriteLine(result.GetProperty("anchor").GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("nickName").ToString()); -Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("itemPath").ToString()); -Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("resourceId").ToString()); -Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("properties").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("resources")[0].GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("resources")[0].GetProperty("url").ToString()); -Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); -Console.WriteLine(result.GetProperty("attributes").GetProperty("").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("examples")[0].ToString()); -Console.WriteLine(result.GetProperty("isA")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("isA")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("isA")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("isA")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("isA")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("isA")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("isA")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("usage").ToString()); -Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.ToString()); ]]> This sample shows how to call CreateTerm and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - -using RequestContent content = RequestContent.Create(new object()); -Response response = client.CreateTerm(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.ToString()); -]]> -This sample shows how to call CreateTerm with all parameters and request content and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); using RequestContent content = RequestContent.Create(new { - guid = "", - classifications = new object[] - { - new - { - attributes = new - { - key = new object(), - }, - typeName = "", - lastModifiedTS = "", - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new object[] - { - new - { - endTime = "", - startTime = "", - timeZone = "", - } - }, - } - }, - longDescription = "", - name = "", - qualifiedName = "", - shortDescription = "", - lastModifiedTS = "", - createTime = 1234L, - createdBy = "", - updateTime = 1234L, - updatedBy = "", - abbreviation = "", - templateName = new object[] - { - new object() - }, + name = "ExampleTerm1", + shortDescription = "Example Short Description", + longDescription = "Example Long Description", + abbreviation = "T1", + status = "Approved", anchor = new { - displayText = "", - glossaryGuid = "", - relationGuid = "", - }, - antonyms = new object[] - { - new - { - description = "", - displayText = "", - expression = "", - relationGuid = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - status = "Draft", - nickName = "", - hierarchyInfo = new object[] - { - new - { - guid = "", - typeName = "", - uniqueAttributes = new - { - key = new object(), - }, - name = "", - displayText = "", - itemPath = "", - resourceId = "", - properties = new - { - key = new object(), - }, - } + glossaryGuid = "c018ddaf-7c21-4b37-a838-dae5f110c3d8", }, resources = new object[] { new { - displayName = "", - url = "", + displayName = "Example Display Name", + url = "Example Url", } }, contacts = new { - key = new object[] + Expert = new object[] { new { - id = "", - info = "", + id = "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", + info = "Example Expert Info", } }, - }, - attributes = new - { - key = new + Steward = new object[] { - key = new object(), + new + { + id = "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", + info = "Example Steward info", + } }, }, - assignedEntities = new object[] +}); +Response response = client.CreateTerm(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call CreateTerm and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +using RequestContent content = RequestContent.Create(new +{ + name = "ExampleTerm", + anchor = new { - new - { - guid = "", - typeName = "", - uniqueAttributes = new - { - key = new object(), - }, - displayText = "", - entityStatus = "ACTIVE", - relationshipType = "", - relationshipAttributes = new - { - attributes = new - { - key = new object(), - }, - typeName = "", - lastModifiedTS = "", - }, - relationshipGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", - relationshipStatus = "ACTIVE", - } + glossaryGuid = "c018ddaf-7c21-4b37-a838-dae5f110c3d8", }, - categories = new object[] + attributes = new { - new + ExampleTermTemplateAttribute = new Dictionary { - categoryGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", - description = "", - displayText = "", - relationGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", - status = "DRAFT", - } - }, - classifies = new object[] - { - null - }, - examples = new object[] - { - "" - }, - isA = new object[] - { - null - }, - preferredTerms = new object[] - { - null - }, - preferredToTerms = new object[] - { - null - }, - replacedBy = new object[] - { - null - }, - replacementTerms = new object[] - { - null - }, - seeAlso = new object[] - { - null - }, - synonyms = new object[] - { - null - }, - translatedTerms = new object[] - { - null - }, - translationTerms = new object[] - { - null - }, - usage = "", - validValues = new object[] - { - null - }, - validValuesFor = new object[] - { - null + ["plain string"] = "Example String", + ["date"] = 1606233600000L, + ["single choice"] = "Example Single Choice A", + ["multi choice"] = new object[] + { + "Example Multi Choice A", + "Example Multi Choice B" + } + }, }, }); -Response response = client.CreateTerm(content, includeTermHierarchy: true); +Response response = client.CreateTerm(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("longDescription").ToString()); -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("qualifiedName").ToString()); -Console.WriteLine(result.GetProperty("shortDescription").ToString()); -Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("abbreviation").ToString()); -Console.WriteLine(result.GetProperty("templateName")[0].ToString()); -Console.WriteLine(result.GetProperty("anchor").GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("anchor").GetProperty("glossaryGuid").ToString()); -Console.WriteLine(result.GetProperty("anchor").GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("nickName").ToString()); -Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("itemPath").ToString()); -Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("resourceId").ToString()); -Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("properties").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("resources")[0].GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("resources")[0].GetProperty("url").ToString()); -Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); -Console.WriteLine(result.GetProperty("attributes").GetProperty("").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("examples")[0].ToString()); -Console.WriteLine(result.GetProperty("isA")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("isA")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("isA")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("isA")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("isA")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("isA")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("isA")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("usage").ToString()); -Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.ToString()); ]]> This sample shows how to call GetTermAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -Response response = await client.GetTermAsync(""); +Response response = await client.GetTermAsync("54688d39-b298-4104-9e80-f2a16f44aaea"); ]]> -This sample shows how to call GetTermAsync with all parameters. +This sample shows how to call GetTermAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -Response response = await client.GetTermAsync(""); +Response response = await client.GetTermAsync("54688d39-b298-4104-9e80-f2a16f44aaea"); ]]> This sample shows how to call GetTerm. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -Response response = client.GetTerm(""); +Response response = client.GetTerm("54688d39-b298-4104-9e80-f2a16f44aaea"); ]]> -This sample shows how to call GetTerm with all parameters. +This sample shows how to call GetTerm. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -Response response = client.GetTerm(""); +Response response = client.GetTerm("54688d39-b298-4104-9e80-f2a16f44aaea"); ]]> This sample shows how to call GetTermAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -Response response = await client.GetTermAsync("", null); +Response response = await client.GetTermAsync("54688d39-b298-4104-9e80-f2a16f44aaea", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call GetTermAsync with all parameters and parse the result. +This sample shows how to call GetTermAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -Response response = await client.GetTermAsync("", null); +Response response = await client.GetTermAsync("54688d39-b298-4104-9e80-f2a16f44aaea", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("longDescription").ToString()); -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("qualifiedName").ToString()); -Console.WriteLine(result.GetProperty("shortDescription").ToString()); -Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("abbreviation").ToString()); -Console.WriteLine(result.GetProperty("templateName")[0].ToString()); -Console.WriteLine(result.GetProperty("anchor").GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("anchor").GetProperty("glossaryGuid").ToString()); -Console.WriteLine(result.GetProperty("anchor").GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("nickName").ToString()); -Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("itemPath").ToString()); -Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("resourceId").ToString()); -Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("properties").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("resources")[0].GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("resources")[0].GetProperty("url").ToString()); -Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); -Console.WriteLine(result.GetProperty("attributes").GetProperty("").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("examples")[0].ToString()); -Console.WriteLine(result.GetProperty("isA")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("isA")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("isA")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("isA")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("isA")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("isA")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("isA")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("usage").ToString()); -Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.ToString()); ]]> This sample shows how to call GetTerm and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -Response response = client.GetTerm("", null); +Response response = client.GetTerm("54688d39-b298-4104-9e80-f2a16f44aaea", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call GetTerm with all parameters and parse the result. +This sample shows how to call GetTerm and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -Response response = client.GetTerm("", null); +Response response = client.GetTerm("54688d39-b298-4104-9e80-f2a16f44aaea", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("longDescription").ToString()); -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("qualifiedName").ToString()); -Console.WriteLine(result.GetProperty("shortDescription").ToString()); -Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("abbreviation").ToString()); -Console.WriteLine(result.GetProperty("templateName")[0].ToString()); -Console.WriteLine(result.GetProperty("anchor").GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("anchor").GetProperty("glossaryGuid").ToString()); -Console.WriteLine(result.GetProperty("anchor").GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("nickName").ToString()); -Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("itemPath").ToString()); -Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("resourceId").ToString()); -Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("properties").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("resources")[0].GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("resources")[0].GetProperty("url").ToString()); -Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); -Console.WriteLine(result.GetProperty("attributes").GetProperty("").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("examples")[0].ToString()); -Console.WriteLine(result.GetProperty("isA")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("isA")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("isA")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("isA")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("isA")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("isA")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("isA")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("usage").ToString()); -Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.ToString()); ]]> This sample shows how to call UpdateTermAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -AtlasGlossaryTerm body = new AtlasGlossaryTerm(); -Response response = await client.UpdateTermAsync("", body); -]]> -This sample shows how to call UpdateTermAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); - AtlasGlossaryTerm body = new AtlasGlossaryTerm { - Guid = "", - Classifications = {new AtlasClassification - { - Attributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - TypeName = "", - LastModifiedTS = "", - EntityGuid = "", - EntityStatus = EntityStatus.Active, - RemovePropagationsOnEntityDelete = true, - ValidityPeriods = {new TimeBoundary - { - EndTime = "", - StartTime = "", - TimeZone = "", - }}, - }}, - LongDescription = "", - Name = "", - QualifiedName = "", - ShortDescription = "", - LastModifiedTS = "", - CreateTime = 1234L, - CreatedBy = "", - UpdateTime = 1234L, - UpdatedBy = "", - Abbreviation = "", - TemplateName = { BinaryData.FromObjectAsJson(new object()) }, + Guid = "54688d39-b298-4104-9e80-f2a16f44aaea", + Name = "ExampleTerm1", + QualifiedName = "ExampleTerm1@Glossary", + ShortDescription = "Example Short Description", + LastModifiedTS = "1", + Abbreviation = "T1", Anchor = new AtlasGlossaryHeader { - DisplayText = "", - GlossaryGuid = "", - RelationGuid = "", + GlossaryGuid = "c018ddaf-7c21-4b37-a838-dae5f110c3d8", + RelationGuid = "7b6a8149-a928-476a-a068-dce58653cfa0", }, - Antonyms = {new AtlasRelatedTermHeader - { - Description = "", - DisplayText = "", - Expression = "", - RelationGuid = "", - Status = AtlasTermRelationshipStatus.Draft, - Steward = "", - TermGuid = "", - }}, - Status = TermStatus.Draft, - NickName = "", - HierarchyInfo = {new PurviewObjectId - { - Guid = "", - TypeName = "", - UniqueAttributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - Name = "", - DisplayText = "", - ItemPath = "", - ResourceId = "", - Properties = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - }}, + Status = TermStatus.Approved, Resources = {new ResourceLink { - DisplayName = "", - Url = "", + DisplayName = "Example Display Name", + Url = "Example Url", }}, - Contacts = - { - ["key"] = {new ContactInfo - { - Id = "", - Info = "", - }} - }, - Attributes = + SeeAlso = {new AtlasRelatedTermHeader { - ["key"] = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - } - }, - AssignedEntities = {new AtlasRelatedObjectId + TermGuid = "952c7ba4-4c89-42d8-a05a-7d2161be7008", + }, new AtlasRelatedTermHeader { - Guid = "", - TypeName = "", - UniqueAttributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - DisplayText = "", - EntityStatus = EntityStatus.Active, - RelationshipType = "", - RelationshipAttributes = new AtlasStruct - { - Attributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - TypeName = "", - LastModifiedTS = "", - }, - RelationshipGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), - RelationshipStatus = StatusAtlasRelationship.Active, + TermGuid = "821beef0-ced9-47ba-8f7f-c4f3459f4d18", }}, - Categories = {new AtlasTermCategorizationHeader + Synonyms = {new AtlasRelatedTermHeader { - CategoryGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), - Description = "", - DisplayText = "", - RelationGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), - Status = AtlasTermRelationshipStatus.Draft, + TermGuid = "952c7ba4-4c89-42d8-a05a-7d2161be7008", + }, new AtlasRelatedTermHeader + { + TermGuid = "821beef0-ced9-47ba-8f7f-c4f3459f4d18", }}, - Classifies = { default }, - Examples = { "" }, - IsA = { default }, - PreferredTerms = { default }, - PreferredToTerms = { default }, - ReplacedBy = { default }, - ReplacementTerms = { default }, - SeeAlso = { default }, - Synonyms = { default }, - TranslatedTerms = { default }, - TranslationTerms = { default }, - Usage = "", - ValidValues = { default }, - ValidValuesFor = { default }, }; -Response response = await client.UpdateTermAsync("", body, includeTermHierarchy: true); +Response response = await client.UpdateTermAsync("54688d39-b298-4104-9e80-f2a16f44aaea", body); ]]> This sample shows how to call UpdateTerm. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -AtlasGlossaryTerm body = new AtlasGlossaryTerm(); -Response response = client.UpdateTerm("", body); -]]> -This sample shows how to call UpdateTerm with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); - AtlasGlossaryTerm body = new AtlasGlossaryTerm { - Guid = "", - Classifications = {new AtlasClassification - { - Attributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - TypeName = "", - LastModifiedTS = "", - EntityGuid = "", - EntityStatus = EntityStatus.Active, - RemovePropagationsOnEntityDelete = true, - ValidityPeriods = {new TimeBoundary - { - EndTime = "", - StartTime = "", - TimeZone = "", - }}, - }}, - LongDescription = "", - Name = "", - QualifiedName = "", - ShortDescription = "", - LastModifiedTS = "", - CreateTime = 1234L, - CreatedBy = "", - UpdateTime = 1234L, - UpdatedBy = "", - Abbreviation = "", - TemplateName = { BinaryData.FromObjectAsJson(new object()) }, + Guid = "54688d39-b298-4104-9e80-f2a16f44aaea", + Name = "ExampleTerm1", + QualifiedName = "ExampleTerm1@Glossary", + ShortDescription = "Example Short Description", + LastModifiedTS = "1", + Abbreviation = "T1", Anchor = new AtlasGlossaryHeader { - DisplayText = "", - GlossaryGuid = "", - RelationGuid = "", + GlossaryGuid = "c018ddaf-7c21-4b37-a838-dae5f110c3d8", + RelationGuid = "7b6a8149-a928-476a-a068-dce58653cfa0", }, - Antonyms = {new AtlasRelatedTermHeader - { - Description = "", - DisplayText = "", - Expression = "", - RelationGuid = "", - Status = AtlasTermRelationshipStatus.Draft, - Steward = "", - TermGuid = "", - }}, - Status = TermStatus.Draft, - NickName = "", - HierarchyInfo = {new PurviewObjectId - { - Guid = "", - TypeName = "", - UniqueAttributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - Name = "", - DisplayText = "", - ItemPath = "", - ResourceId = "", - Properties = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - }}, + Status = TermStatus.Approved, Resources = {new ResourceLink { - DisplayName = "", - Url = "", + DisplayName = "Example Display Name", + Url = "Example Url", }}, - Contacts = - { - ["key"] = {new ContactInfo - { - Id = "", - Info = "", - }} - }, - Attributes = + SeeAlso = {new AtlasRelatedTermHeader { - ["key"] = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - } - }, - AssignedEntities = {new AtlasRelatedObjectId + TermGuid = "952c7ba4-4c89-42d8-a05a-7d2161be7008", + }, new AtlasRelatedTermHeader { - Guid = "", - TypeName = "", - UniqueAttributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - DisplayText = "", - EntityStatus = EntityStatus.Active, - RelationshipType = "", - RelationshipAttributes = new AtlasStruct - { - Attributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - TypeName = "", - LastModifiedTS = "", - }, - RelationshipGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), - RelationshipStatus = StatusAtlasRelationship.Active, + TermGuid = "821beef0-ced9-47ba-8f7f-c4f3459f4d18", }}, - Categories = {new AtlasTermCategorizationHeader + Synonyms = {new AtlasRelatedTermHeader { - CategoryGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), - Description = "", - DisplayText = "", - RelationGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), - Status = AtlasTermRelationshipStatus.Draft, + TermGuid = "952c7ba4-4c89-42d8-a05a-7d2161be7008", + }, new AtlasRelatedTermHeader + { + TermGuid = "821beef0-ced9-47ba-8f7f-c4f3459f4d18", }}, - Classifies = { default }, - Examples = { "" }, - IsA = { default }, - PreferredTerms = { default }, - PreferredToTerms = { default }, - ReplacedBy = { default }, - ReplacementTerms = { default }, - SeeAlso = { default }, - Synonyms = { default }, - TranslatedTerms = { default }, - TranslationTerms = { default }, - Usage = "", - ValidValues = { default }, - ValidValuesFor = { default }, }; -Response response = client.UpdateTerm("", body, includeTermHierarchy: true); +Response response = client.UpdateTerm("54688d39-b298-4104-9e80-f2a16f44aaea", body); ]]> This sample shows how to call UpdateTermAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -using RequestContent content = RequestContent.Create(new object()); -Response response = await client.UpdateTermAsync("", content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.ToString()); -]]> -This sample shows how to call UpdateTermAsync with all parameters and request content and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); - using RequestContent content = RequestContent.Create(new { - guid = "", - classifications = new object[] - { - new - { - attributes = new - { - key = new object(), - }, - typeName = "", - lastModifiedTS = "", - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new object[] - { - new - { - endTime = "", - startTime = "", - timeZone = "", - } - }, - } - }, - longDescription = "", - name = "", - qualifiedName = "", - shortDescription = "", - lastModifiedTS = "", - createTime = 1234L, - createdBy = "", - updateTime = 1234L, - updatedBy = "", - abbreviation = "", - templateName = new object[] - { - new object() - }, + guid = "54688d39-b298-4104-9e80-f2a16f44aaea", + qualifiedName = "ExampleTerm1@Glossary", + name = "ExampleTerm1", + shortDescription = "Example Short Description", + lastModifiedTS = "1", + abbreviation = "T1", + status = "Approved", anchor = new { - displayText = "", - glossaryGuid = "", - relationGuid = "", + glossaryGuid = "c018ddaf-7c21-4b37-a838-dae5f110c3d8", + relationGuid = "7b6a8149-a928-476a-a068-dce58653cfa0", }, - antonyms = new object[] + resources = new object[] { new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - status = "DRAFT", - steward = "", - termGuid = "", + displayName = "Example Display Name", + url = "Example Url", } }, - status = "Draft", - nickName = "", - hierarchyInfo = new object[] + seeAlso = new object[] { new { - guid = "", - typeName = "", - uniqueAttributes = new - { - key = new object(), - }, - name = "", - displayText = "", - itemPath = "", - resourceId = "", - properties = new - { - key = new object(), - }, - } - }, - resources = new object[] - { + termGuid = "952c7ba4-4c89-42d8-a05a-7d2161be7008", + }, new { - displayName = "", - url = "", + termGuid = "821beef0-ced9-47ba-8f7f-c4f3459f4d18", } }, - contacts = new - { - key = new object[] - { - new - { - id = "", - info = "", - } - }, - }, - attributes = new - { - key = new - { - key = new object(), - }, - }, - assignedEntities = new object[] + synonyms = new object[] { new { - guid = "", - typeName = "", - uniqueAttributes = new - { - key = new object(), - }, - displayText = "", - entityStatus = "ACTIVE", - relationshipType = "", - relationshipAttributes = new - { - attributes = new - { - key = new object(), - }, - typeName = "", - lastModifiedTS = "", - }, - relationshipGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", - relationshipStatus = "ACTIVE", - } - }, - categories = new object[] - { + termGuid = "952c7ba4-4c89-42d8-a05a-7d2161be7008", + }, new { - categoryGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", - description = "", - displayText = "", - relationGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", - status = "DRAFT", + termGuid = "821beef0-ced9-47ba-8f7f-c4f3459f4d18", } }, - classifies = new object[] - { - null - }, - examples = new object[] - { - "" - }, - isA = new object[] - { - null - }, - preferredTerms = new object[] - { - null - }, - preferredToTerms = new object[] - { - null - }, - replacedBy = new object[] - { - null - }, - replacementTerms = new object[] - { - null - }, - seeAlso = new object[] - { - null - }, - synonyms = new object[] - { - null - }, - translatedTerms = new object[] - { - null - }, - translationTerms = new object[] - { - null - }, - usage = "", - validValues = new object[] - { - null - }, - validValuesFor = new object[] - { - null - }, }); -Response response = await client.UpdateTermAsync("", content, includeTermHierarchy: true); +Response response = await client.UpdateTermAsync("54688d39-b298-4104-9e80-f2a16f44aaea", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("longDescription").ToString()); -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("qualifiedName").ToString()); -Console.WriteLine(result.GetProperty("shortDescription").ToString()); -Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("abbreviation").ToString()); -Console.WriteLine(result.GetProperty("templateName")[0].ToString()); -Console.WriteLine(result.GetProperty("anchor").GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("anchor").GetProperty("glossaryGuid").ToString()); -Console.WriteLine(result.GetProperty("anchor").GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("nickName").ToString()); -Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("itemPath").ToString()); -Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("resourceId").ToString()); -Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("properties").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("resources")[0].GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("resources")[0].GetProperty("url").ToString()); -Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); -Console.WriteLine(result.GetProperty("attributes").GetProperty("").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("examples")[0].ToString()); -Console.WriteLine(result.GetProperty("isA")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("isA")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("isA")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("isA")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("isA")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("isA")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("isA")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("usage").ToString()); -Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.ToString()); ]]> This sample shows how to call UpdateTerm and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -using RequestContent content = RequestContent.Create(new object()); -Response response = client.UpdateTerm("", content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.ToString()); -]]> -This sample shows how to call UpdateTerm with all parameters and request content and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); - using RequestContent content = RequestContent.Create(new -{ - guid = "", - classifications = new object[] - { - new - { - attributes = new - { - key = new object(), - }, - typeName = "", - lastModifiedTS = "", - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new object[] - { - new - { - endTime = "", - startTime = "", - timeZone = "", - } - }, - } - }, - longDescription = "", - name = "", - qualifiedName = "", - shortDescription = "", - lastModifiedTS = "", - createTime = 1234L, - createdBy = "", - updateTime = 1234L, - updatedBy = "", - abbreviation = "", - templateName = new object[] - { - new object() - }, - anchor = new - { - displayText = "", - glossaryGuid = "", - relationGuid = "", - }, - antonyms = new object[] - { - new - { - description = "", - displayText = "", - expression = "", - relationGuid = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - status = "Draft", - nickName = "", - hierarchyInfo = new object[] - { - new - { - guid = "", - typeName = "", - uniqueAttributes = new - { - key = new object(), - }, - name = "", - displayText = "", - itemPath = "", - resourceId = "", - properties = new - { - key = new object(), - }, - } - }, - resources = new object[] - { - new - { - displayName = "", - url = "", - } - }, - contacts = new - { - key = new object[] - { - new - { - id = "", - info = "", - } - }, - }, - attributes = new +{ + guid = "54688d39-b298-4104-9e80-f2a16f44aaea", + qualifiedName = "ExampleTerm1@Glossary", + name = "ExampleTerm1", + shortDescription = "Example Short Description", + lastModifiedTS = "1", + abbreviation = "T1", + status = "Approved", + anchor = new { - key = new - { - key = new object(), - }, + glossaryGuid = "c018ddaf-7c21-4b37-a838-dae5f110c3d8", + relationGuid = "7b6a8149-a928-476a-a068-dce58653cfa0", }, - assignedEntities = new object[] + resources = new object[] { new { - guid = "", - typeName = "", - uniqueAttributes = new - { - key = new object(), - }, - displayText = "", - entityStatus = "ACTIVE", - relationshipType = "", - relationshipAttributes = new - { - attributes = new - { - key = new object(), - }, - typeName = "", - lastModifiedTS = "", - }, - relationshipGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", - relationshipStatus = "ACTIVE", + displayName = "Example Display Name", + url = "Example Url", } }, - categories = new object[] + seeAlso = new object[] { new { - categoryGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", - description = "", - displayText = "", - relationGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", - status = "DRAFT", + termGuid = "952c7ba4-4c89-42d8-a05a-7d2161be7008", + }, + new + { + termGuid = "821beef0-ced9-47ba-8f7f-c4f3459f4d18", } }, - classifies = new object[] - { - null - }, - examples = new object[] - { - "" - }, - isA = new object[] - { - null - }, - preferredTerms = new object[] - { - null - }, - preferredToTerms = new object[] - { - null - }, - replacedBy = new object[] - { - null - }, - replacementTerms = new object[] - { - null - }, - seeAlso = new object[] - { - null - }, synonyms = new object[] { - null - }, - translatedTerms = new object[] - { - null - }, - translationTerms = new object[] - { - null - }, - usage = "", - validValues = new object[] - { - null - }, - validValuesFor = new object[] - { - null + new + { + termGuid = "952c7ba4-4c89-42d8-a05a-7d2161be7008", + }, + new + { + termGuid = "821beef0-ced9-47ba-8f7f-c4f3459f4d18", + } }, }); -Response response = client.UpdateTerm("", content, includeTermHierarchy: true); +Response response = client.UpdateTerm("54688d39-b298-4104-9e80-f2a16f44aaea", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("longDescription").ToString()); -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("qualifiedName").ToString()); -Console.WriteLine(result.GetProperty("shortDescription").ToString()); -Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("abbreviation").ToString()); -Console.WriteLine(result.GetProperty("templateName")[0].ToString()); -Console.WriteLine(result.GetProperty("anchor").GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("anchor").GetProperty("glossaryGuid").ToString()); -Console.WriteLine(result.GetProperty("anchor").GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("nickName").ToString()); -Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("itemPath").ToString()); -Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("resourceId").ToString()); -Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("properties").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("resources")[0].GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("resources")[0].GetProperty("url").ToString()); -Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); -Console.WriteLine(result.GetProperty("attributes").GetProperty("").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("examples")[0].ToString()); -Console.WriteLine(result.GetProperty("isA")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("isA")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("isA")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("isA")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("isA")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("isA")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("isA")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("usage").ToString()); -Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.ToString()); ]]> This sample shows how to call DeleteTermAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - -Response response = await client.DeleteTermAsync(""); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call DeleteTermAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -Response response = await client.DeleteTermAsync(""); +Response response = await client.DeleteTermAsync("b0942506-2d7d-1f45-d286-c29ca9e7f2ef"); Console.WriteLine(response.Status); ]]> @@ -4906,21 +1390,11 @@ Console.WriteLine(response.Status); This sample shows how to call DeleteTerm. "); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - -Response response = client.DeleteTerm(""); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call DeleteTerm with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -Response response = client.DeleteTerm(""); +Response response = client.DeleteTerm("b0942506-2d7d-1f45-d286-c29ca9e7f2ef"); Console.WriteLine(response.Status); ]]> @@ -4929,1633 +1403,347 @@ Console.WriteLine(response.Status); This sample shows how to call PartialUpdateTermAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -Response response = await client.PartialUpdateTermAsync("", new Dictionary +Response response = await client.PartialUpdateTermAsync("54688d39-b298-4104-9e80-f2a16f44aaea", new Dictionary { - ["key"] = "" + ["longDescription"] = "Example Long Description" }); -]]> -This sample shows how to call PartialUpdateTermAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); - -Response response = await client.PartialUpdateTermAsync("", new Dictionary -{ - ["key"] = "" -}, includeTermHierarchy: true); ]]> This sample shows how to call PartialUpdateTerm. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -Response response = client.PartialUpdateTerm("", new Dictionary +Response response = client.PartialUpdateTerm("54688d39-b298-4104-9e80-f2a16f44aaea", new Dictionary { - ["key"] = "" + ["longDescription"] = "Example Long Description" }); -]]> -This sample shows how to call PartialUpdateTerm with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); - -Response response = client.PartialUpdateTerm("", new Dictionary -{ - ["key"] = "" -}, includeTermHierarchy: true); ]]> This sample shows how to call PartialUpdateTermAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); using RequestContent content = RequestContent.Create(new { - key = "", + longDescription = "Example Long Description", }); -Response response = await client.PartialUpdateTermAsync("", content); +Response response = await client.PartialUpdateTermAsync("54688d39-b298-4104-9e80-f2a16f44aaea", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call PartialUpdateTermAsync with all parameters and request content and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); - -using RequestContent content = RequestContent.Create(new -{ - key = "", -}); -Response response = await client.PartialUpdateTermAsync("", content, includeTermHierarchy: true); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("longDescription").ToString()); -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("qualifiedName").ToString()); -Console.WriteLine(result.GetProperty("shortDescription").ToString()); -Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("abbreviation").ToString()); -Console.WriteLine(result.GetProperty("templateName")[0].ToString()); -Console.WriteLine(result.GetProperty("anchor").GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("anchor").GetProperty("glossaryGuid").ToString()); -Console.WriteLine(result.GetProperty("anchor").GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("nickName").ToString()); -Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("itemPath").ToString()); -Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("resourceId").ToString()); -Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("properties").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("resources")[0].GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("resources")[0].GetProperty("url").ToString()); -Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); -Console.WriteLine(result.GetProperty("attributes").GetProperty("").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("examples")[0].ToString()); -Console.WriteLine(result.GetProperty("isA")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("isA")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("isA")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("isA")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("isA")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("isA")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("isA")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("usage").ToString()); -Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("termGuid").ToString()); ]]> This sample shows how to call PartialUpdateTerm and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); using RequestContent content = RequestContent.Create(new { - key = "", + longDescription = "Example Long Description", }); -Response response = client.PartialUpdateTerm("", content); +Response response = client.PartialUpdateTerm("54688d39-b298-4104-9e80-f2a16f44aaea", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call PartialUpdateTerm with all parameters and request content and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); - -using RequestContent content = RequestContent.Create(new -{ - key = "", -}); -Response response = client.PartialUpdateTerm("", content, includeTermHierarchy: true); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("longDescription").ToString()); -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("qualifiedName").ToString()); -Console.WriteLine(result.GetProperty("shortDescription").ToString()); -Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("abbreviation").ToString()); -Console.WriteLine(result.GetProperty("templateName")[0].ToString()); -Console.WriteLine(result.GetProperty("anchor").GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("anchor").GetProperty("glossaryGuid").ToString()); -Console.WriteLine(result.GetProperty("anchor").GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("nickName").ToString()); -Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("itemPath").ToString()); -Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("resourceId").ToString()); -Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("properties").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("resources")[0].GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("resources")[0].GetProperty("url").ToString()); -Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); -Console.WriteLine(result.GetProperty("attributes").GetProperty("").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("examples")[0].ToString()); -Console.WriteLine(result.GetProperty("isA")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("isA")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("isA")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("isA")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("isA")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("isA")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("isA")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("usage").ToString()); -Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("termGuid").ToString()); ]]> This sample shows how to call CreateTermsAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -Response> response = await client.CreateTermsAsync(new AtlasGlossaryTerm[] -{ - new AtlasGlossaryTerm() -}); -]]> -This sample shows how to call CreateTermsAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); - Response> response = await client.CreateTermsAsync(new AtlasGlossaryTerm[] { new AtlasGlossaryTerm { - Guid = "", - Classifications = {new AtlasClassification - { - Attributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - TypeName = "", - LastModifiedTS = "", - EntityGuid = "", - EntityStatus = EntityStatus.Active, - RemovePropagationsOnEntityDelete = true, - ValidityPeriods = {new TimeBoundary - { - EndTime = "", - StartTime = "", - TimeZone = "", - }}, - }}, - LongDescription = "", - Name = "", - QualifiedName = "", - ShortDescription = "", - LastModifiedTS = "", - CreateTime = 1234L, - CreatedBy = "", - UpdateTime = 1234L, - UpdatedBy = "", - Abbreviation = "", - TemplateName = {BinaryData.FromObjectAsJson(new object())}, + LongDescription = "Example Long Description", + Name = "ExampleTerm2", + ShortDescription = "Example Short Description", + Abbreviation = "T2", Anchor = new AtlasGlossaryHeader { - DisplayText = "", - GlossaryGuid = "", - RelationGuid = "", + GlossaryGuid = "c018ddaf-7c21-4b37-a838-dae5f110c3d8", }, - Antonyms = {new AtlasRelatedTermHeader - { - Description = "", - DisplayText = "", - Expression = "", - RelationGuid = "", - Status = AtlasTermRelationshipStatus.Draft, - Steward = "", - TermGuid = "", - }}, - Status = TermStatus.Draft, - NickName = "", - HierarchyInfo = {new PurviewObjectId - { - Guid = "", - TypeName = "", - UniqueAttributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - Name = "", - DisplayText = "", - ItemPath = "", - ResourceId = "", - Properties = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - }}, + Status = TermStatus.Approved, Resources = {new ResourceLink { - DisplayName = "", - Url = "", - }}, - Contacts = - { - ["key"] = {new ContactInfo - { - Id = "", - Info = "", - }} - }, - Attributes = - { - ["key"] = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - } - }, - AssignedEntities = {new AtlasRelatedObjectId - { - Guid = "", - TypeName = "", - UniqueAttributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - DisplayText = "", - EntityStatus = EntityStatus.Active, - RelationshipType = "", - RelationshipAttributes = new AtlasStruct - { - Attributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - TypeName = "", - LastModifiedTS = "", - }, - RelationshipGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), - RelationshipStatus = StatusAtlasRelationship.Active, - }}, - Categories = {new AtlasTermCategorizationHeader - { - CategoryGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), - Description = "", - DisplayText = "", - RelationGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), - Status = AtlasTermRelationshipStatus.Draft, + DisplayName = "Example Display Name", + Url = "Example Url", }}, - Classifies = {default}, - Examples = {""}, - IsA = {default}, - PreferredTerms = {default}, - PreferredToTerms = {default}, - ReplacedBy = {default}, - ReplacementTerms = {default}, - SeeAlso = {default}, - Synonyms = {default}, - TranslatedTerms = {default}, - TranslationTerms = {default}, - Usage = "", - ValidValues = {default}, - ValidValuesFor = {default}, - } -}, includeTermHierarchy: true); -]]> - - - -This sample shows how to call CreateTerms. -"); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - -Response> response = client.CreateTerms(new AtlasGlossaryTerm[] -{ - new AtlasGlossaryTerm() -}); -]]> -This sample shows how to call CreateTerms with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); - -Response> response = client.CreateTerms(new AtlasGlossaryTerm[] -{ + }, new AtlasGlossaryTerm { - Guid = "", - Classifications = {new AtlasClassification - { - Attributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - TypeName = "", - LastModifiedTS = "", - EntityGuid = "", - EntityStatus = EntityStatus.Active, - RemovePropagationsOnEntityDelete = true, - ValidityPeriods = {new TimeBoundary - { - EndTime = "", - StartTime = "", - TimeZone = "", - }}, - }}, - LongDescription = "", - Name = "", - QualifiedName = "", - ShortDescription = "", - LastModifiedTS = "", - CreateTime = 1234L, - CreatedBy = "", - UpdateTime = 1234L, - UpdatedBy = "", - Abbreviation = "", - TemplateName = {BinaryData.FromObjectAsJson(new object())}, + LongDescription = "Example Long Description", + Name = "ExampleTerm3", + ShortDescription = "Example Short Description", + Abbreviation = "T3", Anchor = new AtlasGlossaryHeader { - DisplayText = "", - GlossaryGuid = "", - RelationGuid = "", + GlossaryGuid = "c018ddaf-7c21-4b37-a838-dae5f110c3d8", }, - Antonyms = {new AtlasRelatedTermHeader - { - Description = "", - DisplayText = "", - Expression = "", - RelationGuid = "", - Status = AtlasTermRelationshipStatus.Draft, - Steward = "", - TermGuid = "", - }}, - Status = TermStatus.Draft, - NickName = "", - HierarchyInfo = {new PurviewObjectId - { - Guid = "", - TypeName = "", - UniqueAttributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - Name = "", - DisplayText = "", - ItemPath = "", - ResourceId = "", - Properties = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - }}, + Status = TermStatus.Approved, Resources = {new ResourceLink { - DisplayName = "", - Url = "", - }}, - Contacts = - { - ["key"] = {new ContactInfo - { - Id = "", - Info = "", - }} - }, - Attributes = - { - ["key"] = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - } - }, - AssignedEntities = {new AtlasRelatedObjectId - { - Guid = "", - TypeName = "", - UniqueAttributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - DisplayText = "", - EntityStatus = EntityStatus.Active, - RelationshipType = "", - RelationshipAttributes = new AtlasStruct - { - Attributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - TypeName = "", - LastModifiedTS = "", - }, - RelationshipGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), - RelationshipStatus = StatusAtlasRelationship.Active, - }}, - Categories = {new AtlasTermCategorizationHeader - { - CategoryGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), - Description = "", - DisplayText = "", - RelationGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), - Status = AtlasTermRelationshipStatus.Draft, + DisplayName = "Example Display Name", + Url = "Example Url", }}, - Classifies = {default}, - Examples = {""}, - IsA = {default}, - PreferredTerms = {default}, - PreferredToTerms = {default}, - ReplacedBy = {default}, - ReplacementTerms = {default}, - SeeAlso = {default}, - Synonyms = {default}, - TranslatedTerms = {default}, - TranslationTerms = {default}, - Usage = "", - ValidValues = {default}, - ValidValuesFor = {default}, } -}, includeTermHierarchy: true); +}); ]]> - + -This sample shows how to call CreateTermsAsync and parse the result. +This sample shows how to call CreateTerms. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - -using RequestContent content = RequestContent.Create(new object[] -{ - new object() -}); -Response response = await client.CreateTermsAsync(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result[0].ToString()); -]]> -This sample shows how to call CreateTermsAsync with all parameters and request content and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); - -using RequestContent content = RequestContent.Create(new object[] -{ - new - { - guid = "", - classifications = new object[] - { - new - { - attributes = new - { - key = new object(), - }, - typeName = "", - lastModifiedTS = "", - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new object[] - { - new - { - endTime = "", - startTime = "", - timeZone = "", - } - }, - } - }, - longDescription = "", - name = "", - qualifiedName = "", - shortDescription = "", - lastModifiedTS = "", - createTime = 1234L, - createdBy = "", - updateTime = 1234L, - updatedBy = "", - abbreviation = "", - templateName = new object[] - { - new object() - }, - anchor = new - { - displayText = "", - glossaryGuid = "", - relationGuid = "", - }, - antonyms = new object[] - { - new - { - description = "", - displayText = "", - expression = "", - relationGuid = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - status = "Draft", - nickName = "", - hierarchyInfo = new object[] - { - new - { - guid = "", - typeName = "", - uniqueAttributes = new - { - key = new object(), - }, - name = "", - displayText = "", - itemPath = "", - resourceId = "", - properties = new - { - key = new object(), - }, - } - }, - resources = new object[] - { - new - { - displayName = "", - url = "", - } - }, - contacts = new - { - key = new object[] - { - new - { - id = "", - info = "", - } - }, - }, - attributes = new - { - key = new - { - key = new object(), - }, - }, - assignedEntities = new object[] - { - new - { - guid = "", - typeName = "", - uniqueAttributes = new - { - key = new object(), - }, - displayText = "", - entityStatus = "ACTIVE", - relationshipType = "", - relationshipAttributes = new - { - attributes = new - { - key = new object(), - }, - typeName = "", - lastModifiedTS = "", - }, - relationshipGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", - relationshipStatus = "ACTIVE", - } - }, - categories = new object[] - { - new - { - categoryGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", - description = "", - displayText = "", - relationGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", - status = "DRAFT", - } - }, - classifies = new object[] - { - null - }, - examples = new object[] - { - "" - }, - isA = new object[] - { - null - }, - preferredTerms = new object[] - { - null - }, - preferredToTerms = new object[] - { - null - }, - replacedBy = new object[] - { - null - }, - replacementTerms = new object[] - { - null - }, - seeAlso = new object[] - { - null - }, - synonyms = new object[] - { - null - }, - translatedTerms = new object[] + +Response> response = client.CreateTerms(new AtlasGlossaryTerm[] +{ + new AtlasGlossaryTerm + { + LongDescription = "Example Long Description", + Name = "ExampleTerm2", + ShortDescription = "Example Short Description", + Abbreviation = "T2", + Anchor = new AtlasGlossaryHeader { - null + GlossaryGuid = "c018ddaf-7c21-4b37-a838-dae5f110c3d8", }, - translationTerms = new object[] + Status = TermStatus.Approved, + Resources = {new ResourceLink { - null - }, - usage = "", - validValues = new object[] + DisplayName = "Example Display Name", + Url = "Example Url", + }}, + }, + new AtlasGlossaryTerm + { + LongDescription = "Example Long Description", + Name = "ExampleTerm3", + ShortDescription = "Example Short Description", + Abbreviation = "T3", + Anchor = new AtlasGlossaryHeader { - null + GlossaryGuid = "c018ddaf-7c21-4b37-a838-dae5f110c3d8", }, - validValuesFor = new object[] + Status = TermStatus.Approved, + Resources = {new ResourceLink { - null - }, + DisplayName = "Example Display Name", + Url = "Example Url", + }}, } }); -Response response = await client.CreateTermsAsync(content, includeTermHierarchy: true); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result[0].GetProperty("guid").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result[0].GetProperty("longDescription").ToString()); -Console.WriteLine(result[0].GetProperty("name").ToString()); -Console.WriteLine(result[0].GetProperty("qualifiedName").ToString()); -Console.WriteLine(result[0].GetProperty("shortDescription").ToString()); -Console.WriteLine(result[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result[0].GetProperty("createTime").ToString()); -Console.WriteLine(result[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result[0].GetProperty("updateTime").ToString()); -Console.WriteLine(result[0].GetProperty("updatedBy").ToString()); -Console.WriteLine(result[0].GetProperty("abbreviation").ToString()); -Console.WriteLine(result[0].GetProperty("templateName")[0].ToString()); -Console.WriteLine(result[0].GetProperty("anchor").GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("anchor").GetProperty("glossaryGuid").ToString()); -Console.WriteLine(result[0].GetProperty("anchor").GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("description").ToString()); -Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("status").ToString()); -Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result[0].GetProperty("status").ToString()); -Console.WriteLine(result[0].GetProperty("nickName").ToString()); -Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("guid").ToString()); -Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); -Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("name").ToString()); -Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("itemPath").ToString()); -Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("resourceId").ToString()); -Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("properties").GetProperty("").ToString()); -Console.WriteLine(result[0].GetProperty("resources")[0].GetProperty("displayName").ToString()); -Console.WriteLine(result[0].GetProperty("resources")[0].GetProperty("url").ToString()); -Console.WriteLine(result[0].GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); -Console.WriteLine(result[0].GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); -Console.WriteLine(result[0].GetProperty("attributes").GetProperty("").GetProperty("").ToString()); -Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); -Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); -Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); -Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); -Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); -Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); -Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); -Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("description").ToString()); -Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("status").ToString()); -Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("description").ToString()); -Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("expression").ToString()); -Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("status").ToString()); -Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("steward").ToString()); -Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result[0].GetProperty("examples")[0].ToString()); -Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("description").ToString()); -Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("expression").ToString()); -Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("status").ToString()); -Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("steward").ToString()); -Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("description").ToString()); -Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("status").ToString()); -Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("description").ToString()); -Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("status").ToString()); -Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("description").ToString()); -Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("expression").ToString()); -Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("status").ToString()); -Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("steward").ToString()); -Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("description").ToString()); -Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("status").ToString()); -Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("description").ToString()); -Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("expression").ToString()); -Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("status").ToString()); -Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("steward").ToString()); -Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("description").ToString()); -Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("status").ToString()); -Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("description").ToString()); -Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("status").ToString()); -Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("description").ToString()); -Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("status").ToString()); -Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result[0].GetProperty("usage").ToString()); -Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("description").ToString()); -Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("expression").ToString()); -Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("status").ToString()); -Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("steward").ToString()); -Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("description").ToString()); -Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("expression").ToString()); -Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("status").ToString()); -Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("steward").ToString()); -Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("termGuid").ToString()); ]]> - + -This sample shows how to call CreateTerms and parse the result. +This sample shows how to call CreateTermsAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -using RequestContent content = RequestContent.Create(new object[] -{ - new object() -}); -Response response = client.CreateTerms(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result[0].ToString()); -]]> -This sample shows how to call CreateTerms with all parameters and request content and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); - using RequestContent content = RequestContent.Create(new object[] { new { - guid = "", - classifications = new object[] - { - new - { - attributes = new - { - key = new object(), - }, - typeName = "", - lastModifiedTS = "", - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new object[] - { - new - { - endTime = "", - startTime = "", - timeZone = "", - } - }, - } - }, - longDescription = "", - name = "", - qualifiedName = "", - shortDescription = "", - lastModifiedTS = "", - createTime = 1234L, - createdBy = "", - updateTime = 1234L, - updatedBy = "", - abbreviation = "", - templateName = new object[] - { - new object() - }, anchor = new { - displayText = "", - glossaryGuid = "", - relationGuid = "", + glossaryGuid = "c018ddaf-7c21-4b37-a838-dae5f110c3d8", }, - antonyms = new object[] + name = "ExampleTerm2", + status = "Approved", + shortDescription = "Example Short Description", + longDescription = "Example Long Description", + abbreviation = "T2", + resources = new object[] { new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - status = "DRAFT", - steward = "", - termGuid = "", + displayName = "Example Display Name", + url = "Example Url", } }, - status = "Draft", - nickName = "", - hierarchyInfo = new object[] + }, + new + { + anchor = new { - new - { - guid = "", - typeName = "", - uniqueAttributes = new - { - key = new object(), - }, - name = "", - displayText = "", - itemPath = "", - resourceId = "", - properties = new - { - key = new object(), - }, - } + glossaryGuid = "c018ddaf-7c21-4b37-a838-dae5f110c3d8", }, + name = "ExampleTerm3", + status = "Approved", + shortDescription = "Example Short Description", + longDescription = "Example Long Description", + abbreviation = "T3", resources = new object[] { new { - displayName = "", - url = "", + displayName = "Example Display Name", + url = "Example Url", } }, - contacts = new - { - key = new object[] - { - new - { - id = "", - info = "", - } - }, - }, - attributes = new + } +}); +Response response = await client.CreateTermsAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].ToString()); +]]> + + + +This sample shows how to call CreateTerms and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +using RequestContent content = RequestContent.Create(new object[] +{ + new + { + anchor = new { - key = new - { - key = new object(), - }, + glossaryGuid = "c018ddaf-7c21-4b37-a838-dae5f110c3d8", }, - assignedEntities = new object[] + name = "ExampleTerm2", + status = "Approved", + shortDescription = "Example Short Description", + longDescription = "Example Long Description", + abbreviation = "T2", + resources = new object[] { new { - guid = "", - typeName = "", - uniqueAttributes = new - { - key = new object(), - }, - displayText = "", - entityStatus = "ACTIVE", - relationshipType = "", - relationshipAttributes = new - { - attributes = new - { - key = new object(), - }, - typeName = "", - lastModifiedTS = "", - }, - relationshipGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", - relationshipStatus = "ACTIVE", + displayName = "Example Display Name", + url = "Example Url", } }, - categories = new object[] + }, + new + { + anchor = new + { + glossaryGuid = "c018ddaf-7c21-4b37-a838-dae5f110c3d8", + }, + name = "ExampleTerm3", + status = "Approved", + shortDescription = "Example Short Description", + longDescription = "Example Long Description", + abbreviation = "T3", + resources = new object[] { new { - categoryGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", - description = "", - displayText = "", - relationGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", - status = "DRAFT", + displayName = "Example Display Name", + url = "Example Url", } }, - classifies = new object[] - { - null - }, - examples = new object[] - { - "" - }, - isA = new object[] - { - null - }, - preferredTerms = new object[] - { - null - }, - preferredToTerms = new object[] - { - null - }, - replacedBy = new object[] - { - null - }, - replacementTerms = new object[] - { - null - }, - seeAlso = new object[] - { - null - }, - synonyms = new object[] - { - null - }, - translatedTerms = new object[] - { - null - }, - translationTerms = new object[] - { - null - }, - usage = "", - validValues = new object[] - { - null - }, - validValuesFor = new object[] - { - null - }, } }); -Response response = client.CreateTerms(content, includeTermHierarchy: true); +Response response = client.CreateTerms(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result[0].GetProperty("guid").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result[0].GetProperty("longDescription").ToString()); -Console.WriteLine(result[0].GetProperty("name").ToString()); -Console.WriteLine(result[0].GetProperty("qualifiedName").ToString()); -Console.WriteLine(result[0].GetProperty("shortDescription").ToString()); -Console.WriteLine(result[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result[0].GetProperty("createTime").ToString()); -Console.WriteLine(result[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result[0].GetProperty("updateTime").ToString()); -Console.WriteLine(result[0].GetProperty("updatedBy").ToString()); -Console.WriteLine(result[0].GetProperty("abbreviation").ToString()); -Console.WriteLine(result[0].GetProperty("templateName")[0].ToString()); -Console.WriteLine(result[0].GetProperty("anchor").GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("anchor").GetProperty("glossaryGuid").ToString()); -Console.WriteLine(result[0].GetProperty("anchor").GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("description").ToString()); -Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("status").ToString()); -Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result[0].GetProperty("status").ToString()); -Console.WriteLine(result[0].GetProperty("nickName").ToString()); -Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("guid").ToString()); -Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); -Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("name").ToString()); -Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("itemPath").ToString()); -Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("resourceId").ToString()); -Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("properties").GetProperty("").ToString()); -Console.WriteLine(result[0].GetProperty("resources")[0].GetProperty("displayName").ToString()); -Console.WriteLine(result[0].GetProperty("resources")[0].GetProperty("url").ToString()); -Console.WriteLine(result[0].GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); -Console.WriteLine(result[0].GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); -Console.WriteLine(result[0].GetProperty("attributes").GetProperty("").GetProperty("").ToString()); -Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); -Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); -Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); -Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); -Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); -Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); -Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); -Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("description").ToString()); -Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("status").ToString()); -Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("description").ToString()); -Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("expression").ToString()); -Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("status").ToString()); -Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("steward").ToString()); -Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result[0].GetProperty("examples")[0].ToString()); -Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("description").ToString()); -Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("expression").ToString()); -Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("status").ToString()); -Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("steward").ToString()); -Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("description").ToString()); -Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("status").ToString()); -Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("description").ToString()); -Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("status").ToString()); -Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("description").ToString()); -Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("expression").ToString()); -Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("status").ToString()); -Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("steward").ToString()); -Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("description").ToString()); -Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("status").ToString()); -Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("description").ToString()); -Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("expression").ToString()); -Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("status").ToString()); -Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("steward").ToString()); -Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("description").ToString()); -Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("status").ToString()); -Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("description").ToString()); -Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("status").ToString()); -Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("description").ToString()); -Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("status").ToString()); -Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result[0].GetProperty("usage").ToString()); -Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("description").ToString()); -Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("expression").ToString()); -Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("status").ToString()); -Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("steward").ToString()); -Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("description").ToString()); -Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("expression").ToString()); -Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("status").ToString()); -Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("steward").ToString()); -Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result[0].ToString()); ]]> This sample shows how to call GetEntitiesAssignedWithTermAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - -Response> response = await client.GetEntitiesAssignedWithTermAsync(""); -]]> -This sample shows how to call GetEntitiesAssignedWithTermAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -Response> response = await client.GetEntitiesAssignedWithTermAsync("", limit: 1234, offset: 1234, sort: ""); +Response> response = await client.GetEntitiesAssignedWithTermAsync("daf0ba4d-bc9a-4536-8a88-4b58e39dd3d4"); ]]> This sample shows how to call GetEntitiesAssignedWithTerm. "); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - -Response> response = client.GetEntitiesAssignedWithTerm(""); -]]> -This sample shows how to call GetEntitiesAssignedWithTerm with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -Response> response = client.GetEntitiesAssignedWithTerm("", limit: 1234, offset: 1234, sort: ""); +Response> response = client.GetEntitiesAssignedWithTerm("daf0ba4d-bc9a-4536-8a88-4b58e39dd3d4"); ]]> This sample shows how to call GetEntitiesAssignedWithTermAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -Response response = await client.GetEntitiesAssignedWithTermAsync("", null, null, null, null); +Response response = await client.GetEntitiesAssignedWithTermAsync("daf0ba4d-bc9a-4536-8a88-4b58e39dd3d4", null, null, "ASC", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].ToString()); -]]> -This sample shows how to call GetEntitiesAssignedWithTermAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - -Response response = await client.GetEntitiesAssignedWithTermAsync("", 1234, 1234, "", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result[0].GetProperty("guid").ToString()); -Console.WriteLine(result[0].GetProperty("typeName").ToString()); -Console.WriteLine(result[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); -Console.WriteLine(result[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result[0].GetProperty("relationshipType").ToString()); -Console.WriteLine(result[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); -Console.WriteLine(result[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result[0].GetProperty("relationshipGuid").ToString()); -Console.WriteLine(result[0].GetProperty("relationshipStatus").ToString()); ]]> This sample shows how to call GetEntitiesAssignedWithTerm and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -Response response = client.GetEntitiesAssignedWithTerm("", null, null, null, null); +Response response = client.GetEntitiesAssignedWithTerm("daf0ba4d-bc9a-4536-8a88-4b58e39dd3d4", null, null, "ASC", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].ToString()); -]]> -This sample shows how to call GetEntitiesAssignedWithTerm with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - -Response response = client.GetEntitiesAssignedWithTerm("", 1234, 1234, "", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result[0].GetProperty("guid").ToString()); -Console.WriteLine(result[0].GetProperty("typeName").ToString()); -Console.WriteLine(result[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); -Console.WriteLine(result[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result[0].GetProperty("relationshipType").ToString()); -Console.WriteLine(result[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); -Console.WriteLine(result[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result[0].GetProperty("relationshipGuid").ToString()); -Console.WriteLine(result[0].GetProperty("relationshipStatus").ToString()); ]]> This sample shows how to call AssignTermToEntitiesAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - -Response response = await client.AssignTermToEntitiesAsync("", new AtlasRelatedObjectId[] -{ - new AtlasRelatedObjectId() -}); -]]> -This sample shows how to call AssignTermToEntitiesAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -Response response = await client.AssignTermToEntitiesAsync("", new AtlasRelatedObjectId[] +Response response = await client.AssignTermToEntitiesAsync("8a7f65ec-6429-0b9b-3734-ec57bf1e34c2", new AtlasRelatedObjectId[] { new AtlasRelatedObjectId { - Guid = "", - TypeName = "", - UniqueAttributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - DisplayText = "", - EntityStatus = EntityStatus.Active, - RelationshipType = "", + Guid = "ab9f1920-0b94-436d-aeb4-11a32c270fc0", RelationshipAttributes = new AtlasStruct { Attributes = { - ["key"] = BinaryData.FromObjectAsJson(new object()) + ["expression"] = BinaryData.FromObjectAsJson("Example Expression"), + ["confidence"] = BinaryData.FromObjectAsJson(100), + ["description"] = BinaryData.FromObjectAsJson("Example Description"), + ["source"] = BinaryData.FromObjectAsJson("ExampleSource") }, - TypeName = "", - LastModifiedTS = "", }, - RelationshipGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), - RelationshipStatus = StatusAtlasRelationship.Active, } }); ]]> @@ -6564,45 +1752,25 @@ Response response = await client.AssignTermToEntitiesAsync("", new Atlas This sample shows how to call AssignTermToEntities. "); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - -Response response = client.AssignTermToEntities("", new AtlasRelatedObjectId[] -{ - new AtlasRelatedObjectId() -}); -]]> -This sample shows how to call AssignTermToEntities with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -Response response = client.AssignTermToEntities("", new AtlasRelatedObjectId[] +Response response = client.AssignTermToEntities("8a7f65ec-6429-0b9b-3734-ec57bf1e34c2", new AtlasRelatedObjectId[] { new AtlasRelatedObjectId { - Guid = "", - TypeName = "", - UniqueAttributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - DisplayText = "", - EntityStatus = EntityStatus.Active, - RelationshipType = "", + Guid = "ab9f1920-0b94-436d-aeb4-11a32c270fc0", RelationshipAttributes = new AtlasStruct { Attributes = { - ["key"] = BinaryData.FromObjectAsJson(new object()) + ["expression"] = BinaryData.FromObjectAsJson("Example Expression"), + ["confidence"] = BinaryData.FromObjectAsJson(100), + ["description"] = BinaryData.FromObjectAsJson("Example Description"), + ["source"] = BinaryData.FromObjectAsJson("ExampleSource") }, - TypeName = "", - LastModifiedTS = "", }, - RelationshipGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), - RelationshipStatus = StatusAtlasRelationship.Active, } }); ]]> @@ -6611,21 +1779,7 @@ Response response = client.AssignTermToEntities("", new AtlasRelatedObje This sample shows how to call AssignTermToEntitiesAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - -using RequestContent content = RequestContent.Create(new object[] -{ - new object() -}); -Response response = await client.AssignTermToEntitiesAsync("", content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call AssignTermToEntitiesAsync with all parameters and request content. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); @@ -6633,29 +1787,20 @@ using RequestContent content = RequestContent.Create(new object[] { new { - guid = "", - typeName = "", - uniqueAttributes = new - { - key = new object(), - }, - displayText = "", - entityStatus = "ACTIVE", - relationshipType = "", + guid = "ab9f1920-0b94-436d-aeb4-11a32c270fc0", relationshipAttributes = new { attributes = new { - key = new object(), + expression = "Example Expression", + confidence = 100, + description = "Example Description", + source = "ExampleSource", }, - typeName = "", - lastModifiedTS = "", }, - relationshipGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", - relationshipStatus = "ACTIVE", } }); -Response response = await client.AssignTermToEntitiesAsync("", content); +Response response = await client.AssignTermToEntitiesAsync("8a7f65ec-6429-0b9b-3734-ec57bf1e34c2", content); Console.WriteLine(response.Status); ]]> @@ -6664,21 +1809,7 @@ Console.WriteLine(response.Status); This sample shows how to call AssignTermToEntities. "); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - -using RequestContent content = RequestContent.Create(new object[] -{ - new object() -}); -Response response = client.AssignTermToEntities("", content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call AssignTermToEntities with all parameters and request content. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); @@ -6686,29 +1817,20 @@ using RequestContent content = RequestContent.Create(new object[] { new { - guid = "", - typeName = "", - uniqueAttributes = new - { - key = new object(), - }, - displayText = "", - entityStatus = "ACTIVE", - relationshipType = "", + guid = "ab9f1920-0b94-436d-aeb4-11a32c270fc0", relationshipAttributes = new { attributes = new { - key = new object(), + expression = "Example Expression", + confidence = 100, + description = "Example Description", + source = "ExampleSource", }, - typeName = "", - lastModifiedTS = "", }, - relationshipGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", - relationshipStatus = "ACTIVE", } }); -Response response = client.AssignTermToEntities("", content); +Response response = client.AssignTermToEntities("8a7f65ec-6429-0b9b-3734-ec57bf1e34c2", content); Console.WriteLine(response.Status); ]]> @@ -6717,45 +1839,16 @@ Console.WriteLine(response.Status); This sample shows how to call DeleteTermAssignmentFromEntitiesAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -Response response = await client.DeleteTermAssignmentFromEntitiesAsync("", new AtlasRelatedObjectId[] -{ - new AtlasRelatedObjectId() -}); -]]> -This sample shows how to call DeleteTermAssignmentFromEntitiesAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - -Response response = await client.DeleteTermAssignmentFromEntitiesAsync("", new AtlasRelatedObjectId[] +Response response = await client.DeleteTermAssignmentFromEntitiesAsync("8a7f65ec-6429-0b9b-3734-ec57bf1e34c2", new AtlasRelatedObjectId[] { new AtlasRelatedObjectId { - Guid = "", - TypeName = "", - UniqueAttributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - DisplayText = "", - EntityStatus = EntityStatus.Active, - RelationshipType = "", - RelationshipAttributes = new AtlasStruct - { - Attributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - TypeName = "", - LastModifiedTS = "", - }, - RelationshipGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), - RelationshipStatus = StatusAtlasRelationship.Active, + Guid = "16feb2a1-2c79-ade1-338d-fb24fcb8b8bd", + RelationshipGuid = Guid.Parse("624f08bb-3c93-4f03-9ce1-ed2ce2c7c8d5"), } }); ]]> @@ -6764,45 +1857,16 @@ Response response = await client.DeleteTermAssignmentFromEntitiesAsync(" This sample shows how to call DeleteTermAssignmentFromEntities. "); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - -Response response = client.DeleteTermAssignmentFromEntities("", new AtlasRelatedObjectId[] -{ - new AtlasRelatedObjectId() -}); -]]> -This sample shows how to call DeleteTermAssignmentFromEntities with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -Response response = client.DeleteTermAssignmentFromEntities("", new AtlasRelatedObjectId[] +Response response = client.DeleteTermAssignmentFromEntities("8a7f65ec-6429-0b9b-3734-ec57bf1e34c2", new AtlasRelatedObjectId[] { new AtlasRelatedObjectId { - Guid = "", - TypeName = "", - UniqueAttributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - DisplayText = "", - EntityStatus = EntityStatus.Active, - RelationshipType = "", - RelationshipAttributes = new AtlasStruct - { - Attributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - TypeName = "", - LastModifiedTS = "", - }, - RelationshipGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), - RelationshipStatus = StatusAtlasRelationship.Active, + Guid = "16feb2a1-2c79-ade1-338d-fb24fcb8b8bd", + RelationshipGuid = Guid.Parse("624f08bb-3c93-4f03-9ce1-ed2ce2c7c8d5"), } }); ]]> @@ -6811,21 +1875,7 @@ Response response = client.DeleteTermAssignmentFromEntities("", new Atla This sample shows how to call DeleteTermAssignmentFromEntitiesAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - -using RequestContent content = RequestContent.Create(new object[] -{ - new object() -}); -Response response = await client.DeleteTermAssignmentFromEntitiesAsync("", content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call DeleteTermAssignmentFromEntitiesAsync with all parameters and request content. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); @@ -6833,29 +1883,11 @@ using RequestContent content = RequestContent.Create(new object[] { new { - guid = "", - typeName = "", - uniqueAttributes = new - { - key = new object(), - }, - displayText = "", - entityStatus = "ACTIVE", - relationshipType = "", - relationshipAttributes = new - { - attributes = new - { - key = new object(), - }, - typeName = "", - lastModifiedTS = "", - }, - relationshipGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", - relationshipStatus = "ACTIVE", + guid = "16feb2a1-2c79-ade1-338d-fb24fcb8b8bd", + relationshipGuid = "624f08bb-3c93-4f03-9ce1-ed2ce2c7c8d5", } }); -Response response = await client.DeleteTermAssignmentFromEntitiesAsync("", content); +Response response = await client.DeleteTermAssignmentFromEntitiesAsync("8a7f65ec-6429-0b9b-3734-ec57bf1e34c2", content); Console.WriteLine(response.Status); ]]> @@ -6864,21 +1896,7 @@ Console.WriteLine(response.Status); This sample shows how to call DeleteTermAssignmentFromEntities. "); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - -using RequestContent content = RequestContent.Create(new object[] -{ - new object() -}); -Response response = client.DeleteTermAssignmentFromEntities("", content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call DeleteTermAssignmentFromEntities with all parameters and request content. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); @@ -6886,29 +1904,11 @@ using RequestContent content = RequestContent.Create(new object[] { new { - guid = "", - typeName = "", - uniqueAttributes = new - { - key = new object(), - }, - displayText = "", - entityStatus = "ACTIVE", - relationshipType = "", - relationshipAttributes = new - { - attributes = new - { - key = new object(), - }, - typeName = "", - lastModifiedTS = "", - }, - relationshipGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", - relationshipStatus = "ACTIVE", + guid = "16feb2a1-2c79-ade1-338d-fb24fcb8b8bd", + relationshipGuid = "624f08bb-3c93-4f03-9ce1-ed2ce2c7c8d5", } }); -Response response = client.DeleteTermAssignmentFromEntities("", content); +Response response = client.DeleteTermAssignmentFromEntities("8a7f65ec-6429-0b9b-3734-ec57bf1e34c2", content); Console.WriteLine(response.Status); ]]> @@ -6917,657 +1917,339 @@ Console.WriteLine(response.Status); This sample shows how to call GetRelatedTermsAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -Response>> response = await client.GetRelatedTermsAsync(""); -]]> -This sample shows how to call GetRelatedTermsAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); - -Response>> response = await client.GetRelatedTermsAsync("", limit: 1234, offset: 1234, sort: ""); +Response>> response = await client.GetRelatedTermsAsync("54688d39-b298-4104-9e80-f2a16f44aaea"); ]]> This sample shows how to call GetRelatedTerms. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -Response>> response = client.GetRelatedTerms(""); -]]> -This sample shows how to call GetRelatedTerms with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); - -Response>> response = client.GetRelatedTerms("", limit: 1234, offset: 1234, sort: ""); +Response>> response = client.GetRelatedTerms("54688d39-b298-4104-9e80-f2a16f44aaea"); ]]> This sample shows how to call GetRelatedTermsAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -Response response = await client.GetRelatedTermsAsync("", null, null, null, null); +Response response = await client.GetRelatedTermsAsync("54688d39-b298-4104-9e80-f2a16f44aaea", null, null, "ASC", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("")[0].ToString()); -]]> -This sample shows how to call GetRelatedTermsAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); - -Response response = await client.GetRelatedTermsAsync("", 1234, 1234, "", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("")[0].GetProperty("termGuid").ToString()); ]]> This sample shows how to call GetRelatedTerms and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -Response response = client.GetRelatedTerms("", null, null, null, null); +Response response = client.GetRelatedTerms("54688d39-b298-4104-9e80-f2a16f44aaea", null, null, "ASC", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("")[0].ToString()); -]]> -This sample shows how to call GetRelatedTerms with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); - -Response response = client.GetRelatedTerms("", 1234, 1234, "", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("")[0].GetProperty("termGuid").ToString()); ]]> This sample shows how to call GetGlossaryAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - -Response response = await client.GetGlossaryAsync(""); -]]> -This sample shows how to call GetGlossaryAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -Response response = await client.GetGlossaryAsync(""); +Response response = await client.GetGlossaryAsync("47029611-67a1-42d5-8766-90eb904f7f22"); ]]> This sample shows how to call GetGlossary. "); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - -Response response = client.GetGlossary(""); -]]> -This sample shows how to call GetGlossary with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -Response response = client.GetGlossary(""); +Response response = client.GetGlossary("47029611-67a1-42d5-8766-90eb904f7f22"); ]]> This sample shows how to call GetGlossaryAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -Response response = await client.GetGlossaryAsync("", null); +Response response = await client.GetGlossaryAsync("47029611-67a1-42d5-8766-90eb904f7f22", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetGlossaryAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - -Response response = await client.GetGlossaryAsync("", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("longDescription").ToString()); -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("qualifiedName").ToString()); -Console.WriteLine(result.GetProperty("shortDescription").ToString()); -Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("parentCategoryGuid").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("language").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("usage").ToString()); ]]> This sample shows how to call GetGlossary and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -Response response = client.GetGlossary("", null); +Response response = client.GetGlossary("47029611-67a1-42d5-8766-90eb904f7f22", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetGlossary with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - -Response response = client.GetGlossary("", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("longDescription").ToString()); -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("qualifiedName").ToString()); -Console.WriteLine(result.GetProperty("shortDescription").ToString()); -Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("parentCategoryGuid").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("language").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("usage").ToString()); ]]> This sample shows how to call UpdateAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -AtlasGlossary body = new AtlasGlossary(); -Response response = await client.UpdateAsync("", body); -]]> -This sample shows how to call UpdateAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); - AtlasGlossary body = new AtlasGlossary { - Guid = "", - Classifications = {new AtlasClassification - { - Attributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - TypeName = "", - LastModifiedTS = "", - EntityGuid = "", - EntityStatus = EntityStatus.Active, - RemovePropagationsOnEntityDelete = true, - ValidityPeriods = {new TimeBoundary - { - EndTime = "", - StartTime = "", - TimeZone = "", - }}, - }}, - LongDescription = "", - Name = "", - QualifiedName = "", - ShortDescription = "", - LastModifiedTS = "", - CreateTime = 1234L, - CreatedBy = "", - UpdateTime = 1234L, - UpdatedBy = "", + Guid = "c018ddaf-7c21-4b37-a838-dae5f110c3d8", + LongDescription = "Example Long Description", + Name = "Glossary", + QualifiedName = "Glossary", + ShortDescription = "Example Short Description", + LastModifiedTS = "1", Categories = {new AtlasRelatedCategoryHeader { - CategoryGuid = "", - Description = "", - DisplayText = "", - ParentCategoryGuid = "", - RelationGuid = "", + CategoryGuid = "0d6766f6-f4b6-435b-bda2-d3edc358998e", + DisplayText = "ExampleCategory3", + ParentCategoryGuid = "ed7458f0-9463-48a5-b5c6-4f785fb34e12", + RelationGuid = "26a486a4-a8e2-483c-8a84-3b88e909f8d2", + }, new AtlasRelatedCategoryHeader + { + CategoryGuid = "ed7458f0-9463-48a5-b5c6-4f785fb34e12", + DisplayText = "ExampleCategory1", + ParentCategoryGuid = "e47c4584-daca-4f9e-9092-194e04692c9a", + RelationGuid = "7bdcef93-a57a-4d1d-95ab-9d3036f394a0", + }, new AtlasRelatedCategoryHeader + { + CategoryGuid = "e47c4584-daca-4f9e-9092-194e04692c9a", + DisplayText = "ExampleCategory2", + RelationGuid = "94071e56-fd3e-4441-93ff-1834f818482d", }}, - Language = "", + Language = "en", Terms = {new AtlasRelatedTermHeader { - Description = "", - DisplayText = "", - Expression = "", - RelationGuid = "", - Status = AtlasTermRelationshipStatus.Draft, - Steward = "", - TermGuid = "", + DisplayText = "ExampleTerm1", + RelationGuid = "7b6a8149-a928-476a-a068-dce58653cfa0", + TermGuid = "54688d39-b298-4104-9e80-f2a16f44aaea", + }, new AtlasRelatedTermHeader + { + DisplayText = "ExampleTerm2", + RelationGuid = "9385640b-e6be-437d-a6b9-62d11c14a189", + TermGuid = "952c7ba4-4c89-42d8-a05a-7d2161be7008", }}, - Usage = "", + Usage = "Example Glossary", }; -Response response = await client.UpdateAsync("", body, ignoreTermsAndCategories: true); +Response response = await client.UpdateAsync("c018ddaf-7c21-4b37-a838-dae5f110c3d8", body); ]]> This sample shows how to call Update. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -AtlasGlossary body = new AtlasGlossary(); -Response response = client.Update("", body); -]]> -This sample shows how to call Update with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); - AtlasGlossary body = new AtlasGlossary { - Guid = "", - Classifications = {new AtlasClassification - { - Attributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - TypeName = "", - LastModifiedTS = "", - EntityGuid = "", - EntityStatus = EntityStatus.Active, - RemovePropagationsOnEntityDelete = true, - ValidityPeriods = {new TimeBoundary - { - EndTime = "", - StartTime = "", - TimeZone = "", - }}, - }}, - LongDescription = "", - Name = "", - QualifiedName = "", - ShortDescription = "", - LastModifiedTS = "", - CreateTime = 1234L, - CreatedBy = "", - UpdateTime = 1234L, - UpdatedBy = "", + Guid = "c018ddaf-7c21-4b37-a838-dae5f110c3d8", + LongDescription = "Example Long Description", + Name = "Glossary", + QualifiedName = "Glossary", + ShortDescription = "Example Short Description", + LastModifiedTS = "1", Categories = {new AtlasRelatedCategoryHeader { - CategoryGuid = "", - Description = "", - DisplayText = "", - ParentCategoryGuid = "", - RelationGuid = "", + CategoryGuid = "0d6766f6-f4b6-435b-bda2-d3edc358998e", + DisplayText = "ExampleCategory3", + ParentCategoryGuid = "ed7458f0-9463-48a5-b5c6-4f785fb34e12", + RelationGuid = "26a486a4-a8e2-483c-8a84-3b88e909f8d2", + }, new AtlasRelatedCategoryHeader + { + CategoryGuid = "ed7458f0-9463-48a5-b5c6-4f785fb34e12", + DisplayText = "ExampleCategory1", + ParentCategoryGuid = "e47c4584-daca-4f9e-9092-194e04692c9a", + RelationGuid = "7bdcef93-a57a-4d1d-95ab-9d3036f394a0", + }, new AtlasRelatedCategoryHeader + { + CategoryGuid = "e47c4584-daca-4f9e-9092-194e04692c9a", + DisplayText = "ExampleCategory2", + RelationGuid = "94071e56-fd3e-4441-93ff-1834f818482d", }}, - Language = "", + Language = "en", Terms = {new AtlasRelatedTermHeader { - Description = "", - DisplayText = "", - Expression = "", - RelationGuid = "", - Status = AtlasTermRelationshipStatus.Draft, - Steward = "", - TermGuid = "", + DisplayText = "ExampleTerm1", + RelationGuid = "7b6a8149-a928-476a-a068-dce58653cfa0", + TermGuid = "54688d39-b298-4104-9e80-f2a16f44aaea", + }, new AtlasRelatedTermHeader + { + DisplayText = "ExampleTerm2", + RelationGuid = "9385640b-e6be-437d-a6b9-62d11c14a189", + TermGuid = "952c7ba4-4c89-42d8-a05a-7d2161be7008", }}, - Usage = "", + Usage = "Example Glossary", }; -Response response = client.Update("", body, ignoreTermsAndCategories: true); +Response response = client.Update("c018ddaf-7c21-4b37-a838-dae5f110c3d8", body); ]]> This sample shows how to call UpdateAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -using RequestContent content = RequestContent.Create(new object()); -Response response = await client.UpdateAsync("", content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.ToString()); -]]> -This sample shows how to call UpdateAsync with all parameters and request content and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); - using RequestContent content = RequestContent.Create(new { - guid = "", - classifications = new object[] + guid = "c018ddaf-7c21-4b37-a838-dae5f110c3d8", + qualifiedName = "Glossary", + name = "Glossary", + shortDescription = "Example Short Description", + longDescription = "Example Long Description", + lastModifiedTS = "1", + language = "en", + usage = "Example Glossary", + terms = new object[] { new { - attributes = new - { - key = new object(), - }, - typeName = "", - lastModifiedTS = "", - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new object[] - { - new - { - endTime = "", - startTime = "", - timeZone = "", - } - }, + termGuid = "54688d39-b298-4104-9e80-f2a16f44aaea", + relationGuid = "7b6a8149-a928-476a-a068-dce58653cfa0", + displayText = "ExampleTerm1", + }, + new + { + termGuid = "952c7ba4-4c89-42d8-a05a-7d2161be7008", + relationGuid = "9385640b-e6be-437d-a6b9-62d11c14a189", + displayText = "ExampleTerm2", } }, - longDescription = "", - name = "", - qualifiedName = "", - shortDescription = "", - lastModifiedTS = "", - createTime = 1234L, - createdBy = "", - updateTime = 1234L, - updatedBy = "", categories = new object[] { new { - categoryGuid = "", - description = "", - displayText = "", - parentCategoryGuid = "", - relationGuid = "", - } - }, - language = "", - terms = new object[] - { + categoryGuid = "0d6766f6-f4b6-435b-bda2-d3edc358998e", + parentCategoryGuid = "ed7458f0-9463-48a5-b5c6-4f785fb34e12", + relationGuid = "26a486a4-a8e2-483c-8a84-3b88e909f8d2", + displayText = "ExampleCategory3", + }, + new + { + categoryGuid = "ed7458f0-9463-48a5-b5c6-4f785fb34e12", + parentCategoryGuid = "e47c4584-daca-4f9e-9092-194e04692c9a", + relationGuid = "7bdcef93-a57a-4d1d-95ab-9d3036f394a0", + displayText = "ExampleCategory1", + }, new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - status = "DRAFT", - steward = "", - termGuid = "", + categoryGuid = "e47c4584-daca-4f9e-9092-194e04692c9a", + relationGuid = "94071e56-fd3e-4441-93ff-1834f818482d", + displayText = "ExampleCategory2", } }, - usage = "", }); -Response response = await client.UpdateAsync("", content, ignoreTermsAndCategories: true); +Response response = await client.UpdateAsync("c018ddaf-7c21-4b37-a838-dae5f110c3d8", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("longDescription").ToString()); -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("qualifiedName").ToString()); -Console.WriteLine(result.GetProperty("shortDescription").ToString()); -Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("parentCategoryGuid").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("language").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("usage").ToString()); +Console.WriteLine(result.ToString()); ]]> This sample shows how to call Update and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -using RequestContent content = RequestContent.Create(new object()); -Response response = client.Update("", content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.ToString()); -]]> -This sample shows how to call Update with all parameters and request content and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); - using RequestContent content = RequestContent.Create(new { - guid = "", - classifications = new object[] + guid = "c018ddaf-7c21-4b37-a838-dae5f110c3d8", + qualifiedName = "Glossary", + name = "Glossary", + shortDescription = "Example Short Description", + longDescription = "Example Long Description", + lastModifiedTS = "1", + language = "en", + usage = "Example Glossary", + terms = new object[] { new { - attributes = new - { - key = new object(), - }, - typeName = "", - lastModifiedTS = "", - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new object[] - { - new - { - endTime = "", - startTime = "", - timeZone = "", - } - }, + termGuid = "54688d39-b298-4104-9e80-f2a16f44aaea", + relationGuid = "7b6a8149-a928-476a-a068-dce58653cfa0", + displayText = "ExampleTerm1", + }, + new + { + termGuid = "952c7ba4-4c89-42d8-a05a-7d2161be7008", + relationGuid = "9385640b-e6be-437d-a6b9-62d11c14a189", + displayText = "ExampleTerm2", } }, - longDescription = "", - name = "", - qualifiedName = "", - shortDescription = "", - lastModifiedTS = "", - createTime = 1234L, - createdBy = "", - updateTime = 1234L, - updatedBy = "", categories = new object[] { new { - categoryGuid = "", - description = "", - displayText = "", - parentCategoryGuid = "", - relationGuid = "", - } - }, - language = "", - terms = new object[] - { + categoryGuid = "0d6766f6-f4b6-435b-bda2-d3edc358998e", + parentCategoryGuid = "ed7458f0-9463-48a5-b5c6-4f785fb34e12", + relationGuid = "26a486a4-a8e2-483c-8a84-3b88e909f8d2", + displayText = "ExampleCategory3", + }, + new + { + categoryGuid = "ed7458f0-9463-48a5-b5c6-4f785fb34e12", + parentCategoryGuid = "e47c4584-daca-4f9e-9092-194e04692c9a", + relationGuid = "7bdcef93-a57a-4d1d-95ab-9d3036f394a0", + displayText = "ExampleCategory1", + }, new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - status = "DRAFT", - steward = "", - termGuid = "", + categoryGuid = "e47c4584-daca-4f9e-9092-194e04692c9a", + relationGuid = "94071e56-fd3e-4441-93ff-1834f818482d", + displayText = "ExampleCategory2", } }, - usage = "", }); -Response response = client.Update("", content, ignoreTermsAndCategories: true); +Response response = client.Update("c018ddaf-7c21-4b37-a838-dae5f110c3d8", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("longDescription").ToString()); -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("qualifiedName").ToString()); -Console.WriteLine(result.GetProperty("shortDescription").ToString()); -Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("parentCategoryGuid").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("language").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("usage").ToString()); +Console.WriteLine(result.ToString()); ]]> This sample shows how to call DeleteAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - -Response response = await client.DeleteAsync(""); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call DeleteAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -Response response = await client.DeleteAsync(""); +Response response = await client.DeleteAsync("c0c54153-13d1-1608-13af-43457cdffe75"); Console.WriteLine(response.Status); ]]> @@ -7576,21 +2258,11 @@ Console.WriteLine(response.Status); This sample shows how to call Delete. "); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - -Response response = client.Delete(""); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call Delete with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -Response response = client.Delete(""); +Response response = client.Delete("c0c54153-13d1-1608-13af-43457cdffe75"); Console.WriteLine(response.Status); ]]> @@ -7599,1448 +2271,314 @@ Console.WriteLine(response.Status); This sample shows how to call GetCategoriesAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - -Response> response = await client.GetCategoriesAsync(""); -]]> -This sample shows how to call GetCategoriesAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -Response> response = await client.GetCategoriesAsync("", limit: 1234, offset: 1234, sort: ""); +Response> response = await client.GetCategoriesAsync("c018ddaf-7c21-4b37-a838-dae5f110c3d8"); ]]> This sample shows how to call GetCategories. "); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - -Response> response = client.GetCategories(""); -]]> -This sample shows how to call GetCategories with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -Response> response = client.GetCategories("", limit: 1234, offset: 1234, sort: ""); +Response> response = client.GetCategories("c018ddaf-7c21-4b37-a838-dae5f110c3d8"); ]]> This sample shows how to call GetCategoriesAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -Response response = await client.GetCategoriesAsync("", null, null, null, null); +Response response = await client.GetCategoriesAsync("c018ddaf-7c21-4b37-a838-dae5f110c3d8", null, null, "ASC", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].ToString()); -]]> -This sample shows how to call GetCategoriesAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - -Response response = await client.GetCategoriesAsync("", 1234, 1234, "", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result[0].GetProperty("guid").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result[0].GetProperty("longDescription").ToString()); -Console.WriteLine(result[0].GetProperty("name").ToString()); -Console.WriteLine(result[0].GetProperty("qualifiedName").ToString()); -Console.WriteLine(result[0].GetProperty("shortDescription").ToString()); -Console.WriteLine(result[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result[0].GetProperty("createTime").ToString()); -Console.WriteLine(result[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result[0].GetProperty("updateTime").ToString()); -Console.WriteLine(result[0].GetProperty("updatedBy").ToString()); -Console.WriteLine(result[0].GetProperty("anchor").GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("anchor").GetProperty("glossaryGuid").ToString()); -Console.WriteLine(result[0].GetProperty("anchor").GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("childrenCategories")[0].GetProperty("categoryGuid").ToString()); -Console.WriteLine(result[0].GetProperty("childrenCategories")[0].GetProperty("description").ToString()); -Console.WriteLine(result[0].GetProperty("childrenCategories")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("childrenCategories")[0].GetProperty("parentCategoryGuid").ToString()); -Console.WriteLine(result[0].GetProperty("childrenCategories")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("parentCategory").GetProperty("categoryGuid").ToString()); -Console.WriteLine(result[0].GetProperty("parentCategory").GetProperty("description").ToString()); -Console.WriteLine(result[0].GetProperty("parentCategory").GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("parentCategory").GetProperty("parentCategoryGuid").ToString()); -Console.WriteLine(result[0].GetProperty("parentCategory").GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("description").ToString()); -Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("status").ToString()); -Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("termGuid").ToString()); ]]> This sample shows how to call GetCategories and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -Response response = client.GetCategories("", null, null, null, null); +Response response = client.GetCategories("c018ddaf-7c21-4b37-a838-dae5f110c3d8", null, null, "ASC", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].ToString()); -]]> -This sample shows how to call GetCategories with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - -Response response = client.GetCategories("", 1234, 1234, "", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result[0].GetProperty("guid").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result[0].GetProperty("longDescription").ToString()); -Console.WriteLine(result[0].GetProperty("name").ToString()); -Console.WriteLine(result[0].GetProperty("qualifiedName").ToString()); -Console.WriteLine(result[0].GetProperty("shortDescription").ToString()); -Console.WriteLine(result[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result[0].GetProperty("createTime").ToString()); -Console.WriteLine(result[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result[0].GetProperty("updateTime").ToString()); -Console.WriteLine(result[0].GetProperty("updatedBy").ToString()); -Console.WriteLine(result[0].GetProperty("anchor").GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("anchor").GetProperty("glossaryGuid").ToString()); -Console.WriteLine(result[0].GetProperty("anchor").GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("childrenCategories")[0].GetProperty("categoryGuid").ToString()); -Console.WriteLine(result[0].GetProperty("childrenCategories")[0].GetProperty("description").ToString()); -Console.WriteLine(result[0].GetProperty("childrenCategories")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("childrenCategories")[0].GetProperty("parentCategoryGuid").ToString()); -Console.WriteLine(result[0].GetProperty("childrenCategories")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("parentCategory").GetProperty("categoryGuid").ToString()); -Console.WriteLine(result[0].GetProperty("parentCategory").GetProperty("description").ToString()); -Console.WriteLine(result[0].GetProperty("parentCategory").GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("parentCategory").GetProperty("parentCategoryGuid").ToString()); -Console.WriteLine(result[0].GetProperty("parentCategory").GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("description").ToString()); -Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("status").ToString()); -Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("termGuid").ToString()); ]]> This sample shows how to call GetCategoriesHeadersAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - -Response> response = await client.GetCategoriesHeadersAsync(""); -]]> -This sample shows how to call GetCategoriesHeadersAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -Response> response = await client.GetCategoriesHeadersAsync("", limit: 1234, offset: 1234, sort: ""); +Response> response = await client.GetCategoriesHeadersAsync("c018ddaf-7c21-4b37-a838-dae5f110c3d8"); ]]> This sample shows how to call GetCategoriesHeaders. "); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - -Response> response = client.GetCategoriesHeaders(""); -]]> -This sample shows how to call GetCategoriesHeaders with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -Response> response = client.GetCategoriesHeaders("", limit: 1234, offset: 1234, sort: ""); +Response> response = client.GetCategoriesHeaders("c018ddaf-7c21-4b37-a838-dae5f110c3d8"); ]]> This sample shows how to call GetCategoriesHeadersAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -Response response = await client.GetCategoriesHeadersAsync("", null, null, null, null); +Response response = await client.GetCategoriesHeadersAsync("c018ddaf-7c21-4b37-a838-dae5f110c3d8", null, null, "ASC", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].ToString()); -]]> -This sample shows how to call GetCategoriesHeadersAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - -Response response = await client.GetCategoriesHeadersAsync("", 1234, 1234, "", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result[0].GetProperty("categoryGuid").ToString()); -Console.WriteLine(result[0].GetProperty("description").ToString()); -Console.WriteLine(result[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("parentCategoryGuid").ToString()); -Console.WriteLine(result[0].GetProperty("relationGuid").ToString()); ]]> This sample shows how to call GetCategoriesHeaders and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -Response response = client.GetCategoriesHeaders("", null, null, null, null); +Response response = client.GetCategoriesHeaders("c018ddaf-7c21-4b37-a838-dae5f110c3d8", null, null, "ASC", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].ToString()); -]]> -This sample shows how to call GetCategoriesHeaders with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - -Response response = client.GetCategoriesHeaders("", 1234, 1234, "", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result[0].GetProperty("categoryGuid").ToString()); -Console.WriteLine(result[0].GetProperty("description").ToString()); -Console.WriteLine(result[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("parentCategoryGuid").ToString()); -Console.WriteLine(result[0].GetProperty("relationGuid").ToString()); ]]> This sample shows how to call GetDetailedAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -Response response = await client.GetDetailedAsync(""); -]]> -This sample shows how to call GetDetailedAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); - -Response response = await client.GetDetailedAsync(""); +Response response = await client.GetDetailedAsync("c018ddaf-7c21-4b37-a838-dae5f110c3d8"); ]]> This sample shows how to call GetDetailed. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -Response response = client.GetDetailed(""); -]]> -This sample shows how to call GetDetailed with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); - -Response response = client.GetDetailed(""); +Response response = client.GetDetailed("c018ddaf-7c21-4b37-a838-dae5f110c3d8"); ]]> This sample shows how to call GetDetailedAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -Response response = await client.GetDetailedAsync("", null); +Response response = await client.GetDetailedAsync("c018ddaf-7c21-4b37-a838-dae5f110c3d8", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetDetailedAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); - -Response response = await client.GetDetailedAsync("", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("longDescription").ToString()); -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("qualifiedName").ToString()); -Console.WriteLine(result.GetProperty("shortDescription").ToString()); -Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("parentCategoryGuid").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("language").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("usage").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("longDescription").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("qualifiedName").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("shortDescription").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("anchor").GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("anchor").GetProperty("glossaryGuid").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("anchor").GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("childrenCategories")[0].GetProperty("categoryGuid").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("childrenCategories")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("childrenCategories")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("childrenCategories")[0].GetProperty("parentCategoryGuid").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("childrenCategories")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("parentCategory").GetProperty("categoryGuid").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("parentCategory").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("parentCategory").GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("parentCategory").GetProperty("parentCategoryGuid").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("parentCategory").GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("longDescription").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("qualifiedName").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("shortDescription").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("abbreviation").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("templateName")[0].ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("anchor").GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("anchor").GetProperty("glossaryGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("anchor").GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("nickName").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("hierarchyInfo")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("hierarchyInfo")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("hierarchyInfo")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("hierarchyInfo")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("hierarchyInfo")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("hierarchyInfo")[0].GetProperty("itemPath").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("hierarchyInfo")[0].GetProperty("resourceId").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("hierarchyInfo")[0].GetProperty("properties").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("resources")[0].GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("resources")[0].GetProperty("url").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("attributes").GetProperty("").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("categories")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("categories")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("categories")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("categories")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("examples")[0].ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("usage").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("termGuid").ToString()); ]]> This sample shows how to call GetDetailed and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -Response response = client.GetDetailed("", null); +Response response = client.GetDetailed("c018ddaf-7c21-4b37-a838-dae5f110c3d8", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetDetailed with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); - -Response response = client.GetDetailed("", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("longDescription").ToString()); -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("qualifiedName").ToString()); -Console.WriteLine(result.GetProperty("shortDescription").ToString()); -Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("parentCategoryGuid").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("language").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("usage").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("longDescription").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("qualifiedName").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("shortDescription").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("anchor").GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("anchor").GetProperty("glossaryGuid").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("anchor").GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("childrenCategories")[0].GetProperty("categoryGuid").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("childrenCategories")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("childrenCategories")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("childrenCategories")[0].GetProperty("parentCategoryGuid").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("childrenCategories")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("parentCategory").GetProperty("categoryGuid").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("parentCategory").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("parentCategory").GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("parentCategory").GetProperty("parentCategoryGuid").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("parentCategory").GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("longDescription").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("qualifiedName").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("shortDescription").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("abbreviation").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("templateName")[0].ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("anchor").GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("anchor").GetProperty("glossaryGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("anchor").GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("nickName").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("hierarchyInfo")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("hierarchyInfo")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("hierarchyInfo")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("hierarchyInfo")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("hierarchyInfo")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("hierarchyInfo")[0].GetProperty("itemPath").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("hierarchyInfo")[0].GetProperty("resourceId").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("hierarchyInfo")[0].GetProperty("properties").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("resources")[0].GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("resources")[0].GetProperty("url").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("attributes").GetProperty("").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("categories")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("categories")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("categories")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("categories")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("examples")[0].ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("usage").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("termGuid").ToString()); ]]> This sample shows how to call PartialUpdateAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -Response response = await client.PartialUpdateAsync("", new Dictionary +Response response = await client.PartialUpdateAsync("c018ddaf-7c21-4b37-a838-dae5f110c3d8", new Dictionary { - ["key"] = "" + ["longDescription"] = "Example Long Description" }); -]]> -This sample shows how to call PartialUpdateAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); - -Response response = await client.PartialUpdateAsync("", new Dictionary -{ - ["key"] = "" -}, ignoreTermsAndCategories: true); ]]> This sample shows how to call PartialUpdate. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -Response response = client.PartialUpdate("", new Dictionary +Response response = client.PartialUpdate("c018ddaf-7c21-4b37-a838-dae5f110c3d8", new Dictionary { - ["key"] = "" + ["longDescription"] = "Example Long Description" }); -]]> -This sample shows how to call PartialUpdate with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); - -Response response = client.PartialUpdate("", new Dictionary -{ - ["key"] = "" -}, ignoreTermsAndCategories: true); ]]> This sample shows how to call PartialUpdateAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); using RequestContent content = RequestContent.Create(new { - key = "", + longDescription = "Example Long Description", }); -Response response = await client.PartialUpdateAsync("", content); +Response response = await client.PartialUpdateAsync("c018ddaf-7c21-4b37-a838-dae5f110c3d8", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call PartialUpdateAsync with all parameters and request content and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); - -using RequestContent content = RequestContent.Create(new -{ - key = "", -}); -Response response = await client.PartialUpdateAsync("", content, ignoreTermsAndCategories: true); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("longDescription").ToString()); -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("qualifiedName").ToString()); -Console.WriteLine(result.GetProperty("shortDescription").ToString()); -Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("parentCategoryGuid").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("language").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("usage").ToString()); ]]> This sample shows how to call PartialUpdate and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); using RequestContent content = RequestContent.Create(new { - key = "", + longDescription = "Example Long Description", }); -Response response = client.PartialUpdate("", content); +Response response = client.PartialUpdate("c018ddaf-7c21-4b37-a838-dae5f110c3d8", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call PartialUpdate with all parameters and request content and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); - -using RequestContent content = RequestContent.Create(new -{ - key = "", -}); -Response response = client.PartialUpdate("", content, ignoreTermsAndCategories: true); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("longDescription").ToString()); -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("qualifiedName").ToString()); -Console.WriteLine(result.GetProperty("shortDescription").ToString()); -Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("parentCategoryGuid").ToString()); -Console.WriteLine(result.GetProperty("categories")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("language").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("terms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("usage").ToString()); ]]> This sample shows how to call GetTermsAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -Response> response = await client.GetTermsAsync(""); -]]> -This sample shows how to call GetTermsAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); - -Response> response = await client.GetTermsAsync("", limit: 1234, offset: 1234, sort: ""); +Response> response = await client.GetTermsAsync("c018ddaf-7c21-4b37-a838-dae5f110c3d8"); ]]> This sample shows how to call GetTerms. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -Response> response = client.GetTerms(""); -]]> -This sample shows how to call GetTerms with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); - -Response> response = client.GetTerms("", limit: 1234, offset: 1234, sort: ""); +Response> response = client.GetTerms("c018ddaf-7c21-4b37-a838-dae5f110c3d8"); ]]> This sample shows how to call GetTermsAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -Response response = await client.GetTermsAsync("", null, null, null, null); +Response response = await client.GetTermsAsync("c018ddaf-7c21-4b37-a838-dae5f110c3d8", null, null, "ASC", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].ToString()); -]]> -This sample shows how to call GetTermsAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); - -Response response = await client.GetTermsAsync("", 1234, 1234, "", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result[0].GetProperty("guid").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result[0].GetProperty("longDescription").ToString()); -Console.WriteLine(result[0].GetProperty("name").ToString()); -Console.WriteLine(result[0].GetProperty("qualifiedName").ToString()); -Console.WriteLine(result[0].GetProperty("shortDescription").ToString()); -Console.WriteLine(result[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result[0].GetProperty("createTime").ToString()); -Console.WriteLine(result[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result[0].GetProperty("updateTime").ToString()); -Console.WriteLine(result[0].GetProperty("updatedBy").ToString()); -Console.WriteLine(result[0].GetProperty("abbreviation").ToString()); -Console.WriteLine(result[0].GetProperty("templateName")[0].ToString()); -Console.WriteLine(result[0].GetProperty("anchor").GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("anchor").GetProperty("glossaryGuid").ToString()); -Console.WriteLine(result[0].GetProperty("anchor").GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("description").ToString()); -Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("status").ToString()); -Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result[0].GetProperty("status").ToString()); -Console.WriteLine(result[0].GetProperty("nickName").ToString()); -Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("guid").ToString()); -Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); -Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("name").ToString()); -Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("itemPath").ToString()); -Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("resourceId").ToString()); -Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("properties").GetProperty("").ToString()); -Console.WriteLine(result[0].GetProperty("resources")[0].GetProperty("displayName").ToString()); -Console.WriteLine(result[0].GetProperty("resources")[0].GetProperty("url").ToString()); -Console.WriteLine(result[0].GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); -Console.WriteLine(result[0].GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); -Console.WriteLine(result[0].GetProperty("attributes").GetProperty("").GetProperty("").ToString()); -Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); -Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); -Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); -Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); -Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); -Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); -Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); -Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("description").ToString()); -Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("status").ToString()); -Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("description").ToString()); -Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("expression").ToString()); -Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("status").ToString()); -Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("steward").ToString()); -Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result[0].GetProperty("examples")[0].ToString()); -Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("description").ToString()); -Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("expression").ToString()); -Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("status").ToString()); -Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("steward").ToString()); -Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("description").ToString()); -Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("status").ToString()); -Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("description").ToString()); -Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("status").ToString()); -Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("description").ToString()); -Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("expression").ToString()); -Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("status").ToString()); -Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("steward").ToString()); -Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("description").ToString()); -Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("status").ToString()); -Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("description").ToString()); -Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("expression").ToString()); -Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("status").ToString()); -Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("steward").ToString()); -Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("description").ToString()); -Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("status").ToString()); -Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("description").ToString()); -Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("status").ToString()); -Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("description").ToString()); -Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("status").ToString()); -Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result[0].GetProperty("usage").ToString()); -Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("description").ToString()); -Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("expression").ToString()); -Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("status").ToString()); -Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("steward").ToString()); -Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("description").ToString()); -Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("expression").ToString()); -Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("status").ToString()); -Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("steward").ToString()); -Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("termGuid").ToString()); ]]> This sample shows how to call GetTerms and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -Response response = client.GetTerms("", null, null, null, null); +Response response = client.GetTerms("c018ddaf-7c21-4b37-a838-dae5f110c3d8", null, null, "ASC", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].ToString()); -]]> -This sample shows how to call GetTerms with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); - -Response response = client.GetTerms("", 1234, 1234, "", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result[0].GetProperty("guid").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result[0].GetProperty("longDescription").ToString()); -Console.WriteLine(result[0].GetProperty("name").ToString()); -Console.WriteLine(result[0].GetProperty("qualifiedName").ToString()); -Console.WriteLine(result[0].GetProperty("shortDescription").ToString()); -Console.WriteLine(result[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result[0].GetProperty("createTime").ToString()); -Console.WriteLine(result[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result[0].GetProperty("updateTime").ToString()); -Console.WriteLine(result[0].GetProperty("updatedBy").ToString()); -Console.WriteLine(result[0].GetProperty("abbreviation").ToString()); -Console.WriteLine(result[0].GetProperty("templateName")[0].ToString()); -Console.WriteLine(result[0].GetProperty("anchor").GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("anchor").GetProperty("glossaryGuid").ToString()); -Console.WriteLine(result[0].GetProperty("anchor").GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("description").ToString()); -Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("status").ToString()); -Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result[0].GetProperty("status").ToString()); -Console.WriteLine(result[0].GetProperty("nickName").ToString()); -Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("guid").ToString()); -Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); -Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("name").ToString()); -Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("itemPath").ToString()); -Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("resourceId").ToString()); -Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("properties").GetProperty("").ToString()); -Console.WriteLine(result[0].GetProperty("resources")[0].GetProperty("displayName").ToString()); -Console.WriteLine(result[0].GetProperty("resources")[0].GetProperty("url").ToString()); -Console.WriteLine(result[0].GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); -Console.WriteLine(result[0].GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); -Console.WriteLine(result[0].GetProperty("attributes").GetProperty("").GetProperty("").ToString()); -Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); -Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); -Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); -Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); -Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); -Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); -Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); -Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("description").ToString()); -Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("status").ToString()); -Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("description").ToString()); -Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("expression").ToString()); -Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("status").ToString()); -Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("steward").ToString()); -Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result[0].GetProperty("examples")[0].ToString()); -Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("description").ToString()); -Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("expression").ToString()); -Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("status").ToString()); -Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("steward").ToString()); -Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("description").ToString()); -Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("status").ToString()); -Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("description").ToString()); -Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("status").ToString()); -Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("description").ToString()); -Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("expression").ToString()); -Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("status").ToString()); -Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("steward").ToString()); -Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("description").ToString()); -Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("status").ToString()); -Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("description").ToString()); -Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("expression").ToString()); -Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("status").ToString()); -Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("steward").ToString()); -Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("description").ToString()); -Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("status").ToString()); -Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("description").ToString()); -Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("status").ToString()); -Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("description").ToString()); -Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("status").ToString()); -Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result[0].GetProperty("usage").ToString()); -Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("description").ToString()); -Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("expression").ToString()); -Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("status").ToString()); -Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("steward").ToString()); -Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("description").ToString()); -Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("expression").ToString()); -Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("status").ToString()); -Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("steward").ToString()); -Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("termGuid").ToString()); ]]> This sample shows how to call GetTermHeadersAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -Response> response = await client.GetTermHeadersAsync(""); -]]> -This sample shows how to call GetTermHeadersAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - -Response> response = await client.GetTermHeadersAsync("", limit: 1234, offset: 1234, sort: ""); +Response> response = await client.GetTermHeadersAsync("c018ddaf-7c21-4b37-a838-dae5f110c3d8"); ]]> This sample shows how to call GetTermHeaders. "); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - -Response> response = client.GetTermHeaders(""); -]]> -This sample shows how to call GetTermHeaders with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -Response> response = client.GetTermHeaders("", limit: 1234, offset: 1234, sort: ""); +Response> response = client.GetTermHeaders("c018ddaf-7c21-4b37-a838-dae5f110c3d8"); ]]> This sample shows how to call GetTermHeadersAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -Response response = await client.GetTermHeadersAsync("", null, null, null, null); +Response response = await client.GetTermHeadersAsync("c018ddaf-7c21-4b37-a838-dae5f110c3d8", null, null, "ASC", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].ToString()); -]]> -This sample shows how to call GetTermHeadersAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - -Response response = await client.GetTermHeadersAsync("", 1234, 1234, "", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result[0].GetProperty("description").ToString()); -Console.WriteLine(result[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("expression").ToString()); -Console.WriteLine(result[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("status").ToString()); -Console.WriteLine(result[0].GetProperty("steward").ToString()); -Console.WriteLine(result[0].GetProperty("termGuid").ToString()); ]]> This sample shows how to call GetTermHeaders and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -Response response = client.GetTermHeaders("", null, null, null, null); +Response response = client.GetTermHeaders("c018ddaf-7c21-4b37-a838-dae5f110c3d8", null, null, "ASC", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].ToString()); -]]> -This sample shows how to call GetTermHeaders with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - -Response response = client.GetTermHeaders("", 1234, 1234, "", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result[0].GetProperty("description").ToString()); -Console.WriteLine(result[0].GetProperty("displayText").ToString()); -Console.WriteLine(result[0].GetProperty("expression").ToString()); -Console.WriteLine(result[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result[0].GetProperty("status").ToString()); -Console.WriteLine(result[0].GetProperty("steward").ToString()); -Console.WriteLine(result[0].GetProperty("termGuid").ToString()); ]]> diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/Lineage.xml b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/Lineage.xml index dbd6dfdf204b..7ba2fc5cf9ef 100644 --- a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/Lineage.xml +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/Lineage.xml @@ -5,498 +5,150 @@ This sample shows how to call GetLineageAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(); -Response response = await client.GetLineageAsync("", LineageDirection.Input); -]]> -This sample shows how to call GetLineageAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(); - -Response response = await client.GetLineageAsync("", LineageDirection.Input, depth: 1234); +Response response = await client.GetLineageAsync("a6894eb3-81f3-829b-2adc-52f3e603411a", LineageDirection.Input); ]]> This sample shows how to call GetLineage. "); -TokenCredential credential = new DefaultAzureCredential(); -Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(); - -Response response = client.GetLineage("", LineageDirection.Input); -]]> -This sample shows how to call GetLineage with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(); -Response response = client.GetLineage("", LineageDirection.Input, depth: 1234); +Response response = client.GetLineage("a6894eb3-81f3-829b-2adc-52f3e603411a", LineageDirection.Input); ]]> This sample shows how to call GetLineageAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(); -Response response = await client.GetLineageAsync("", "INPUT"); +Response response = await client.GetLineageAsync("a6894eb3-81f3-829b-2adc-52f3e603411a", "INPUT"); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetLineageAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(); - -Response response = await client.GetLineageAsync("", "INPUT", depth: 1234); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("baseEntityGuid").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classificationNames")[0].ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meaningNames")[0].ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("widthCounts").GetProperty("").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("lineageDepth").ToString()); -Console.WriteLine(result.GetProperty("lineageWidth").ToString()); -Console.WriteLine(result.GetProperty("childrenCount").ToString()); -Console.WriteLine(result.GetProperty("lineageDirection").ToString()); -Console.WriteLine(result.GetProperty("parentRelations")[0].GetProperty("childEntityId").ToString()); -Console.WriteLine(result.GetProperty("parentRelations")[0].GetProperty("relationshipId").ToString()); -Console.WriteLine(result.GetProperty("parentRelations")[0].GetProperty("parentEntityId").ToString()); -Console.WriteLine(result.GetProperty("relations")[0].GetProperty("fromEntityId").ToString()); -Console.WriteLine(result.GetProperty("relations")[0].GetProperty("relationshipId").ToString()); -Console.WriteLine(result.GetProperty("relations")[0].GetProperty("toEntityId").ToString()); ]]> This sample shows how to call GetLineage and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(); -Response response = client.GetLineage("", "INPUT"); +Response response = client.GetLineage("a6894eb3-81f3-829b-2adc-52f3e603411a", "INPUT"); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetLineage with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(); - -Response response = client.GetLineage("", "INPUT", depth: 1234); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("baseEntityGuid").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classificationNames")[0].ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meaningNames")[0].ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("widthCounts").GetProperty("").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("lineageDepth").ToString()); -Console.WriteLine(result.GetProperty("lineageWidth").ToString()); -Console.WriteLine(result.GetProperty("childrenCount").ToString()); -Console.WriteLine(result.GetProperty("lineageDirection").ToString()); -Console.WriteLine(result.GetProperty("parentRelations")[0].GetProperty("childEntityId").ToString()); -Console.WriteLine(result.GetProperty("parentRelations")[0].GetProperty("relationshipId").ToString()); -Console.WriteLine(result.GetProperty("parentRelations")[0].GetProperty("parentEntityId").ToString()); -Console.WriteLine(result.GetProperty("relations")[0].GetProperty("fromEntityId").ToString()); -Console.WriteLine(result.GetProperty("relations")[0].GetProperty("relationshipId").ToString()); -Console.WriteLine(result.GetProperty("relations")[0].GetProperty("toEntityId").ToString()); ]]> This sample shows how to call GetNextPageAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(apiVersion: "2023-09-01"); -Response response = await client.GetNextPageAsync("", LineageDirection.Input); -]]> -This sample shows how to call GetNextPageAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(apiVersion: "2023-09-01"); - -Response response = await client.GetNextPageAsync("", LineageDirection.Input, offset: 1234, limit: 1234); +Response response = await client.GetNextPageAsync("a6894eb3-81f3-829b-2adc-52f3e603411a", LineageDirection.Input); ]]> This sample shows how to call GetNextPage. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(apiVersion: "2023-09-01"); -Response response = client.GetNextPage("", LineageDirection.Input); -]]> -This sample shows how to call GetNextPage with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(apiVersion: "2023-09-01"); - -Response response = client.GetNextPage("", LineageDirection.Input, offset: 1234, limit: 1234); +Response response = client.GetNextPage("a6894eb3-81f3-829b-2adc-52f3e603411a", LineageDirection.Input); ]]> This sample shows how to call GetNextPageAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(apiVersion: "2023-09-01"); -Response response = await client.GetNextPageAsync("", "INPUT"); +Response response = await client.GetNextPageAsync("a6894eb3-81f3-829b-2adc-52f3e603411a", "INPUT"); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetNextPageAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(apiVersion: "2023-09-01"); - -Response response = await client.GetNextPageAsync("", "INPUT", offset: 1234, limit: 1234); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("baseEntityGuid").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classificationNames")[0].ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meaningNames")[0].ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("widthCounts").GetProperty("").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("lineageDepth").ToString()); -Console.WriteLine(result.GetProperty("lineageWidth").ToString()); -Console.WriteLine(result.GetProperty("childrenCount").ToString()); -Console.WriteLine(result.GetProperty("lineageDirection").ToString()); -Console.WriteLine(result.GetProperty("parentRelations")[0].GetProperty("childEntityId").ToString()); -Console.WriteLine(result.GetProperty("parentRelations")[0].GetProperty("relationshipId").ToString()); -Console.WriteLine(result.GetProperty("parentRelations")[0].GetProperty("parentEntityId").ToString()); -Console.WriteLine(result.GetProperty("relations")[0].GetProperty("fromEntityId").ToString()); -Console.WriteLine(result.GetProperty("relations")[0].GetProperty("relationshipId").ToString()); -Console.WriteLine(result.GetProperty("relations")[0].GetProperty("toEntityId").ToString()); ]]> This sample shows how to call GetNextPage and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(apiVersion: "2023-09-01"); -Response response = client.GetNextPage("", "INPUT"); +Response response = client.GetNextPage("a6894eb3-81f3-829b-2adc-52f3e603411a", "INPUT"); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetNextPage with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(apiVersion: "2023-09-01"); - -Response response = client.GetNextPage("", "INPUT", offset: 1234, limit: 1234); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("baseEntityGuid").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classificationNames")[0].ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meaningNames")[0].ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("widthCounts").GetProperty("").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("lineageDepth").ToString()); -Console.WriteLine(result.GetProperty("lineageWidth").ToString()); -Console.WriteLine(result.GetProperty("childrenCount").ToString()); -Console.WriteLine(result.GetProperty("lineageDirection").ToString()); -Console.WriteLine(result.GetProperty("parentRelations")[0].GetProperty("childEntityId").ToString()); -Console.WriteLine(result.GetProperty("parentRelations")[0].GetProperty("relationshipId").ToString()); -Console.WriteLine(result.GetProperty("parentRelations")[0].GetProperty("parentEntityId").ToString()); -Console.WriteLine(result.GetProperty("relations")[0].GetProperty("fromEntityId").ToString()); -Console.WriteLine(result.GetProperty("relations")[0].GetProperty("relationshipId").ToString()); -Console.WriteLine(result.GetProperty("relations")[0].GetProperty("toEntityId").ToString()); ]]> This sample shows how to call GetByUniqueAttributeAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(); -Response response = await client.GetByUniqueAttributeAsync("", LineageDirection.Input); -]]> -This sample shows how to call GetByUniqueAttributeAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(); - -Response response = await client.GetByUniqueAttributeAsync("", LineageDirection.Input, depth: 1234, attribute: ""); +Response response = await client.GetByUniqueAttributeAsync("azure_blob_path", LineageDirection.Both); ]]> This sample shows how to call GetByUniqueAttribute. "); -TokenCredential credential = new DefaultAzureCredential(); -Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(); - -Response response = client.GetByUniqueAttribute("", LineageDirection.Input); -]]> -This sample shows how to call GetByUniqueAttribute with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(); -Response response = client.GetByUniqueAttribute("", LineageDirection.Input, depth: 1234, attribute: ""); +Response response = client.GetByUniqueAttribute("azure_blob_path", LineageDirection.Both); ]]> This sample shows how to call GetByUniqueAttributeAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(); -Response response = await client.GetByUniqueAttributeAsync("", "INPUT"); +Response response = await client.GetByUniqueAttributeAsync("azure_blob_path", "BOTH"); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetByUniqueAttributeAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(); - -Response response = await client.GetByUniqueAttributeAsync("", "INPUT", depth: 1234, attribute: ""); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("baseEntityGuid").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classificationNames")[0].ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meaningNames")[0].ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("widthCounts").GetProperty("").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("lineageDepth").ToString()); -Console.WriteLine(result.GetProperty("lineageWidth").ToString()); -Console.WriteLine(result.GetProperty("childrenCount").ToString()); -Console.WriteLine(result.GetProperty("lineageDirection").ToString()); -Console.WriteLine(result.GetProperty("parentRelations")[0].GetProperty("childEntityId").ToString()); -Console.WriteLine(result.GetProperty("parentRelations")[0].GetProperty("relationshipId").ToString()); -Console.WriteLine(result.GetProperty("parentRelations")[0].GetProperty("parentEntityId").ToString()); -Console.WriteLine(result.GetProperty("relations")[0].GetProperty("fromEntityId").ToString()); -Console.WriteLine(result.GetProperty("relations")[0].GetProperty("relationshipId").ToString()); -Console.WriteLine(result.GetProperty("relations")[0].GetProperty("toEntityId").ToString()); ]]> This sample shows how to call GetByUniqueAttribute and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(); -Response response = client.GetByUniqueAttribute("", "INPUT"); +Response response = client.GetByUniqueAttribute("azure_blob_path", "BOTH"); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetByUniqueAttribute with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(); - -Response response = client.GetByUniqueAttribute("", "INPUT", depth: 1234, attribute: ""); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("baseEntityGuid").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classificationNames")[0].ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meaningNames")[0].ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("widthCounts").GetProperty("").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("lineageDepth").ToString()); -Console.WriteLine(result.GetProperty("lineageWidth").ToString()); -Console.WriteLine(result.GetProperty("childrenCount").ToString()); -Console.WriteLine(result.GetProperty("lineageDirection").ToString()); -Console.WriteLine(result.GetProperty("parentRelations")[0].GetProperty("childEntityId").ToString()); -Console.WriteLine(result.GetProperty("parentRelations")[0].GetProperty("relationshipId").ToString()); -Console.WriteLine(result.GetProperty("parentRelations")[0].GetProperty("parentEntityId").ToString()); -Console.WriteLine(result.GetProperty("relations")[0].GetProperty("fromEntityId").ToString()); -Console.WriteLine(result.GetProperty("relations")[0].GetProperty("relationshipId").ToString()); -Console.WriteLine(result.GetProperty("relations")[0].GetProperty("toEntityId").ToString()); ]]> diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/Relationship.xml b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/Relationship.xml index a6424570245b..00e562cc62ee 100644 --- a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/Relationship.xml +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/Relationship.xml @@ -5,16 +5,7 @@ This sample shows how to call CreateAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); - -AtlasRelationship body = new AtlasRelationship(); -Response response = await client.CreateAsync(body); -]]> -This sample shows how to call CreateAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); @@ -22,30 +13,28 @@ AtlasRelationship body = new AtlasRelationship { Attributes = { - ["key"] = BinaryData.FromObjectAsJson(new object()) + ["expression"] = BinaryData.FromObjectAsJson("Example Expression"), + ["steward"] = BinaryData.FromObjectAsJson("Example Steward"), + ["description"] = BinaryData.FromObjectAsJson("Example Description"), + ["source"] = null, + ["status"] = null }, - TypeName = "", - LastModifiedTS = "", - CreateTime = 1234L, - CreatedBy = "", + TypeName = "AtlasGlossarySynonym", + CreatedBy = "ExampleCreator", End1 = new AtlasObjectId { - Guid = "", - TypeName = "", - UniqueAttributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, + Guid = "856d31e6-e342-a1ce-6273-22ddb77029c6", + TypeName = "AtlasGlossaryTerm", + }, + End2 = new AtlasObjectId + { + Guid = "77481037-2874-9bdc-9b9e-76bb94ee71aa", + TypeName = "AtlasGlossaryTerm", }, - End2 = default, - Guid = "", - HomeId = "", - Label = " @@ -54,16 +43,7 @@ Response response = await client.CreateAsync(body); This sample shows how to call Create. "); -TokenCredential credential = new DefaultAzureCredential(); -Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); - -AtlasRelationship body = new AtlasRelationship(); -Response response = client.Create(body); -]]> -This sample shows how to call Create with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); @@ -71,30 +51,28 @@ AtlasRelationship body = new AtlasRelationship { Attributes = { - ["key"] = BinaryData.FromObjectAsJson(new object()) + ["expression"] = BinaryData.FromObjectAsJson("Example Expression"), + ["steward"] = BinaryData.FromObjectAsJson("Example Steward"), + ["description"] = BinaryData.FromObjectAsJson("Example Description"), + ["source"] = null, + ["status"] = null }, - TypeName = "", - LastModifiedTS = "", - CreateTime = 1234L, - CreatedBy = "", + TypeName = "AtlasGlossarySynonym", + CreatedBy = "ExampleCreator", End1 = new AtlasObjectId { - Guid = "", - TypeName = "", - UniqueAttributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, + Guid = "856d31e6-e342-a1ce-6273-22ddb77029c6", + TypeName = "AtlasGlossaryTerm", + }, + End2 = new AtlasObjectId + { + Guid = "77481037-2874-9bdc-9b9e-76bb94ee71aa", + TypeName = "AtlasGlossaryTerm", }, - End2 = default, - Guid = "", - HomeId = "", - Label = " @@ -103,160 +81,85 @@ Response response = client.Create(body); This sample shows how to call CreateAsync and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); - -using RequestContent content = RequestContent.Create(new object()); -Response response = await client.CreateAsync(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.ToString()); -]]> -This sample shows how to call CreateAsync with all request content and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); using RequestContent content = RequestContent.Create(new { + typeName = "AtlasGlossarySynonym", attributes = new { - key = new object(), + expression = "Example Expression", + steward = "Example Steward", + description = "Example Description", }, - typeName = "", - lastModifiedTS = "", - createTime = 1234L, - createdBy = "", end1 = new { - guid = "", - typeName = "", - uniqueAttributes = new - { - key = new object(), - }, + guid = "856d31e6-e342-a1ce-6273-22ddb77029c6", + typeName = "AtlasGlossaryTerm", + }, + end2 = new + { + guid = "77481037-2874-9bdc-9b9e-76bb94ee71aa", + typeName = "AtlasGlossaryTerm", }, - guid = "", - homeId = "", - label = " This sample shows how to call Create and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); - -using RequestContent content = RequestContent.Create(new object()); -Response response = client.Create(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.ToString()); -]]> -This sample shows how to call Create with all request content and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); using RequestContent content = RequestContent.Create(new { + typeName = "AtlasGlossarySynonym", attributes = new { - key = new object(), + expression = "Example Expression", + steward = "Example Steward", + description = "Example Description", }, - typeName = "", - lastModifiedTS = "", - createTime = 1234L, - createdBy = "", end1 = new { - guid = "", - typeName = "", - uniqueAttributes = new - { - key = new object(), - }, + guid = "856d31e6-e342-a1ce-6273-22ddb77029c6", + typeName = "AtlasGlossaryTerm", }, - guid = "", - homeId = "", - label = " This sample shows how to call UpdateAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); - -AtlasRelationship body = new AtlasRelationship(); -Response response = await client.UpdateAsync(body); -]]> -This sample shows how to call UpdateAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); @@ -264,30 +167,29 @@ AtlasRelationship body = new AtlasRelationship { Attributes = { - ["key"] = BinaryData.FromObjectAsJson(new object()) + ["expression"] = BinaryData.FromObjectAsJson("Example Expression"), + ["steward"] = BinaryData.FromObjectAsJson("Example Steward"), + ["description"] = BinaryData.FromObjectAsJson("Example Description"), + ["source"] = null, + ["status"] = null }, - TypeName = "", - LastModifiedTS = "", - CreateTime = 1234L, - CreatedBy = "", + TypeName = "AtlasGlossarySynonym", + CreatedBy = "ExampleCreator", End1 = new AtlasObjectId { - Guid = "", - TypeName = "", - UniqueAttributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, + Guid = "77481037-2874-9bdc-9b9e-76bb94ee71aa", + TypeName = "AtlasGlossaryTerm", + }, + End2 = new AtlasObjectId + { + Guid = "b0942506-2d7d-1f45-d286-c29ca9e7f2ef", + TypeName = "AtlasGlossaryTerm", }, - End2 = default, - Guid = "", - HomeId = "", - Label = " @@ -296,16 +198,7 @@ Response response = await client.UpdateAsync(body); This sample shows how to call Update. "); -TokenCredential credential = new DefaultAzureCredential(); -Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); - -AtlasRelationship body = new AtlasRelationship(); -Response response = client.Update(body); -]]> -This sample shows how to call Update with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); @@ -313,30 +206,29 @@ AtlasRelationship body = new AtlasRelationship { Attributes = { - ["key"] = BinaryData.FromObjectAsJson(new object()) + ["expression"] = BinaryData.FromObjectAsJson("Example Expression"), + ["steward"] = BinaryData.FromObjectAsJson("Example Steward"), + ["description"] = BinaryData.FromObjectAsJson("Example Description"), + ["source"] = null, + ["status"] = null }, - TypeName = "", - LastModifiedTS = "", - CreateTime = 1234L, - CreatedBy = "", + TypeName = "AtlasGlossarySynonym", + CreatedBy = "ExampleCreator", End1 = new AtlasObjectId { - Guid = "", - TypeName = "", - UniqueAttributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, + Guid = "77481037-2874-9bdc-9b9e-76bb94ee71aa", + TypeName = "AtlasGlossaryTerm", + }, + End2 = new AtlasObjectId + { + Guid = "b0942506-2d7d-1f45-d286-c29ca9e7f2ef", + TypeName = "AtlasGlossaryTerm", }, - End2 = default, - Guid = "", - HomeId = "", - Label = " @@ -345,345 +237,141 @@ Response response = client.Update(body); This sample shows how to call UpdateAsync and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); - -using RequestContent content = RequestContent.Create(new object()); -Response response = await client.UpdateAsync(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.ToString()); -]]> -This sample shows how to call UpdateAsync with all request content and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); using RequestContent content = RequestContent.Create(new { + typeName = "AtlasGlossarySynonym", attributes = new { - key = new object(), + expression = "Example Expression", + steward = "Example Steward", + description = "Example Description", }, - typeName = "", - lastModifiedTS = "", - createTime = 1234L, - createdBy = "", + guid = "b2810301-293f-493f-88f1-7ac8784fb1fd", end1 = new { - guid = "", - typeName = "", - uniqueAttributes = new - { - key = new object(), - }, + guid = "77481037-2874-9bdc-9b9e-76bb94ee71aa", + typeName = "AtlasGlossaryTerm", }, - guid = "", - homeId = "", - label = " This sample shows how to call Update and parse the result. "); -TokenCredential credential = new DefaultAzureCredential(); -Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); - -using RequestContent content = RequestContent.Create(new object()); -Response response = client.Update(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.ToString()); -]]> -This sample shows how to call Update with all request content and parse the result. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); using RequestContent content = RequestContent.Create(new { + typeName = "AtlasGlossarySynonym", attributes = new { - key = new object(), + expression = "Example Expression", + steward = "Example Steward", + description = "Example Description", }, - typeName = "", - lastModifiedTS = "", - createTime = 1234L, - createdBy = "", + guid = "b2810301-293f-493f-88f1-7ac8784fb1fd", end1 = new { - guid = "", - typeName = "", - uniqueAttributes = new - { - key = new object(), - }, + guid = "77481037-2874-9bdc-9b9e-76bb94ee71aa", + typeName = "AtlasGlossaryTerm", }, - guid = "", - homeId = "", - label = " This sample shows how to call GetRelationshipAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); -Response response = await client.GetRelationshipAsync(""); -]]> -This sample shows how to call GetRelationshipAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); - -Response response = await client.GetRelationshipAsync("", extendedInfo: true); +Response response = await client.GetRelationshipAsync("5cf8a9e5-c9fd-abe0-2e8c-d40024263dcb"); ]]> This sample shows how to call GetRelationship. "); -TokenCredential credential = new DefaultAzureCredential(); -Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); - -Response response = client.GetRelationship(""); -]]> -This sample shows how to call GetRelationship with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); -Response response = client.GetRelationship("", extendedInfo: true); +Response response = client.GetRelationship("5cf8a9e5-c9fd-abe0-2e8c-d40024263dcb"); ]]> This sample shows how to call GetRelationshipAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); -Response response = await client.GetRelationshipAsync("", null, null); +Response response = await client.GetRelationshipAsync("5cf8a9e5-c9fd-abe0-2e8c-d40024263dcb", null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetRelationshipAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); - -Response response = await client.GetRelationshipAsync("", true, null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classificationNames")[0].ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meaningNames")[0].ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("relationship").GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("relationship").GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("relationship").GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("relationship").GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("relationship").GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("relationship").GetProperty("end1").GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("relationship").GetProperty("end1").GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("relationship").GetProperty("end1").GetProperty("uniqueAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("relationship").GetProperty("end2").GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("relationship").GetProperty("end2").GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("relationship").GetProperty("end2").GetProperty("uniqueAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("relationship").GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("relationship").GetProperty("homeId").ToString()); -Console.WriteLine(result.GetProperty("relationship").GetProperty("label").ToString()); -Console.WriteLine(result.GetProperty("relationship").GetProperty("provenanceType").ToString()); -Console.WriteLine(result.GetProperty("relationship").GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("relationship").GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("relationship").GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("relationship").GetProperty("version").ToString()); ]]> This sample shows how to call GetRelationship and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); -Response response = client.GetRelationship("", null, null); +Response response = client.GetRelationship("5cf8a9e5-c9fd-abe0-2e8c-d40024263dcb", null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetRelationship with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); - -Response response = client.GetRelationship("", true, null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classificationNames")[0].ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meaningNames")[0].ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("relationship").GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("relationship").GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("relationship").GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("relationship").GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("relationship").GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("relationship").GetProperty("end1").GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("relationship").GetProperty("end1").GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("relationship").GetProperty("end1").GetProperty("uniqueAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("relationship").GetProperty("end2").GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("relationship").GetProperty("end2").GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("relationship").GetProperty("end2").GetProperty("uniqueAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("relationship").GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("relationship").GetProperty("homeId").ToString()); -Console.WriteLine(result.GetProperty("relationship").GetProperty("label").ToString()); -Console.WriteLine(result.GetProperty("relationship").GetProperty("provenanceType").ToString()); -Console.WriteLine(result.GetProperty("relationship").GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("relationship").GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("relationship").GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("relationship").GetProperty("version").ToString()); ]]> This sample shows how to call DeleteAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); - -Response response = await client.DeleteAsync(""); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call DeleteAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); -Response response = await client.DeleteAsync(""); +Response response = await client.DeleteAsync("5cf8a9e5-c9fd-abe0-2e8c-d40024263dcb"); Console.WriteLine(response.Status); ]]> @@ -692,21 +380,11 @@ Console.WriteLine(response.Status); This sample shows how to call Delete. "); -TokenCredential credential = new DefaultAzureCredential(); -Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); - -Response response = client.Delete(""); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call Delete with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); -Response response = client.Delete(""); +Response response = client.Delete("5cf8a9e5-c9fd-abe0-2e8c-d40024263dcb"); Console.WriteLine(response.Status); ]]> diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/TypeDefinition.xml b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/TypeDefinition.xml index 895c72f05032..54b50edc4383 100644 --- a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/TypeDefinition.xml +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/TypeDefinition.xml @@ -5,2705 +5,711 @@ This sample shows how to call GetBusinessMetadataByIdAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); -Response response = await client.GetBusinessMetadataByIdAsync(""); -]]> -This sample shows how to call GetBusinessMetadataByIdAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - -Response response = await client.GetBusinessMetadataByIdAsync(""); +Response response = await client.GetBusinessMetadataByIdAsync("d8757510-c866-61ba-486f-1afca09f43b8"); ]]> This sample shows how to call GetBusinessMetadataById. "); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - -Response response = client.GetBusinessMetadataById(""); -]]> -This sample shows how to call GetBusinessMetadataById with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); -Response response = client.GetBusinessMetadataById(""); +Response response = client.GetBusinessMetadataById("d8757510-c866-61ba-486f-1afca09f43b8"); ]]> This sample shows how to call GetBusinessMetadataByIdAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); -Response response = await client.GetBusinessMetadataByIdAsync("", null); +Response response = await client.GetBusinessMetadataByIdAsync("d8757510-c866-61ba-486f-1afca09f43b8", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetBusinessMetadataByIdAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - -Response response = await client.GetBusinessMetadataByIdAsync("", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("calendar").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("lenient").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); -Console.WriteLine(result.GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("serviceType").ToString()); -Console.WriteLine(result.GetProperty("typeVersion").ToString()); -Console.WriteLine(result.GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); ]]> This sample shows how to call GetBusinessMetadataById and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); -Response response = client.GetBusinessMetadataById("", null); +Response response = client.GetBusinessMetadataById("d8757510-c866-61ba-486f-1afca09f43b8", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetBusinessMetadataById with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - -Response response = client.GetBusinessMetadataById("", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("calendar").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("lenient").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); -Console.WriteLine(result.GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("serviceType").ToString()); -Console.WriteLine(result.GetProperty("typeVersion").ToString()); -Console.WriteLine(result.GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); ]]> This sample shows how to call GetBusinessMetadataByNameAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); -Response response = await client.GetBusinessMetadataByNameAsync(""); -]]> -This sample shows how to call GetBusinessMetadataByNameAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - -Response response = await client.GetBusinessMetadataByNameAsync(""); +Response response = await client.GetBusinessMetadataByNameAsync("Business_Metadata_Type_Name"); ]]> This sample shows how to call GetBusinessMetadataByName. "); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - -Response response = client.GetBusinessMetadataByName(""); -]]> -This sample shows how to call GetBusinessMetadataByName with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); -Response response = client.GetBusinessMetadataByName(""); +Response response = client.GetBusinessMetadataByName("Business_Metadata_Type_Name"); ]]> This sample shows how to call GetBusinessMetadataByNameAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); -Response response = await client.GetBusinessMetadataByNameAsync("", null); +Response response = await client.GetBusinessMetadataByNameAsync("Business_Metadata_Type_Name", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetBusinessMetadataByNameAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - -Response response = await client.GetBusinessMetadataByNameAsync("", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("calendar").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("lenient").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); -Console.WriteLine(result.GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("serviceType").ToString()); -Console.WriteLine(result.GetProperty("typeVersion").ToString()); -Console.WriteLine(result.GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); ]]> This sample shows how to call GetBusinessMetadataByName and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); -Response response = client.GetBusinessMetadataByName("", null); +Response response = client.GetBusinessMetadataByName("Business_Metadata_Type_Name", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetBusinessMetadataByName with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - -Response response = client.GetBusinessMetadataByName("", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("calendar").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("lenient").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); -Console.WriteLine(result.GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("serviceType").ToString()); -Console.WriteLine(result.GetProperty("typeVersion").ToString()); -Console.WriteLine(result.GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); ]]> This sample shows how to call GetClassificationByIdAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); -Response response = await client.GetClassificationByIdAsync(""); -]]> -This sample shows how to call GetClassificationByIdAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - -Response response = await client.GetClassificationByIdAsync(""); +Response response = await client.GetClassificationByIdAsync("e79878fa-adba-4ee5-adc5-328d8841cd49"); ]]> This sample shows how to call GetClassificationById. "); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - -Response response = client.GetClassificationById(""); -]]> -This sample shows how to call GetClassificationById with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); -Response response = client.GetClassificationById(""); +Response response = client.GetClassificationById("e79878fa-adba-4ee5-adc5-328d8841cd49"); ]]> This sample shows how to call GetClassificationByIdAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); -Response response = await client.GetClassificationByIdAsync("", null); +Response response = await client.GetClassificationByIdAsync("e79878fa-adba-4ee5-adc5-328d8841cd49", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetClassificationByIdAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - -Response response = await client.GetClassificationByIdAsync("", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("calendar").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("lenient").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); -Console.WriteLine(result.GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("serviceType").ToString()); -Console.WriteLine(result.GetProperty("typeVersion").ToString()); -Console.WriteLine(result.GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); -Console.WriteLine(result.GetProperty("entityTypes")[0].ToString()); -Console.WriteLine(result.GetProperty("subTypes")[0].ToString()); -Console.WriteLine(result.GetProperty("superTypes")[0].ToString()); ]]> This sample shows how to call GetClassificationById and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); -Response response = client.GetClassificationById("", null); +Response response = client.GetClassificationById("e79878fa-adba-4ee5-adc5-328d8841cd49", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetClassificationById with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - -Response response = client.GetClassificationById("", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("calendar").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("lenient").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); -Console.WriteLine(result.GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("serviceType").ToString()); -Console.WriteLine(result.GetProperty("typeVersion").ToString()); -Console.WriteLine(result.GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); -Console.WriteLine(result.GetProperty("entityTypes")[0].ToString()); -Console.WriteLine(result.GetProperty("subTypes")[0].ToString()); -Console.WriteLine(result.GetProperty("superTypes")[0].ToString()); ]]> This sample shows how to call GetClassificationByNameAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); -Response response = await client.GetClassificationByNameAsync(""); -]]> -This sample shows how to call GetClassificationByNameAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - -Response response = await client.GetClassificationByNameAsync(""); +Response response = await client.GetClassificationByNameAsync("MICROSOFT.GOVERNMENT.CANADA.SOCIAL_INSURANCE_NUMBER"); ]]> This sample shows how to call GetClassificationByName. "); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - -Response response = client.GetClassificationByName(""); -]]> -This sample shows how to call GetClassificationByName with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); -Response response = client.GetClassificationByName(""); +Response response = client.GetClassificationByName("MICROSOFT.GOVERNMENT.CANADA.SOCIAL_INSURANCE_NUMBER"); ]]> This sample shows how to call GetClassificationByNameAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); -Response response = await client.GetClassificationByNameAsync("", null); +Response response = await client.GetClassificationByNameAsync("MICROSOFT.GOVERNMENT.CANADA.SOCIAL_INSURANCE_NUMBER", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetClassificationByNameAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - -Response response = await client.GetClassificationByNameAsync("", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("calendar").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("lenient").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); -Console.WriteLine(result.GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("serviceType").ToString()); -Console.WriteLine(result.GetProperty("typeVersion").ToString()); -Console.WriteLine(result.GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); -Console.WriteLine(result.GetProperty("entityTypes")[0].ToString()); -Console.WriteLine(result.GetProperty("subTypes")[0].ToString()); -Console.WriteLine(result.GetProperty("superTypes")[0].ToString()); ]]> This sample shows how to call GetClassificationByName and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); -Response response = client.GetClassificationByName("", null); +Response response = client.GetClassificationByName("MICROSOFT.GOVERNMENT.CANADA.SOCIAL_INSURANCE_NUMBER", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetClassificationByName with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - -Response response = client.GetClassificationByName("", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("calendar").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("lenient").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); -Console.WriteLine(result.GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("serviceType").ToString()); -Console.WriteLine(result.GetProperty("typeVersion").ToString()); -Console.WriteLine(result.GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); -Console.WriteLine(result.GetProperty("entityTypes")[0].ToString()); -Console.WriteLine(result.GetProperty("subTypes")[0].ToString()); -Console.WriteLine(result.GetProperty("superTypes")[0].ToString()); ]]> This sample shows how to call GetEntityByIdAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); -Response response = await client.GetEntityByIdAsync(""); -]]> -This sample shows how to call GetEntityByIdAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - -Response response = await client.GetEntityByIdAsync(""); +Response response = await client.GetEntityByIdAsync("4bc54c37-98a8-4de8-9ee8-182610859d43"); ]]> This sample shows how to call GetEntityById. "); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - -Response response = client.GetEntityById(""); -]]> -This sample shows how to call GetEntityById with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); -Response response = client.GetEntityById(""); +Response response = client.GetEntityById("4bc54c37-98a8-4de8-9ee8-182610859d43"); ]]> This sample shows how to call GetEntityByIdAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); -Response response = await client.GetEntityByIdAsync("", null); +Response response = await client.GetEntityByIdAsync("4bc54c37-98a8-4de8-9ee8-182610859d43", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetEntityByIdAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - -Response response = await client.GetEntityByIdAsync("", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("calendar").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("lenient").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); -Console.WriteLine(result.GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("serviceType").ToString()); -Console.WriteLine(result.GetProperty("typeVersion").ToString()); -Console.WriteLine(result.GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); -Console.WriteLine(result.GetProperty("subTypes")[0].ToString()); -Console.WriteLine(result.GetProperty("superTypes")[0].ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("includeInNotification").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("isIndexable").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("isOptional").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("isUnique").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("valuesMaxCount").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("valuesMinCount").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("isLegacyAttribute").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("relationshipTypeName").ToString()); ]]> This sample shows how to call GetEntityById and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); -Response response = client.GetEntityById("", null); +Response response = client.GetEntityById("4bc54c37-98a8-4de8-9ee8-182610859d43", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetEntityById with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - -Response response = client.GetEntityById("", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("calendar").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("lenient").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); -Console.WriteLine(result.GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("serviceType").ToString()); -Console.WriteLine(result.GetProperty("typeVersion").ToString()); -Console.WriteLine(result.GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); -Console.WriteLine(result.GetProperty("subTypes")[0].ToString()); -Console.WriteLine(result.GetProperty("superTypes")[0].ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("includeInNotification").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("isIndexable").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("isOptional").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("isUnique").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("valuesMaxCount").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("valuesMinCount").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("isLegacyAttribute").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("relationshipTypeName").ToString()); ]]> This sample shows how to call GetEntityByNameAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); -Response response = await client.GetEntityByNameAsync(""); -]]> -This sample shows how to call GetEntityByNameAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - -Response response = await client.GetEntityByNameAsync(""); +Response response = await client.GetEntityByNameAsync("DataSet"); ]]> This sample shows how to call GetEntityByName. "); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - -Response response = client.GetEntityByName(""); -]]> -This sample shows how to call GetEntityByName with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); -Response response = client.GetEntityByName(""); +Response response = client.GetEntityByName("DataSet"); ]]> This sample shows how to call GetEntityByNameAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); -Response response = await client.GetEntityByNameAsync("", null); +Response response = await client.GetEntityByNameAsync("DataSet", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetEntityByNameAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - -Response response = await client.GetEntityByNameAsync("", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("calendar").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("lenient").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); -Console.WriteLine(result.GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("serviceType").ToString()); -Console.WriteLine(result.GetProperty("typeVersion").ToString()); -Console.WriteLine(result.GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); -Console.WriteLine(result.GetProperty("subTypes")[0].ToString()); -Console.WriteLine(result.GetProperty("superTypes")[0].ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("includeInNotification").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("isIndexable").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("isOptional").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("isUnique").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("valuesMaxCount").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("valuesMinCount").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("isLegacyAttribute").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("relationshipTypeName").ToString()); ]]> This sample shows how to call GetEntityByName and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); -Response response = client.GetEntityByName("", null); +Response response = client.GetEntityByName("DataSet", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetEntityByName with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - -Response response = client.GetEntityByName("", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("calendar").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("lenient").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); -Console.WriteLine(result.GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("serviceType").ToString()); -Console.WriteLine(result.GetProperty("typeVersion").ToString()); -Console.WriteLine(result.GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); -Console.WriteLine(result.GetProperty("subTypes")[0].ToString()); -Console.WriteLine(result.GetProperty("superTypes")[0].ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("includeInNotification").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("isIndexable").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("isOptional").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("isUnique").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("valuesMaxCount").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("valuesMinCount").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("isLegacyAttribute").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("relationshipTypeName").ToString()); ]]> This sample shows how to call GetEnumByIdAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); -Response response = await client.GetEnumByIdAsync(""); -]]> -This sample shows how to call GetEnumByIdAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - -Response response = await client.GetEnumByIdAsync(""); +Response response = await client.GetEnumByIdAsync("644ab9c7-893a-4a4d-8e0a-591a6556d1a0"); ]]> This sample shows how to call GetEnumById. "); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - -Response response = client.GetEnumById(""); -]]> -This sample shows how to call GetEnumById with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); -Response response = client.GetEnumById(""); +Response response = client.GetEnumById("644ab9c7-893a-4a4d-8e0a-591a6556d1a0"); ]]> This sample shows how to call GetEnumByIdAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); -Response response = await client.GetEnumByIdAsync("", null); +Response response = await client.GetEnumByIdAsync("644ab9c7-893a-4a4d-8e0a-591a6556d1a0", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetEnumByIdAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - -Response response = await client.GetEnumByIdAsync("", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("calendar").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("lenient").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); -Console.WriteLine(result.GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("serviceType").ToString()); -Console.WriteLine(result.GetProperty("typeVersion").ToString()); -Console.WriteLine(result.GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("elementDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("elementDefs")[0].GetProperty("ordinal").ToString()); -Console.WriteLine(result.GetProperty("elementDefs")[0].GetProperty("value").ToString()); ]]> This sample shows how to call GetEnumById and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); -Response response = client.GetEnumById("", null); +Response response = client.GetEnumById("644ab9c7-893a-4a4d-8e0a-591a6556d1a0", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetEnumById with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - -Response response = client.GetEnumById("", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("calendar").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("lenient").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); -Console.WriteLine(result.GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("serviceType").ToString()); -Console.WriteLine(result.GetProperty("typeVersion").ToString()); -Console.WriteLine(result.GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("elementDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("elementDefs")[0].GetProperty("ordinal").ToString()); -Console.WriteLine(result.GetProperty("elementDefs")[0].GetProperty("value").ToString()); ]]> This sample shows how to call GetEnumByNameAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); -Response response = await client.GetEnumByNameAsync(""); -]]> -This sample shows how to call GetEnumByNameAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - -Response response = await client.GetEnumByNameAsync(""); +Response response = await client.GetEnumByNameAsync("hive_principal_type"); ]]> This sample shows how to call GetEnumByName. "); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - -Response response = client.GetEnumByName(""); -]]> -This sample shows how to call GetEnumByName with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); -Response response = client.GetEnumByName(""); +Response response = client.GetEnumByName("hive_principal_type"); ]]> This sample shows how to call GetEnumByNameAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); -Response response = await client.GetEnumByNameAsync("", null); +Response response = await client.GetEnumByNameAsync("hive_principal_type", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetEnumByNameAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - -Response response = await client.GetEnumByNameAsync("", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("calendar").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("lenient").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); -Console.WriteLine(result.GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("serviceType").ToString()); -Console.WriteLine(result.GetProperty("typeVersion").ToString()); -Console.WriteLine(result.GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("elementDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("elementDefs")[0].GetProperty("ordinal").ToString()); -Console.WriteLine(result.GetProperty("elementDefs")[0].GetProperty("value").ToString()); ]]> This sample shows how to call GetEnumByName and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); -Response response = client.GetEnumByName("", null); +Response response = client.GetEnumByName("hive_principal_type", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetEnumByName with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - -Response response = client.GetEnumByName("", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("calendar").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("lenient").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); -Console.WriteLine(result.GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("serviceType").ToString()); -Console.WriteLine(result.GetProperty("typeVersion").ToString()); -Console.WriteLine(result.GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("elementDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("elementDefs")[0].GetProperty("ordinal").ToString()); -Console.WriteLine(result.GetProperty("elementDefs")[0].GetProperty("value").ToString()); ]]> This sample shows how to call GetRelationshipByIdAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); -Response response = await client.GetRelationshipByIdAsync(""); -]]> -This sample shows how to call GetRelationshipByIdAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - -Response response = await client.GetRelationshipByIdAsync(""); +Response response = await client.GetRelationshipByIdAsync("695edde1-2782-4a3c-841b-0b3aba25fe45"); ]]> This sample shows how to call GetRelationshipById. "); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - -Response response = client.GetRelationshipById(""); -]]> -This sample shows how to call GetRelationshipById with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); -Response response = client.GetRelationshipById(""); +Response response = client.GetRelationshipById("695edde1-2782-4a3c-841b-0b3aba25fe45"); ]]> This sample shows how to call GetRelationshipByIdAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); -Response response = await client.GetRelationshipByIdAsync("", null); +Response response = await client.GetRelationshipByIdAsync("695edde1-2782-4a3c-841b-0b3aba25fe45", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetRelationshipByIdAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - -Response response = await client.GetRelationshipByIdAsync("", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("calendar").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("lenient").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); -Console.WriteLine(result.GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("serviceType").ToString()); -Console.WriteLine(result.GetProperty("typeVersion").ToString()); -Console.WriteLine(result.GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); -Console.WriteLine(result.GetProperty("endDef1").GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("endDef1").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("endDef1").GetProperty("isContainer").ToString()); -Console.WriteLine(result.GetProperty("endDef1").GetProperty("isLegacyAttribute").ToString()); -Console.WriteLine(result.GetProperty("endDef1").GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("endDef1").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("endDef2").GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("endDef2").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("endDef2").GetProperty("isContainer").ToString()); -Console.WriteLine(result.GetProperty("endDef2").GetProperty("isLegacyAttribute").ToString()); -Console.WriteLine(result.GetProperty("endDef2").GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("endDef2").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("relationshipCategory").ToString()); -Console.WriteLine(result.GetProperty("relationshipLabel").ToString()); ]]> This sample shows how to call GetRelationshipById and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); -Response response = client.GetRelationshipById("", null); +Response response = client.GetRelationshipById("695edde1-2782-4a3c-841b-0b3aba25fe45", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetRelationshipById with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - -Response response = client.GetRelationshipById("", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("calendar").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("lenient").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); -Console.WriteLine(result.GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("serviceType").ToString()); -Console.WriteLine(result.GetProperty("typeVersion").ToString()); -Console.WriteLine(result.GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); -Console.WriteLine(result.GetProperty("endDef1").GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("endDef1").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("endDef1").GetProperty("isContainer").ToString()); -Console.WriteLine(result.GetProperty("endDef1").GetProperty("isLegacyAttribute").ToString()); -Console.WriteLine(result.GetProperty("endDef1").GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("endDef1").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("endDef2").GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("endDef2").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("endDef2").GetProperty("isContainer").ToString()); -Console.WriteLine(result.GetProperty("endDef2").GetProperty("isLegacyAttribute").ToString()); -Console.WriteLine(result.GetProperty("endDef2").GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("endDef2").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("relationshipCategory").ToString()); -Console.WriteLine(result.GetProperty("relationshipLabel").ToString()); ]]> This sample shows how to call GetRelationshipByNameAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); -Response response = await client.GetRelationshipByNameAsync(""); -]]> -This sample shows how to call GetRelationshipByNameAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - -Response response = await client.GetRelationshipByNameAsync(""); +Response response = await client.GetRelationshipByNameAsync("storm_topology_nodes"); ]]> This sample shows how to call GetRelationshipByName. "); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - -Response response = client.GetRelationshipByName(""); -]]> -This sample shows how to call GetRelationshipByName with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); -Response response = client.GetRelationshipByName(""); +Response response = client.GetRelationshipByName("storm_topology_nodes"); ]]> This sample shows how to call GetRelationshipByNameAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); -Response response = await client.GetRelationshipByNameAsync("", null); +Response response = await client.GetRelationshipByNameAsync("storm_topology_nodes", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetRelationshipByNameAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - -Response response = await client.GetRelationshipByNameAsync("", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("calendar").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("lenient").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); -Console.WriteLine(result.GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("serviceType").ToString()); -Console.WriteLine(result.GetProperty("typeVersion").ToString()); -Console.WriteLine(result.GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); -Console.WriteLine(result.GetProperty("endDef1").GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("endDef1").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("endDef1").GetProperty("isContainer").ToString()); -Console.WriteLine(result.GetProperty("endDef1").GetProperty("isLegacyAttribute").ToString()); -Console.WriteLine(result.GetProperty("endDef1").GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("endDef1").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("endDef2").GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("endDef2").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("endDef2").GetProperty("isContainer").ToString()); -Console.WriteLine(result.GetProperty("endDef2").GetProperty("isLegacyAttribute").ToString()); -Console.WriteLine(result.GetProperty("endDef2").GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("endDef2").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("relationshipCategory").ToString()); -Console.WriteLine(result.GetProperty("relationshipLabel").ToString()); ]]> This sample shows how to call GetRelationshipByName and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); -Response response = client.GetRelationshipByName("", null); +Response response = client.GetRelationshipByName("storm_topology_nodes", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetRelationshipByName with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - -Response response = client.GetRelationshipByName("", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("calendar").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("lenient").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); -Console.WriteLine(result.GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("serviceType").ToString()); -Console.WriteLine(result.GetProperty("typeVersion").ToString()); -Console.WriteLine(result.GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); -Console.WriteLine(result.GetProperty("endDef1").GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("endDef1").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("endDef1").GetProperty("isContainer").ToString()); -Console.WriteLine(result.GetProperty("endDef1").GetProperty("isLegacyAttribute").ToString()); -Console.WriteLine(result.GetProperty("endDef1").GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("endDef1").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("endDef2").GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("endDef2").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("endDef2").GetProperty("isContainer").ToString()); -Console.WriteLine(result.GetProperty("endDef2").GetProperty("isLegacyAttribute").ToString()); -Console.WriteLine(result.GetProperty("endDef2").GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("endDef2").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("relationshipCategory").ToString()); -Console.WriteLine(result.GetProperty("relationshipLabel").ToString()); ]]> This sample shows how to call GetStructByIdAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); -Response response = await client.GetStructByIdAsync(""); -]]> -This sample shows how to call GetStructByIdAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - -Response response = await client.GetStructByIdAsync(""); +Response response = await client.GetStructByIdAsync("f1571b6e-ad08-4040-a9a7-c30ed935d437"); ]]> This sample shows how to call GetStructById. "); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - -Response response = client.GetStructById(""); -]]> -This sample shows how to call GetStructById with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); -Response response = client.GetStructById(""); +Response response = client.GetStructById("f1571b6e-ad08-4040-a9a7-c30ed935d437"); ]]> This sample shows how to call GetStructByIdAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); -Response response = await client.GetStructByIdAsync("", null); +Response response = await client.GetStructByIdAsync("f1571b6e-ad08-4040-a9a7-c30ed935d437", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetStructByIdAsync with all parameters and parse the result. +]]> + + + +This sample shows how to call GetStructById and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); -Response response = await client.GetStructByIdAsync("", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("calendar").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("lenient").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); -Console.WriteLine(result.GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("serviceType").ToString()); -Console.WriteLine(result.GetProperty("typeVersion").ToString()); -Console.WriteLine(result.GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); -]]> - - - -This sample shows how to call GetStructById and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - -Response response = client.GetStructById("", null); +Response response = client.GetStructById("f1571b6e-ad08-4040-a9a7-c30ed935d437", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetStructById with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - -Response response = client.GetStructById("", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("calendar").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("lenient").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); -Console.WriteLine(result.GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("serviceType").ToString()); -Console.WriteLine(result.GetProperty("typeVersion").ToString()); -Console.WriteLine(result.GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); ]]> This sample shows how to call GetStructByNameAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - -Response response = await client.GetStructByNameAsync(""); -]]> -This sample shows how to call GetStructByNameAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); -Response response = await client.GetStructByNameAsync(""); +Response response = await client.GetStructByNameAsync("hive_order"); ]]> This sample shows how to call GetStructByName. "); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - -Response response = client.GetStructByName(""); -]]> -This sample shows how to call GetStructByName with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); -Response response = client.GetStructByName(""); +Response response = client.GetStructByName("hive_order"); ]]> This sample shows how to call GetStructByNameAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); -Response response = await client.GetStructByNameAsync("", null); +Response response = await client.GetStructByNameAsync("hive_order", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetStructByNameAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - -Response response = await client.GetStructByNameAsync("", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("calendar").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("lenient").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); -Console.WriteLine(result.GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("serviceType").ToString()); -Console.WriteLine(result.GetProperty("typeVersion").ToString()); -Console.WriteLine(result.GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); ]]> This sample shows how to call GetStructByName and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); -Response response = client.GetStructByName("", null); +Response response = client.GetStructByName("hive_order", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetStructByName with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - -Response response = client.GetStructByName("", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("calendar").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("lenient").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); -Console.WriteLine(result.GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("serviceType").ToString()); -Console.WriteLine(result.GetProperty("typeVersion").ToString()); -Console.WriteLine(result.GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); ]]> This sample shows how to call GetByIdAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - -Response response = await client.GetByIdAsync(""); -]]> -This sample shows how to call GetByIdAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); -Response response = await client.GetByIdAsync(""); +Response response = await client.GetByIdAsync("0ddc2fcf-ad17-4d06-984a-ffb2ffb2a941"); ]]> This sample shows how to call GetById. "); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - -Response response = client.GetById(""); -]]> -This sample shows how to call GetById with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); -Response response = client.GetById(""); +Response response = client.GetById("0ddc2fcf-ad17-4d06-984a-ffb2ffb2a941"); ]]> This sample shows how to call GetByIdAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); -Response response = await client.GetByIdAsync("", null); +Response response = await client.GetByIdAsync("0ddc2fcf-ad17-4d06-984a-ffb2ffb2a941", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetByIdAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - -Response response = await client.GetByIdAsync("", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("calendar").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("lenient").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); -Console.WriteLine(result.GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("serviceType").ToString()); -Console.WriteLine(result.GetProperty("typeVersion").ToString()); -Console.WriteLine(result.GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("entityTypes")[0].ToString()); -Console.WriteLine(result.GetProperty("subTypes")[0].ToString()); -Console.WriteLine(result.GetProperty("superTypes")[0].ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("includeInNotification").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("isIndexable").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("isOptional").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("isUnique").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("valuesMaxCount").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("valuesMinCount").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("isLegacyAttribute").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("relationshipTypeName").ToString()); -Console.WriteLine(result.GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("elementDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("elementDefs")[0].GetProperty("ordinal").ToString()); -Console.WriteLine(result.GetProperty("elementDefs")[0].GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("endDef1").GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("endDef1").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("endDef1").GetProperty("isContainer").ToString()); -Console.WriteLine(result.GetProperty("endDef1").GetProperty("isLegacyAttribute").ToString()); -Console.WriteLine(result.GetProperty("endDef1").GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("endDef1").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("endDef2").GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("endDef2").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("endDef2").GetProperty("isContainer").ToString()); -Console.WriteLine(result.GetProperty("endDef2").GetProperty("isLegacyAttribute").ToString()); -Console.WriteLine(result.GetProperty("endDef2").GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("endDef2").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("relationshipCategory").ToString()); -Console.WriteLine(result.GetProperty("relationshipLabel").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); ]]> This sample shows how to call GetById and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); -Response response = client.GetById("", null); +Response response = client.GetById("0ddc2fcf-ad17-4d06-984a-ffb2ffb2a941", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetById with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - -Response response = client.GetById("", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("calendar").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("lenient").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); -Console.WriteLine(result.GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("serviceType").ToString()); -Console.WriteLine(result.GetProperty("typeVersion").ToString()); -Console.WriteLine(result.GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("entityTypes")[0].ToString()); -Console.WriteLine(result.GetProperty("subTypes")[0].ToString()); -Console.WriteLine(result.GetProperty("superTypes")[0].ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("includeInNotification").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("isIndexable").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("isOptional").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("isUnique").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("valuesMaxCount").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("valuesMinCount").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("isLegacyAttribute").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("relationshipTypeName").ToString()); -Console.WriteLine(result.GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("elementDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("elementDefs")[0].GetProperty("ordinal").ToString()); -Console.WriteLine(result.GetProperty("elementDefs")[0].GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("endDef1").GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("endDef1").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("endDef1").GetProperty("isContainer").ToString()); -Console.WriteLine(result.GetProperty("endDef1").GetProperty("isLegacyAttribute").ToString()); -Console.WriteLine(result.GetProperty("endDef1").GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("endDef1").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("endDef2").GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("endDef2").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("endDef2").GetProperty("isContainer").ToString()); -Console.WriteLine(result.GetProperty("endDef2").GetProperty("isLegacyAttribute").ToString()); -Console.WriteLine(result.GetProperty("endDef2").GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("endDef2").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("relationshipCategory").ToString()); -Console.WriteLine(result.GetProperty("relationshipLabel").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); ]]> This sample shows how to call GetByNameAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - -Response response = await client.GetByNameAsync(""); -]]> -This sample shows how to call GetByNameAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); -Response response = await client.GetByNameAsync(""); +Response response = await client.GetByNameAsync("glossary_term_status_value"); ]]> This sample shows how to call GetByName. "); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - -Response response = client.GetByName(""); -]]> -This sample shows how to call GetByName with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); -Response response = client.GetByName(""); +Response response = client.GetByName("glossary_term_status_value"); ]]> This sample shows how to call GetByNameAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); -Response response = await client.GetByNameAsync("", null); +Response response = await client.GetByNameAsync("glossary_term_status_value", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetByNameAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - -Response response = await client.GetByNameAsync("", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("calendar").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("lenient").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); -Console.WriteLine(result.GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("serviceType").ToString()); -Console.WriteLine(result.GetProperty("typeVersion").ToString()); -Console.WriteLine(result.GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("entityTypes")[0].ToString()); -Console.WriteLine(result.GetProperty("subTypes")[0].ToString()); -Console.WriteLine(result.GetProperty("superTypes")[0].ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("includeInNotification").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("isIndexable").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("isOptional").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("isUnique").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("valuesMaxCount").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("valuesMinCount").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("isLegacyAttribute").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("relationshipTypeName").ToString()); -Console.WriteLine(result.GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("elementDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("elementDefs")[0].GetProperty("ordinal").ToString()); -Console.WriteLine(result.GetProperty("elementDefs")[0].GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("endDef1").GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("endDef1").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("endDef1").GetProperty("isContainer").ToString()); -Console.WriteLine(result.GetProperty("endDef1").GetProperty("isLegacyAttribute").ToString()); -Console.WriteLine(result.GetProperty("endDef1").GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("endDef1").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("endDef2").GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("endDef2").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("endDef2").GetProperty("isContainer").ToString()); -Console.WriteLine(result.GetProperty("endDef2").GetProperty("isLegacyAttribute").ToString()); -Console.WriteLine(result.GetProperty("endDef2").GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("endDef2").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("relationshipCategory").ToString()); -Console.WriteLine(result.GetProperty("relationshipLabel").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); ]]> This sample shows how to call GetByName and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); -Response response = client.GetByName("", null); +Response response = client.GetByName("glossary_term_status_value", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetByName with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - -Response response = client.GetByName("", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("calendar").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("lenient").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); -Console.WriteLine(result.GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("serviceType").ToString()); -Console.WriteLine(result.GetProperty("typeVersion").ToString()); -Console.WriteLine(result.GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("entityTypes")[0].ToString()); -Console.WriteLine(result.GetProperty("subTypes")[0].ToString()); -Console.WriteLine(result.GetProperty("superTypes")[0].ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("includeInNotification").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("isIndexable").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("isOptional").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("isUnique").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("valuesMaxCount").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("valuesMinCount").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("isLegacyAttribute").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("relationshipTypeName").ToString()); -Console.WriteLine(result.GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("elementDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("elementDefs")[0].GetProperty("ordinal").ToString()); -Console.WriteLine(result.GetProperty("elementDefs")[0].GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("endDef1").GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("endDef1").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("endDef1").GetProperty("isContainer").ToString()); -Console.WriteLine(result.GetProperty("endDef1").GetProperty("isLegacyAttribute").ToString()); -Console.WriteLine(result.GetProperty("endDef1").GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("endDef1").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("endDef2").GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("endDef2").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("endDef2").GetProperty("isContainer").ToString()); -Console.WriteLine(result.GetProperty("endDef2").GetProperty("isLegacyAttribute").ToString()); -Console.WriteLine(result.GetProperty("endDef2").GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("endDef2").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("relationshipCategory").ToString()); -Console.WriteLine(result.GetProperty("relationshipLabel").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); ]]> This sample shows how to call DeleteAsync. "); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - -Response response = await client.DeleteAsync(""); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call DeleteAsync with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); -Response response = await client.DeleteAsync(""); +Response response = await client.DeleteAsync("hive_order"); Console.WriteLine(response.Status); ]]> @@ -2712,21 +718,11 @@ Console.WriteLine(response.Status); This sample shows how to call Delete. "); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - -Response response = client.Delete(""); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call Delete with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); -Response response = client.Delete(""); +Response response = client.Delete("hive_order"); Console.WriteLine(response.Status); ]]> @@ -2735,768 +731,163 @@ Console.WriteLine(response.Status); This sample shows how to call GetTypeDefinitionAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(apiVersion: "2023-09-01"); + +Response response = await client.GetTypeDefinitionAsync(); +]]> +This sample shows how to call GetTypeDefinitionAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(apiVersion: "2023-09-01"); Response response = await client.GetTypeDefinitionAsync(); ]]> -This sample shows how to call GetTypeDefinitionAsync with all parameters. +This sample shows how to call GetTypeDefinitionAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(apiVersion: "2023-09-01"); -Response response = await client.GetTypeDefinitionAsync(includeTermTemplate: true, type: TypeCategory.Primitive); +Response response = await client.GetTypeDefinitionAsync(); ]]> This sample shows how to call GetTypeDefinition. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(apiVersion: "2023-09-01"); + +Response response = client.GetTypeDefinition(); +]]> +This sample shows how to call GetTypeDefinition. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(apiVersion: "2023-09-01"); Response response = client.GetTypeDefinition(); ]]> -This sample shows how to call GetTypeDefinition with all parameters. +This sample shows how to call GetTypeDefinition. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(apiVersion: "2023-09-01"); -Response response = client.GetTypeDefinition(includeTermTemplate: true, type: TypeCategory.Primitive); +Response response = client.GetTypeDefinition(); ]]> This sample shows how to call GetTypeDefinitionAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(apiVersion: "2023-09-01"); -Response response = await client.GetTypeDefinitionAsync(null, null, null); +Response response = await client.GetTypeDefinitionAsync(true, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call GetTypeDefinitionAsync with all parameters and parse the result. +This sample shows how to call GetTypeDefinitionAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(apiVersion: "2023-09-01"); + +Response response = await client.GetTypeDefinitionAsync(null, "ENUM", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetTypeDefinitionAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(apiVersion: "2023-09-01"); -Response response = await client.GetTypeDefinitionAsync(true, "PRIMITIVE", null); +Response response = await client.GetTypeDefinitionAsync(null, "TERM_TEMPLATE", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("serviceType").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("typeVersion").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("serviceType").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("typeVersion").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("entityTypes")[0].ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("subTypes")[0].ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("superTypes")[0].ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("serviceType").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("typeVersion").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("subTypes")[0].ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("superTypes")[0].ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("includeInNotification").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("isIndexable").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("isOptional").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("isUnique").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("valuesMaxCount").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("valuesMinCount").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("isLegacyAttribute").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("relationshipTypeName").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("serviceType").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("typeVersion").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("elementDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("elementDefs")[0].GetProperty("ordinal").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("elementDefs")[0].GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("serviceType").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("typeVersion").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef1").GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef1").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef1").GetProperty("isContainer").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef1").GetProperty("isLegacyAttribute").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef1").GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef1").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef2").GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef2").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef2").GetProperty("isContainer").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef2").GetProperty("isLegacyAttribute").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef2").GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef2").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("relationshipCategory").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("relationshipLabel").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("serviceType").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("typeVersion").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("serviceType").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("typeVersion").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); +Console.WriteLine(result.ToString()); ]]> This sample shows how to call GetTypeDefinition and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(apiVersion: "2023-09-01"); + +Response response = client.GetTypeDefinition(true, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetTypeDefinition and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(apiVersion: "2023-09-01"); -Response response = client.GetTypeDefinition(null, null, null); +Response response = client.GetTypeDefinition(null, "ENUM", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call GetTypeDefinition with all parameters and parse the result. +This sample shows how to call GetTypeDefinition and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(apiVersion: "2023-09-01"); -Response response = client.GetTypeDefinition(true, "PRIMITIVE", null); +Response response = client.GetTypeDefinition(null, "TERM_TEMPLATE", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("serviceType").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("typeVersion").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("serviceType").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("typeVersion").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("entityTypes")[0].ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("subTypes")[0].ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("superTypes")[0].ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("serviceType").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("typeVersion").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("subTypes")[0].ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("superTypes")[0].ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("includeInNotification").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("isIndexable").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("isOptional").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("isUnique").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("valuesMaxCount").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("valuesMinCount").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("isLegacyAttribute").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("relationshipTypeName").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("serviceType").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("typeVersion").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("elementDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("elementDefs")[0].GetProperty("ordinal").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("elementDefs")[0].GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("serviceType").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("typeVersion").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef1").GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef1").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef1").GetProperty("isContainer").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef1").GetProperty("isLegacyAttribute").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef1").GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef1").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef2").GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef2").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef2").GetProperty("isContainer").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef2").GetProperty("isLegacyAttribute").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef2").GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef2").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("relationshipCategory").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("relationshipLabel").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("serviceType").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("typeVersion").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("serviceType").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("typeVersion").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); +Console.WriteLine(result.ToString()); ]]> This sample shows how to call BatchCreateAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); -AtlasTypesDef body = new AtlasTypesDef(); +AtlasTypesDef body = new AtlasTypesDef +{ + ClassificationDefs = { }, + EntityDefs = {new AtlasEntityDef + { + Name = "azure_sql_server_example", + TypeVersion = "1.0", + AttributeDefs = {new AtlasAttributeDef + { + Cardinality = CardinalityValue.Set, + IsIndexable = false, + IsOptional = true, + IsUnique = false, + Name = "databases", + TypeName = "array", + }}, + SuperTypes = {"azure_resource"}, + }}, + EnumDefs = { }, + RelationshipDefs = { }, + StructDefs = { }, +}; Response response = await client.BatchCreateAsync(body); ]]> -This sample shows how to call BatchCreateAsync with all parameters. +This sample shows how to call BatchCreateAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); @@ -3504,255 +895,28 @@ AtlasTypesDef body = new AtlasTypesDef { BusinessMetadataDefs = {new AtlasBusinessMetadataDef { - Category = TypeCategory.Primitive, - CreateTime = 1234L, - CreatedBy = "", - DateFormatter = new AtlasDateFormat - { - AvailableLocales = {""}, - Calendar = 123.45F, - DateInstance = default, - DateTimeInstance = default, - Instance = default, - Lenient = true, - NumberFormat = new AtlasNumberFormat - { - AvailableLocales = {""}, - Currency = "", - CurrencyInstance = default, - GroupingUsed = true, - Instance = default, - IntegerInstance = default, - MaximumFractionDigits = 1234, - MaximumIntegerDigits = 1234, - MinimumFractionDigits = 1234, - MinimumIntegerDigits = 1234, - NumberInstance = default, - ParseIntegerOnly = true, - PercentInstance = default, - RoundingMode = RoundingMode.Up, - }, - TimeInstance = default, - TimeZone = new AtlasTimeZone - { - DstSavings = 1234, - Id = "", - AvailableIds = {""}, - Default = default, - DisplayName = "", - RawOffset = 1234, - }, - }, - Description = "", - Guid = "", - Name = "", - Options = - { - ["key"] = "" - }, - ServiceType = "", - TypeVersion = "", - UpdateTime = 1234L, - UpdatedBy = "", - Version = 1234L, - LastModifiedTS = "", + Description = "", + Name = "myBizMetadata1", AttributeDefs = {new AtlasAttributeDef { Cardinality = CardinalityValue.Single, - Constraints = {new AtlasConstraintDef - { - Params = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - Type = "", - }}, - DefaultValue = "", - Description = "", - IncludeInNotification = true, - IsIndexable = true, - IsOptional = true, - IsUnique = true, - Name = "", - Options = - { - ["key"] = "" - }, - TypeName = "", - ValuesMaxCount = 1234, - ValuesMinCount = 1234, - }}, - }}, - ClassificationDefs = {new AtlasClassificationDef - { - Category = TypeCategory.Primitive, - CreateTime = 1234L, - CreatedBy = "", - DateFormatter = default, - Description = "", - Guid = "", - Name = "", - Options = - { - ["key"] = "" - }, - ServiceType = "", - TypeVersion = "", - UpdateTime = 1234L, - UpdatedBy = "", - Version = 1234L, - LastModifiedTS = "", - AttributeDefs = {default}, - EntityTypes = {""}, - SubTypes = {""}, - SuperTypes = {""}, - }}, - EntityDefs = {new AtlasEntityDef - { - Category = TypeCategory.Primitive, - CreateTime = 1234L, - CreatedBy = "", - DateFormatter = default, - Description = "", - Guid = "", - Name = "", - Options = - { - ["key"] = "" - }, - ServiceType = "", - TypeVersion = "", - UpdateTime = 1234L, - UpdatedBy = "", - Version = 1234L, - LastModifiedTS = "", - AttributeDefs = {default}, - SubTypes = {""}, - SuperTypes = {""}, - RelationshipAttributeDefs = {new AtlasRelationshipAttributeDef - { - Cardinality = CardinalityValue.Single, - Constraints = {default}, - DefaultValue = "", - Description = "", - IncludeInNotification = true, IsIndexable = true, IsOptional = true, - IsUnique = true, - Name = "", + IsUnique = false, + Name = "bizAttr1", Options = { - ["key"] = "" + ["maxStrLength"] = "50", + ["applicableEntityTypes"] = "[\"Path\"]" }, - TypeName = "", - ValuesMaxCount = 1234, - ValuesMinCount = 1234, - IsLegacyAttribute = true, - RelationshipTypeName = "", - }}, - }}, - EnumDefs = {new AtlasEnumDef - { - Category = TypeCategory.Primitive, - CreateTime = 1234L, - CreatedBy = "", - DateFormatter = default, - Description = "", - Guid = "", - Name = "", - Options = - { - ["key"] = "" - }, - ServiceType = "", - TypeVersion = "", - UpdateTime = 1234L, - UpdatedBy = "", - Version = 1234L, - LastModifiedTS = "", - DefaultValue = "", - ElementDefs = {new AtlasEnumElementDef - { - Description = "", - Ordinal = 1234, - Value = "", + TypeName = "string", }}, }}, - RelationshipDefs = {new AtlasRelationshipDef - { - Category = TypeCategory.Primitive, - CreateTime = 1234L, - CreatedBy = "", - DateFormatter = default, - Description = "", - Guid = "", - Name = "", - Options = - { - ["key"] = "" - }, - ServiceType = "", - TypeVersion = "", - UpdateTime = 1234L, - UpdatedBy = "", - Version = 1234L, - LastModifiedTS = "", - AttributeDefs = {default}, - EndDef1 = new AtlasRelationshipEndDef - { - Cardinality = CardinalityValue.Single, - Description = "", - IsContainer = true, - IsLegacyAttribute = true, - Name = "", - Type = "", - }, - EndDef2 = default, - RelationshipCategory = RelationshipCategory.Association, - RelationshipLabel = "", - }}, - StructDefs = {new AtlasStructDef - { - Category = TypeCategory.Primitive, - CreateTime = 1234L, - CreatedBy = "", - DateFormatter = default, - Description = "", - Guid = "", - Name = "", - Options = - { - ["key"] = "" - }, - ServiceType = "", - TypeVersion = "", - UpdateTime = 1234L, - UpdatedBy = "", - Version = 1234L, - LastModifiedTS = "", - AttributeDefs = {default}, - }}, - TermTemplateDefs = {new TermTemplateDef - { - Category = TypeCategory.Primitive, - CreateTime = 1234L, - CreatedBy = "", - DateFormatter = default, - Description = "", - Guid = "", - Name = "", - Options = - { - ["key"] = "" - }, - ServiceType = "", - TypeVersion = "", - UpdateTime = 1234L, - UpdatedBy = "", - Version = 1234L, - LastModifiedTS = "", - AttributeDefs = {default}, - }}, + ClassificationDefs = { }, + EntityDefs = { }, + EnumDefs = { }, + RelationshipDefs = { }, + StructDefs = { }, }; Response response = await client.BatchCreateAsync(body); ]]> @@ -3761,16 +925,37 @@ Response response = await client.BatchCreateAsync(body); This sample shows how to call BatchCreate. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); -AtlasTypesDef body = new AtlasTypesDef(); +AtlasTypesDef body = new AtlasTypesDef +{ + ClassificationDefs = { }, + EntityDefs = {new AtlasEntityDef + { + Name = "azure_sql_server_example", + TypeVersion = "1.0", + AttributeDefs = {new AtlasAttributeDef + { + Cardinality = CardinalityValue.Set, + IsIndexable = false, + IsOptional = true, + IsUnique = false, + Name = "databases", + TypeName = "array", + }}, + SuperTypes = {"azure_resource"}, + }}, + EnumDefs = { }, + RelationshipDefs = { }, + StructDefs = { }, +}; Response response = client.BatchCreate(body); ]]> -This sample shows how to call BatchCreate with all parameters. +This sample shows how to call BatchCreate. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); @@ -3778,3564 +963,239 @@ AtlasTypesDef body = new AtlasTypesDef { BusinessMetadataDefs = {new AtlasBusinessMetadataDef { - Category = TypeCategory.Primitive, - CreateTime = 1234L, - CreatedBy = "", - DateFormatter = new AtlasDateFormat - { - AvailableLocales = {""}, - Calendar = 123.45F, - DateInstance = default, - DateTimeInstance = default, - Instance = default, - Lenient = true, - NumberFormat = new AtlasNumberFormat - { - AvailableLocales = {""}, - Currency = "", - CurrencyInstance = default, - GroupingUsed = true, - Instance = default, - IntegerInstance = default, - MaximumFractionDigits = 1234, - MaximumIntegerDigits = 1234, - MinimumFractionDigits = 1234, - MinimumIntegerDigits = 1234, - NumberInstance = default, - ParseIntegerOnly = true, - PercentInstance = default, - RoundingMode = RoundingMode.Up, - }, - TimeInstance = default, - TimeZone = new AtlasTimeZone - { - DstSavings = 1234, - Id = "", - AvailableIds = {""}, - Default = default, - DisplayName = "", - RawOffset = 1234, - }, - }, - Description = "", - Guid = "", - Name = "", - Options = - { - ["key"] = "" - }, - ServiceType = "", - TypeVersion = "", - UpdateTime = 1234L, - UpdatedBy = "", - Version = 1234L, - LastModifiedTS = "", + Description = "", + Name = "myBizMetadata1", AttributeDefs = {new AtlasAttributeDef { Cardinality = CardinalityValue.Single, - Constraints = {new AtlasConstraintDef - { - Params = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - Type = "", - }}, - DefaultValue = "", - Description = "", - IncludeInNotification = true, IsIndexable = true, IsOptional = true, - IsUnique = true, - Name = "", + IsUnique = false, + Name = "bizAttr1", Options = { - ["key"] = "" + ["maxStrLength"] = "50", + ["applicableEntityTypes"] = "[\"Path\"]" }, - TypeName = "", - ValuesMaxCount = 1234, - ValuesMinCount = 1234, + TypeName = "string", }}, }}, - ClassificationDefs = {new AtlasClassificationDef - { - Category = TypeCategory.Primitive, - CreateTime = 1234L, - CreatedBy = "", - DateFormatter = default, - Description = "", - Guid = "", - Name = "", - Options = - { - ["key"] = "" - }, - ServiceType = "", - TypeVersion = "", - UpdateTime = 1234L, - UpdatedBy = "", - Version = 1234L, - LastModifiedTS = "", - AttributeDefs = {default}, - EntityTypes = {""}, - SubTypes = {""}, - SuperTypes = {""}, - }}, - EntityDefs = {new AtlasEntityDef - { - Category = TypeCategory.Primitive, - CreateTime = 1234L, - CreatedBy = "", - DateFormatter = default, - Description = "", - Guid = "", - Name = "", - Options = - { - ["key"] = "" - }, - ServiceType = "", - TypeVersion = "", - UpdateTime = 1234L, - UpdatedBy = "", - Version = 1234L, - LastModifiedTS = "", - AttributeDefs = {default}, - SubTypes = {""}, - SuperTypes = {""}, - RelationshipAttributeDefs = {new AtlasRelationshipAttributeDef - { - Cardinality = CardinalityValue.Single, - Constraints = {default}, - DefaultValue = "", - Description = "", - IncludeInNotification = true, - IsIndexable = true, - IsOptional = true, - IsUnique = true, - Name = "", - Options = - { - ["key"] = "" - }, - TypeName = "", - ValuesMaxCount = 1234, - ValuesMinCount = 1234, - IsLegacyAttribute = true, - RelationshipTypeName = "", - }}, - }}, - EnumDefs = {new AtlasEnumDef - { - Category = TypeCategory.Primitive, - CreateTime = 1234L, - CreatedBy = "", - DateFormatter = default, - Description = "", - Guid = "", - Name = "", - Options = - { - ["key"] = "" - }, - ServiceType = "", - TypeVersion = "", - UpdateTime = 1234L, - UpdatedBy = "", - Version = 1234L, - LastModifiedTS = "", - DefaultValue = "", - ElementDefs = {new AtlasEnumElementDef - { - Description = "", - Ordinal = 1234, - Value = "", - }}, - }}, - RelationshipDefs = {new AtlasRelationshipDef - { - Category = TypeCategory.Primitive, - CreateTime = 1234L, - CreatedBy = "", - DateFormatter = default, - Description = "", - Guid = "", - Name = "", - Options = - { - ["key"] = "" - }, - ServiceType = "", - TypeVersion = "", - UpdateTime = 1234L, - UpdatedBy = "", - Version = 1234L, - LastModifiedTS = "", - AttributeDefs = {default}, - EndDef1 = new AtlasRelationshipEndDef - { - Cardinality = CardinalityValue.Single, - Description = "", - IsContainer = true, - IsLegacyAttribute = true, - Name = "", - Type = "", - }, - EndDef2 = default, - RelationshipCategory = RelationshipCategory.Association, - RelationshipLabel = "", - }}, - StructDefs = {new AtlasStructDef - { - Category = TypeCategory.Primitive, - CreateTime = 1234L, - CreatedBy = "", - DateFormatter = default, - Description = "", - Guid = "", - Name = "", - Options = - { - ["key"] = "" - }, - ServiceType = "", - TypeVersion = "", - UpdateTime = 1234L, - UpdatedBy = "", - Version = 1234L, - LastModifiedTS = "", - AttributeDefs = {default}, - }}, - TermTemplateDefs = {new TermTemplateDef - { - Category = TypeCategory.Primitive, - CreateTime = 1234L, - CreatedBy = "", - DateFormatter = default, - Description = "", - Guid = "", - Name = "", - Options = - { - ["key"] = "" - }, - ServiceType = "", - TypeVersion = "", - UpdateTime = 1234L, - UpdatedBy = "", - Version = 1234L, - LastModifiedTS = "", - AttributeDefs = {default}, - }}, -}; -Response response = client.BatchCreate(body); -]]> - - - -This sample shows how to call BatchCreateAsync and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - -using RequestContent content = RequestContent.Create(new object()); -Response response = await client.BatchCreateAsync(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.ToString()); -]]> -This sample shows how to call BatchCreateAsync with all request content and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - -using RequestContent content = RequestContent.Create(new -{ - businessMetadataDefs = new object[] - { - new - { - category = "PRIMITIVE", - createTime = 1234L, - createdBy = "", - dateFormatter = new - { - availableLocales = new object[] - { - "" - }, - calendar = 123.45F, - lenient = true, - numberFormat = new - { - availableLocales = new object[] - { - "" - }, - currency = "", - groupingUsed = true, - maximumFractionDigits = 1234, - maximumIntegerDigits = 1234, - minimumFractionDigits = 1234, - minimumIntegerDigits = 1234, - parseIntegerOnly = true, - roundingMode = "UP", - }, - timeZone = new Dictionary - { - ["dstSavings"] = 1234, - ["id"] = "", - ["availableIds"] = new object[] - { - "" - }, - ["default"] = null, - ["displayName"] = "", - ["rawOffset"] = 1234 - }, - }, - description = "", - guid = "", - name = "", - options = new - { - key = "", - }, - serviceType = "", - typeVersion = "", - updateTime = 1234L, - updatedBy = "", - version = 1234L, - lastModifiedTS = "", - attributeDefs = new object[] - { - new - { - cardinality = "SINGLE", - constraints = new object[] - { - new Dictionary - { - ["params"] = new - { - key = new object(), - }, - ["type"] = "" - } - }, - defaultValue = "", - description = "", - includeInNotification = true, - isIndexable = true, - isOptional = true, - isUnique = true, - name = "", - options = new - { - key = "", - }, - typeName = "", - valuesMaxCount = 1234, - valuesMinCount = 1234, - } - }, - } - }, - classificationDefs = new object[] - { - new - { - category = "PRIMITIVE", - createTime = 1234L, - createdBy = "", - description = "", - guid = "", - name = "", - options = new - { - key = "", - }, - serviceType = "", - typeVersion = "", - updateTime = 1234L, - updatedBy = "", - version = 1234L, - lastModifiedTS = "", - attributeDefs = new object[] - { - null - }, - entityTypes = new object[] - { - "" - }, - subTypes = new object[] - { - "" - }, - superTypes = new object[] - { - "" - }, - } - }, - entityDefs = new object[] - { - new - { - category = "PRIMITIVE", - createTime = 1234L, - createdBy = "", - description = "", - guid = "", - name = "", - options = new - { - key = "", - }, - serviceType = "", - typeVersion = "", - updateTime = 1234L, - updatedBy = "", - version = 1234L, - lastModifiedTS = "", - attributeDefs = new object[] - { - null - }, - subTypes = new object[] - { - "" - }, - superTypes = new object[] - { - "" - }, - relationshipAttributeDefs = new object[] - { - new - { - cardinality = "SINGLE", - constraints = new object[] - { - null - }, - defaultValue = "", - description = "", - includeInNotification = true, - isIndexable = true, - isOptional = true, - isUnique = true, - name = "", - options = new - { - key = "", - }, - typeName = "", - valuesMaxCount = 1234, - valuesMinCount = 1234, - isLegacyAttribute = true, - relationshipTypeName = "", - } - }, - } - }, - enumDefs = new object[] - { - new - { - category = "PRIMITIVE", - createTime = 1234L, - createdBy = "", - description = "", - guid = "", - name = "", - options = new - { - key = "", - }, - serviceType = "", - typeVersion = "", - updateTime = 1234L, - updatedBy = "", - version = 1234L, - lastModifiedTS = "", - defaultValue = "", - elementDefs = new object[] - { - new - { - description = "", - ordinal = 1234, - value = "", - } - }, - } - }, - relationshipDefs = new object[] - { - new - { - category = "PRIMITIVE", - createTime = 1234L, - createdBy = "", - description = "", - guid = "", - name = "", - options = new - { - key = "", - }, - serviceType = "", - typeVersion = "", - updateTime = 1234L, - updatedBy = "", - version = 1234L, - lastModifiedTS = "", - attributeDefs = new object[] - { - null - }, - endDef1 = new - { - cardinality = "SINGLE", - description = "", - isContainer = true, - isLegacyAttribute = true, - name = "", - type = "", - }, - relationshipCategory = "ASSOCIATION", - relationshipLabel = "", - } - }, - structDefs = new object[] - { - new - { - category = "PRIMITIVE", - createTime = 1234L, - createdBy = "", - description = "", - guid = "", - name = "", - options = new - { - key = "", - }, - serviceType = "", - typeVersion = "", - updateTime = 1234L, - updatedBy = "", - version = 1234L, - lastModifiedTS = "", - attributeDefs = new object[] - { - null - }, - } - }, - termTemplateDefs = new object[] - { - new - { - category = "PRIMITIVE", - createTime = 1234L, - createdBy = "", - description = "", - guid = "", - name = "", - options = new - { - key = "", - }, - serviceType = "", - typeVersion = "", - updateTime = 1234L, - updatedBy = "", - version = 1234L, - lastModifiedTS = "", - attributeDefs = new object[] - { - null - }, - } - }, -}); -Response response = await client.BatchCreateAsync(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("serviceType").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("typeVersion").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("serviceType").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("typeVersion").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("entityTypes")[0].ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("subTypes")[0].ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("superTypes")[0].ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("serviceType").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("typeVersion").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("subTypes")[0].ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("superTypes")[0].ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("includeInNotification").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("isIndexable").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("isOptional").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("isUnique").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("valuesMaxCount").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("valuesMinCount").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("isLegacyAttribute").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("relationshipTypeName").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("serviceType").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("typeVersion").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("elementDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("elementDefs")[0].GetProperty("ordinal").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("elementDefs")[0].GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("serviceType").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("typeVersion").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef1").GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef1").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef1").GetProperty("isContainer").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef1").GetProperty("isLegacyAttribute").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef1").GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef1").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef2").GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef2").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef2").GetProperty("isContainer").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef2").GetProperty("isLegacyAttribute").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef2").GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef2").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("relationshipCategory").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("relationshipLabel").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("serviceType").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("typeVersion").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("serviceType").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("typeVersion").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); -]]> - - - -This sample shows how to call BatchCreate and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - -using RequestContent content = RequestContent.Create(new object()); -Response response = client.BatchCreate(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.ToString()); -]]> -This sample shows how to call BatchCreate with all request content and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - -using RequestContent content = RequestContent.Create(new -{ - businessMetadataDefs = new object[] - { - new - { - category = "PRIMITIVE", - createTime = 1234L, - createdBy = "", - dateFormatter = new - { - availableLocales = new object[] - { - "" - }, - calendar = 123.45F, - lenient = true, - numberFormat = new - { - availableLocales = new object[] - { - "" - }, - currency = "", - groupingUsed = true, - maximumFractionDigits = 1234, - maximumIntegerDigits = 1234, - minimumFractionDigits = 1234, - minimumIntegerDigits = 1234, - parseIntegerOnly = true, - roundingMode = "UP", - }, - timeZone = new Dictionary - { - ["dstSavings"] = 1234, - ["id"] = "", - ["availableIds"] = new object[] - { - "" - }, - ["default"] = null, - ["displayName"] = "", - ["rawOffset"] = 1234 - }, - }, - description = "", - guid = "", - name = "", - options = new - { - key = "", - }, - serviceType = "", - typeVersion = "", - updateTime = 1234L, - updatedBy = "", - version = 1234L, - lastModifiedTS = "", - attributeDefs = new object[] - { - new - { - cardinality = "SINGLE", - constraints = new object[] - { - new Dictionary - { - ["params"] = new - { - key = new object(), - }, - ["type"] = "" - } - }, - defaultValue = "", - description = "", - includeInNotification = true, - isIndexable = true, - isOptional = true, - isUnique = true, - name = "", - options = new - { - key = "", - }, - typeName = "", - valuesMaxCount = 1234, - valuesMinCount = 1234, - } - }, - } - }, - classificationDefs = new object[] - { - new - { - category = "PRIMITIVE", - createTime = 1234L, - createdBy = "", - description = "", - guid = "", - name = "", - options = new - { - key = "", - }, - serviceType = "", - typeVersion = "", - updateTime = 1234L, - updatedBy = "", - version = 1234L, - lastModifiedTS = "", - attributeDefs = new object[] - { - null - }, - entityTypes = new object[] - { - "" - }, - subTypes = new object[] - { - "" - }, - superTypes = new object[] - { - "" - }, - } - }, - entityDefs = new object[] - { - new - { - category = "PRIMITIVE", - createTime = 1234L, - createdBy = "", - description = "", - guid = "", - name = "", - options = new - { - key = "", - }, - serviceType = "", - typeVersion = "", - updateTime = 1234L, - updatedBy = "", - version = 1234L, - lastModifiedTS = "", - attributeDefs = new object[] - { - null - }, - subTypes = new object[] - { - "" - }, - superTypes = new object[] - { - "" - }, - relationshipAttributeDefs = new object[] - { - new - { - cardinality = "SINGLE", - constraints = new object[] - { - null - }, - defaultValue = "", - description = "", - includeInNotification = true, - isIndexable = true, - isOptional = true, - isUnique = true, - name = "", - options = new - { - key = "", - }, - typeName = "", - valuesMaxCount = 1234, - valuesMinCount = 1234, - isLegacyAttribute = true, - relationshipTypeName = "", - } - }, - } - }, - enumDefs = new object[] - { - new - { - category = "PRIMITIVE", - createTime = 1234L, - createdBy = "", - description = "", - guid = "", - name = "", - options = new - { - key = "", - }, - serviceType = "", - typeVersion = "", - updateTime = 1234L, - updatedBy = "", - version = 1234L, - lastModifiedTS = "", - defaultValue = "", - elementDefs = new object[] - { - new - { - description = "", - ordinal = 1234, - value = "", - } - }, - } - }, - relationshipDefs = new object[] - { - new - { - category = "PRIMITIVE", - createTime = 1234L, - createdBy = "", - description = "", - guid = "", - name = "", - options = new - { - key = "", - }, - serviceType = "", - typeVersion = "", - updateTime = 1234L, - updatedBy = "", - version = 1234L, - lastModifiedTS = "", - attributeDefs = new object[] - { - null - }, - endDef1 = new - { - cardinality = "SINGLE", - description = "", - isContainer = true, - isLegacyAttribute = true, - name = "", - type = "", - }, - relationshipCategory = "ASSOCIATION", - relationshipLabel = "", - } - }, - structDefs = new object[] - { - new - { - category = "PRIMITIVE", - createTime = 1234L, - createdBy = "", - description = "", - guid = "", - name = "", - options = new - { - key = "", - }, - serviceType = "", - typeVersion = "", - updateTime = 1234L, - updatedBy = "", - version = 1234L, - lastModifiedTS = "", - attributeDefs = new object[] - { - null - }, - } - }, - termTemplateDefs = new object[] - { - new - { - category = "PRIMITIVE", - createTime = 1234L, - createdBy = "", - description = "", - guid = "", - name = "", - options = new - { - key = "", - }, - serviceType = "", - typeVersion = "", - updateTime = 1234L, - updatedBy = "", - version = 1234L, - lastModifiedTS = "", - attributeDefs = new object[] - { - null - }, - } - }, -}); -Response response = client.BatchCreate(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("serviceType").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("typeVersion").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("serviceType").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("typeVersion").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("entityTypes")[0].ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("subTypes")[0].ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("superTypes")[0].ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("serviceType").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("typeVersion").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("subTypes")[0].ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("superTypes")[0].ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("includeInNotification").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("isIndexable").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("isOptional").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("isUnique").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("valuesMaxCount").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("valuesMinCount").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("isLegacyAttribute").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("relationshipTypeName").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("serviceType").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("typeVersion").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("elementDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("elementDefs")[0].GetProperty("ordinal").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("elementDefs")[0].GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("serviceType").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("typeVersion").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef1").GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef1").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef1").GetProperty("isContainer").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef1").GetProperty("isLegacyAttribute").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef1").GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef1").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef2").GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef2").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef2").GetProperty("isContainer").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef2").GetProperty("isLegacyAttribute").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef2").GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef2").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("relationshipCategory").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("relationshipLabel").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("serviceType").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("typeVersion").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("serviceType").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("typeVersion").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); -]]> - - - -This sample shows how to call BatchUpdateAsync. -"); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - -AtlasTypesDef body = new AtlasTypesDef(); -Response response = await client.BatchUpdateAsync(body); -]]> -This sample shows how to call BatchUpdateAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - -AtlasTypesDef body = new AtlasTypesDef -{ - BusinessMetadataDefs = {new AtlasBusinessMetadataDef - { - Category = TypeCategory.Primitive, - CreateTime = 1234L, - CreatedBy = "", - DateFormatter = new AtlasDateFormat - { - AvailableLocales = {""}, - Calendar = 123.45F, - DateInstance = default, - DateTimeInstance = default, - Instance = default, - Lenient = true, - NumberFormat = new AtlasNumberFormat - { - AvailableLocales = {""}, - Currency = "", - CurrencyInstance = default, - GroupingUsed = true, - Instance = default, - IntegerInstance = default, - MaximumFractionDigits = 1234, - MaximumIntegerDigits = 1234, - MinimumFractionDigits = 1234, - MinimumIntegerDigits = 1234, - NumberInstance = default, - ParseIntegerOnly = true, - PercentInstance = default, - RoundingMode = RoundingMode.Up, - }, - TimeInstance = default, - TimeZone = new AtlasTimeZone - { - DstSavings = 1234, - Id = "", - AvailableIds = {""}, - Default = default, - DisplayName = "", - RawOffset = 1234, - }, - }, - Description = "", - Guid = "", - Name = "", - Options = - { - ["key"] = "" - }, - ServiceType = "", - TypeVersion = "", - UpdateTime = 1234L, - UpdatedBy = "", - Version = 1234L, - LastModifiedTS = "", - AttributeDefs = {new AtlasAttributeDef - { - Cardinality = CardinalityValue.Single, - Constraints = {new AtlasConstraintDef - { - Params = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - Type = "", - }}, - DefaultValue = "", - Description = "", - IncludeInNotification = true, - IsIndexable = true, - IsOptional = true, - IsUnique = true, - Name = "", - Options = - { - ["key"] = "" - }, - TypeName = "", - ValuesMaxCount = 1234, - ValuesMinCount = 1234, - }}, - }}, - ClassificationDefs = {new AtlasClassificationDef - { - Category = TypeCategory.Primitive, - CreateTime = 1234L, - CreatedBy = "", - DateFormatter = default, - Description = "", - Guid = "", - Name = "", - Options = - { - ["key"] = "" - }, - ServiceType = "", - TypeVersion = "", - UpdateTime = 1234L, - UpdatedBy = "", - Version = 1234L, - LastModifiedTS = "", - AttributeDefs = {default}, - EntityTypes = {""}, - SubTypes = {""}, - SuperTypes = {""}, - }}, - EntityDefs = {new AtlasEntityDef - { - Category = TypeCategory.Primitive, - CreateTime = 1234L, - CreatedBy = "", - DateFormatter = default, - Description = "", - Guid = "", - Name = "", - Options = - { - ["key"] = "" - }, - ServiceType = "", - TypeVersion = "", - UpdateTime = 1234L, - UpdatedBy = "", - Version = 1234L, - LastModifiedTS = "", - AttributeDefs = {default}, - SubTypes = {""}, - SuperTypes = {""}, - RelationshipAttributeDefs = {new AtlasRelationshipAttributeDef - { - Cardinality = CardinalityValue.Single, - Constraints = {default}, - DefaultValue = "", - Description = "", - IncludeInNotification = true, - IsIndexable = true, - IsOptional = true, - IsUnique = true, - Name = "", - Options = - { - ["key"] = "" - }, - TypeName = "", - ValuesMaxCount = 1234, - ValuesMinCount = 1234, - IsLegacyAttribute = true, - RelationshipTypeName = "", - }}, - }}, - EnumDefs = {new AtlasEnumDef - { - Category = TypeCategory.Primitive, - CreateTime = 1234L, - CreatedBy = "", - DateFormatter = default, - Description = "", - Guid = "", - Name = "", - Options = - { - ["key"] = "" - }, - ServiceType = "", - TypeVersion = "", - UpdateTime = 1234L, - UpdatedBy = "", - Version = 1234L, - LastModifiedTS = "", - DefaultValue = "", - ElementDefs = {new AtlasEnumElementDef - { - Description = "", - Ordinal = 1234, - Value = "", - }}, - }}, - RelationshipDefs = {new AtlasRelationshipDef - { - Category = TypeCategory.Primitive, - CreateTime = 1234L, - CreatedBy = "", - DateFormatter = default, - Description = "", - Guid = "", - Name = "", - Options = - { - ["key"] = "" - }, - ServiceType = "", - TypeVersion = "", - UpdateTime = 1234L, - UpdatedBy = "", - Version = 1234L, - LastModifiedTS = "", - AttributeDefs = {default}, - EndDef1 = new AtlasRelationshipEndDef - { - Cardinality = CardinalityValue.Single, - Description = "", - IsContainer = true, - IsLegacyAttribute = true, - Name = "", - Type = "", - }, - EndDef2 = default, - RelationshipCategory = RelationshipCategory.Association, - RelationshipLabel = "", - }}, - StructDefs = {new AtlasStructDef - { - Category = TypeCategory.Primitive, - CreateTime = 1234L, - CreatedBy = "", - DateFormatter = default, - Description = "", - Guid = "", - Name = "", - Options = - { - ["key"] = "" - }, - ServiceType = "", - TypeVersion = "", - UpdateTime = 1234L, - UpdatedBy = "", - Version = 1234L, - LastModifiedTS = "", - AttributeDefs = {default}, - }}, - TermTemplateDefs = {new TermTemplateDef - { - Category = TypeCategory.Primitive, - CreateTime = 1234L, - CreatedBy = "", - DateFormatter = default, - Description = "", - Guid = "", - Name = "", - Options = - { - ["key"] = "" - }, - ServiceType = "", - TypeVersion = "", - UpdateTime = 1234L, - UpdatedBy = "", - Version = 1234L, - LastModifiedTS = "", - AttributeDefs = {default}, - }}, -}; -Response response = await client.BatchUpdateAsync(body); -]]> - - - -This sample shows how to call BatchUpdate. -"); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - -AtlasTypesDef body = new AtlasTypesDef(); -Response response = client.BatchUpdate(body); -]]> -This sample shows how to call BatchUpdate with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - -AtlasTypesDef body = new AtlasTypesDef -{ - BusinessMetadataDefs = {new AtlasBusinessMetadataDef - { - Category = TypeCategory.Primitive, - CreateTime = 1234L, - CreatedBy = "", - DateFormatter = new AtlasDateFormat - { - AvailableLocales = {""}, - Calendar = 123.45F, - DateInstance = default, - DateTimeInstance = default, - Instance = default, - Lenient = true, - NumberFormat = new AtlasNumberFormat - { - AvailableLocales = {""}, - Currency = "", - CurrencyInstance = default, - GroupingUsed = true, - Instance = default, - IntegerInstance = default, - MaximumFractionDigits = 1234, - MaximumIntegerDigits = 1234, - MinimumFractionDigits = 1234, - MinimumIntegerDigits = 1234, - NumberInstance = default, - ParseIntegerOnly = true, - PercentInstance = default, - RoundingMode = RoundingMode.Up, - }, - TimeInstance = default, - TimeZone = new AtlasTimeZone - { - DstSavings = 1234, - Id = "", - AvailableIds = {""}, - Default = default, - DisplayName = "", - RawOffset = 1234, - }, - }, - Description = "", - Guid = "", - Name = "", - Options = - { - ["key"] = "" - }, - ServiceType = "", - TypeVersion = "", - UpdateTime = 1234L, - UpdatedBy = "", - Version = 1234L, - LastModifiedTS = "", - AttributeDefs = {new AtlasAttributeDef - { - Cardinality = CardinalityValue.Single, - Constraints = {new AtlasConstraintDef - { - Params = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - Type = "", - }}, - DefaultValue = "", - Description = "", - IncludeInNotification = true, - IsIndexable = true, - IsOptional = true, - IsUnique = true, - Name = "", - Options = - { - ["key"] = "" - }, - TypeName = "", - ValuesMaxCount = 1234, - ValuesMinCount = 1234, - }}, - }}, - ClassificationDefs = {new AtlasClassificationDef - { - Category = TypeCategory.Primitive, - CreateTime = 1234L, - CreatedBy = "", - DateFormatter = default, - Description = "", - Guid = "", - Name = "", - Options = - { - ["key"] = "" - }, - ServiceType = "", - TypeVersion = "", - UpdateTime = 1234L, - UpdatedBy = "", - Version = 1234L, - LastModifiedTS = "", - AttributeDefs = {default}, - EntityTypes = {""}, - SubTypes = {""}, - SuperTypes = {""}, - }}, - EntityDefs = {new AtlasEntityDef - { - Category = TypeCategory.Primitive, - CreateTime = 1234L, - CreatedBy = "", - DateFormatter = default, - Description = "", - Guid = "", - Name = "", - Options = - { - ["key"] = "" - }, - ServiceType = "", - TypeVersion = "", - UpdateTime = 1234L, - UpdatedBy = "", - Version = 1234L, - LastModifiedTS = "", - AttributeDefs = {default}, - SubTypes = {""}, - SuperTypes = {""}, - RelationshipAttributeDefs = {new AtlasRelationshipAttributeDef - { - Cardinality = CardinalityValue.Single, - Constraints = {default}, - DefaultValue = "", - Description = "", - IncludeInNotification = true, - IsIndexable = true, - IsOptional = true, - IsUnique = true, - Name = "", - Options = - { - ["key"] = "" - }, - TypeName = "", - ValuesMaxCount = 1234, - ValuesMinCount = 1234, - IsLegacyAttribute = true, - RelationshipTypeName = "", - }}, - }}, - EnumDefs = {new AtlasEnumDef - { - Category = TypeCategory.Primitive, - CreateTime = 1234L, - CreatedBy = "", - DateFormatter = default, - Description = "", - Guid = "", - Name = "", - Options = - { - ["key"] = "" - }, - ServiceType = "", - TypeVersion = "", - UpdateTime = 1234L, - UpdatedBy = "", - Version = 1234L, - LastModifiedTS = "", - DefaultValue = "", - ElementDefs = {new AtlasEnumElementDef - { - Description = "", - Ordinal = 1234, - Value = "", - }}, - }}, - RelationshipDefs = {new AtlasRelationshipDef - { - Category = TypeCategory.Primitive, - CreateTime = 1234L, - CreatedBy = "", - DateFormatter = default, - Description = "", - Guid = "", - Name = "", - Options = - { - ["key"] = "" - }, - ServiceType = "", - TypeVersion = "", - UpdateTime = 1234L, - UpdatedBy = "", - Version = 1234L, - LastModifiedTS = "", - AttributeDefs = {default}, - EndDef1 = new AtlasRelationshipEndDef - { - Cardinality = CardinalityValue.Single, - Description = "", - IsContainer = true, - IsLegacyAttribute = true, - Name = "", - Type = "", - }, - EndDef2 = default, - RelationshipCategory = RelationshipCategory.Association, - RelationshipLabel = "", - }}, - StructDefs = {new AtlasStructDef - { - Category = TypeCategory.Primitive, - CreateTime = 1234L, - CreatedBy = "", - DateFormatter = default, - Description = "", - Guid = "", - Name = "", - Options = - { - ["key"] = "" - }, - ServiceType = "", - TypeVersion = "", - UpdateTime = 1234L, - UpdatedBy = "", - Version = 1234L, - LastModifiedTS = "", - AttributeDefs = {default}, - }}, - TermTemplateDefs = {new TermTemplateDef - { - Category = TypeCategory.Primitive, - CreateTime = 1234L, - CreatedBy = "", - DateFormatter = default, - Description = "", - Guid = "", - Name = "", - Options = - { - ["key"] = "" - }, - ServiceType = "", - TypeVersion = "", - UpdateTime = 1234L, - UpdatedBy = "", - Version = 1234L, - LastModifiedTS = "", - AttributeDefs = {default}, - }}, -}; -Response response = client.BatchUpdate(body); -]]> - - - -This sample shows how to call BatchUpdateAsync and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - -using RequestContent content = RequestContent.Create(new object()); -Response response = await client.BatchUpdateAsync(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.ToString()); -]]> -This sample shows how to call BatchUpdateAsync with all request content and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - -using RequestContent content = RequestContent.Create(new -{ - businessMetadataDefs = new object[] - { - new - { - category = "PRIMITIVE", - createTime = 1234L, - createdBy = "", - dateFormatter = new - { - availableLocales = new object[] - { - "" - }, - calendar = 123.45F, - lenient = true, - numberFormat = new - { - availableLocales = new object[] - { - "" - }, - currency = "", - groupingUsed = true, - maximumFractionDigits = 1234, - maximumIntegerDigits = 1234, - minimumFractionDigits = 1234, - minimumIntegerDigits = 1234, - parseIntegerOnly = true, - roundingMode = "UP", - }, - timeZone = new Dictionary - { - ["dstSavings"] = 1234, - ["id"] = "", - ["availableIds"] = new object[] - { - "" - }, - ["default"] = null, - ["displayName"] = "", - ["rawOffset"] = 1234 - }, - }, - description = "", - guid = "", - name = "", - options = new - { - key = "", - }, - serviceType = "", - typeVersion = "", - updateTime = 1234L, - updatedBy = "", - version = 1234L, - lastModifiedTS = "", - attributeDefs = new object[] - { - new - { - cardinality = "SINGLE", - constraints = new object[] - { - new Dictionary - { - ["params"] = new - { - key = new object(), - }, - ["type"] = "" - } - }, - defaultValue = "", - description = "", - includeInNotification = true, - isIndexable = true, - isOptional = true, - isUnique = true, - name = "", - options = new - { - key = "", - }, - typeName = "", - valuesMaxCount = 1234, - valuesMinCount = 1234, - } - }, - } - }, - classificationDefs = new object[] - { - new - { - category = "PRIMITIVE", - createTime = 1234L, - createdBy = "", - description = "", - guid = "", - name = "", - options = new - { - key = "", - }, - serviceType = "", - typeVersion = "", - updateTime = 1234L, - updatedBy = "", - version = 1234L, - lastModifiedTS = "", - attributeDefs = new object[] - { - null - }, - entityTypes = new object[] - { - "" - }, - subTypes = new object[] - { - "" - }, - superTypes = new object[] - { - "" - }, - } - }, - entityDefs = new object[] - { - new - { - category = "PRIMITIVE", - createTime = 1234L, - createdBy = "", - description = "", - guid = "", - name = "", - options = new - { - key = "", - }, - serviceType = "", - typeVersion = "", - updateTime = 1234L, - updatedBy = "", - version = 1234L, - lastModifiedTS = "", - attributeDefs = new object[] - { - null - }, - subTypes = new object[] - { - "" - }, - superTypes = new object[] - { - "" - }, - relationshipAttributeDefs = new object[] - { - new - { - cardinality = "SINGLE", - constraints = new object[] - { - null - }, - defaultValue = "", - description = "", - includeInNotification = true, - isIndexable = true, - isOptional = true, - isUnique = true, - name = "", - options = new - { - key = "", - }, - typeName = "", - valuesMaxCount = 1234, - valuesMinCount = 1234, - isLegacyAttribute = true, - relationshipTypeName = "", - } - }, - } - }, - enumDefs = new object[] + ClassificationDefs = { }, + EntityDefs = { }, + EnumDefs = { }, + RelationshipDefs = { }, + StructDefs = { }, +}; +Response response = client.BatchCreate(body); +]]> + + + +This sample shows how to call BatchCreateAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +using RequestContent content = RequestContent.Create(new +{ + enumDefs = Array.Empty(), + structDefs = Array.Empty(), + classificationDefs = Array.Empty(), + entityDefs = new object[] { new { - category = "PRIMITIVE", - createTime = 1234L, - createdBy = "", - description = "", - guid = "", - name = "", - options = new + name = "azure_sql_server_example", + superTypes = new object[] { - key = "", + "azure_resource" }, - serviceType = "", - typeVersion = "", - updateTime = 1234L, - updatedBy = "", - version = 1234L, - lastModifiedTS = "", - defaultValue = "", - elementDefs = new object[] + typeVersion = "1.0", + attributeDefs = new object[] { new { - description = "", - ordinal = 1234, - value = "", + name = "databases", + typeName = "array", + cardinality = "SET", + isIndexable = false, + isOptional = true, + isUnique = false, } }, } }, - relationshipDefs = new object[] - { - new - { - category = "PRIMITIVE", - createTime = 1234L, - createdBy = "", - description = "", - guid = "", - name = "", - options = new - { - key = "", - }, - serviceType = "", - typeVersion = "", - updateTime = 1234L, - updatedBy = "", - version = 1234L, - lastModifiedTS = "", - attributeDefs = new object[] - { - null - }, - endDef1 = new - { - cardinality = "SINGLE", - description = "", - isContainer = true, - isLegacyAttribute = true, - name = "", - type = "", - }, - relationshipCategory = "ASSOCIATION", - relationshipLabel = "", - } - }, - structDefs = new object[] - { - new - { - category = "PRIMITIVE", - createTime = 1234L, - createdBy = "", - description = "", - guid = "", - name = "", - options = new - { - key = "", - }, - serviceType = "", - typeVersion = "", - updateTime = 1234L, - updatedBy = "", - version = 1234L, - lastModifiedTS = "", - attributeDefs = new object[] - { - null - }, - } - }, - termTemplateDefs = new object[] - { - new - { - category = "PRIMITIVE", - createTime = 1234L, - createdBy = "", - description = "", - guid = "", - name = "", - options = new - { - key = "", - }, - serviceType = "", - typeVersion = "", - updateTime = 1234L, - updatedBy = "", - version = 1234L, - lastModifiedTS = "", - attributeDefs = new object[] - { - null - }, - } - }, + relationshipDefs = Array.Empty(), }); -Response response = await client.BatchUpdateAsync(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("serviceType").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("typeVersion").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("serviceType").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("typeVersion").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("entityTypes")[0].ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("subTypes")[0].ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("superTypes")[0].ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("serviceType").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("typeVersion").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("subTypes")[0].ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("superTypes")[0].ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("includeInNotification").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("isIndexable").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("isOptional").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("isUnique").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("valuesMaxCount").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("valuesMinCount").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("isLegacyAttribute").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("relationshipTypeName").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("serviceType").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("typeVersion").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("elementDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("elementDefs")[0].GetProperty("ordinal").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("elementDefs")[0].GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("serviceType").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("typeVersion").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef1").GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef1").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef1").GetProperty("isContainer").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef1").GetProperty("isLegacyAttribute").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef1").GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef1").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef2").GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef2").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef2").GetProperty("isContainer").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef2").GetProperty("isLegacyAttribute").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef2").GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef2").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("relationshipCategory").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("relationshipLabel").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("serviceType").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("typeVersion").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("serviceType").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("typeVersion").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); -]]> - - - -This sample shows how to call BatchUpdate and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - -using RequestContent content = RequestContent.Create(new object()); -Response response = client.BatchUpdate(content); +Response response = await client.BatchCreateAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call BatchUpdate with all request content and parse the result. +This sample shows how to call BatchCreateAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); using RequestContent content = RequestContent.Create(new { + enumDefs = Array.Empty(), + structDefs = Array.Empty(), + classificationDefs = Array.Empty(), + entityDefs = Array.Empty(), + relationshipDefs = Array.Empty(), businessMetadataDefs = new object[] { new { - category = "PRIMITIVE", - createTime = 1234L, - createdBy = "", - dateFormatter = new - { - availableLocales = new object[] - { - "" - }, - calendar = 123.45F, - lenient = true, - numberFormat = new - { - availableLocales = new object[] - { - "" - }, - currency = "", - groupingUsed = true, - maximumFractionDigits = 1234, - maximumIntegerDigits = 1234, - minimumFractionDigits = 1234, - minimumIntegerDigits = 1234, - parseIntegerOnly = true, - roundingMode = "UP", - }, - timeZone = new Dictionary - { - ["dstSavings"] = 1234, - ["id"] = "", - ["availableIds"] = new object[] - { - "" - }, - ["default"] = null, - ["displayName"] = "", - ["rawOffset"] = 1234 - }, - }, - description = "", - guid = "", - name = "", - options = new - { - key = "", - }, - serviceType = "", - typeVersion = "", - updateTime = 1234L, - updatedBy = "", - version = 1234L, - lastModifiedTS = "", + name = "myBizMetadata1", + description = "", attributeDefs = new object[] { new { + name = "bizAttr1", + typeName = "string", + isOptional = true, cardinality = "SINGLE", - constraints = new object[] - { - new Dictionary - { - ["params"] = new - { - key = new object(), - }, - ["type"] = "" - } - }, - defaultValue = "", - description = "", - includeInNotification = true, + isUnique = false, isIndexable = true, - isOptional = true, - isUnique = true, - name = "", options = new { - key = "", + maxStrLength = "50", + applicableEntityTypes = "[\"Path\"]", }, - typeName = "", - valuesMaxCount = 1234, - valuesMinCount = 1234, } }, } }, - classificationDefs = new object[] +}); +Response response = await client.BatchCreateAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> + + + +This sample shows how to call BatchCreate and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +using RequestContent content = RequestContent.Create(new +{ + enumDefs = Array.Empty(), + structDefs = Array.Empty(), + classificationDefs = Array.Empty(), + entityDefs = new object[] { new { - category = "PRIMITIVE", - createTime = 1234L, - createdBy = "", - description = "", - guid = "", - name = "", - options = new + name = "azure_sql_server_example", + superTypes = new object[] { - key = "", + "azure_resource" }, - serviceType = "", - typeVersion = "", - updateTime = 1234L, - updatedBy = "", - version = 1234L, - lastModifiedTS = "", + typeVersion = "1.0", attributeDefs = new object[] { - null - }, - entityTypes = new object[] - { - "" - }, - subTypes = new object[] - { - "" - }, - superTypes = new object[] - { - "" + new + { + name = "databases", + typeName = "array", + cardinality = "SET", + isIndexable = false, + isOptional = true, + isUnique = false, + } }, } }, - entityDefs = new object[] + relationshipDefs = Array.Empty(), +}); +Response response = client.BatchCreate(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call BatchCreate and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +using RequestContent content = RequestContent.Create(new +{ + enumDefs = Array.Empty(), + structDefs = Array.Empty(), + classificationDefs = Array.Empty(), + entityDefs = Array.Empty(), + relationshipDefs = Array.Empty(), + businessMetadataDefs = new object[] { new { - category = "PRIMITIVE", - createTime = 1234L, - createdBy = "", - description = "", - guid = "", - name = "", - options = new - { - key = "", - }, - serviceType = "", - typeVersion = "", - updateTime = 1234L, - updatedBy = "", - version = 1234L, - lastModifiedTS = "", + name = "myBizMetadata1", + description = "", attributeDefs = new object[] - { - null - }, - subTypes = new object[] - { - "" - }, - superTypes = new object[] - { - "" - }, - relationshipAttributeDefs = new object[] { new { + name = "bizAttr1", + typeName = "string", + isOptional = true, cardinality = "SINGLE", - constraints = new object[] - { - null - }, - defaultValue = "", - description = "", - includeInNotification = true, + isUnique = false, isIndexable = true, - isOptional = true, - isUnique = true, - name = "", options = new { - key = "", + maxStrLength = "50", + applicableEntityTypes = "[\"Path\"]", }, - typeName = "", - valuesMaxCount = 1234, - valuesMinCount = 1234, - isLegacyAttribute = true, - relationshipTypeName = "", - } - }, - } - }, - enumDefs = new object[] - { - new - { - category = "PRIMITIVE", - createTime = 1234L, - createdBy = "", - description = "", - guid = "", - name = "", - options = new - { - key = "", - }, - serviceType = "", - typeVersion = "", - updateTime = 1234L, - updatedBy = "", - version = 1234L, - lastModifiedTS = "", - defaultValue = "", - elementDefs = new object[] - { - new - { - description = "", - ordinal = 1234, - value = "", } }, } }, - relationshipDefs = new object[] - { - new - { - category = "PRIMITIVE", - createTime = 1234L, - createdBy = "", - description = "", - guid = "", - name = "", - options = new - { - key = "", - }, - serviceType = "", - typeVersion = "", - updateTime = 1234L, - updatedBy = "", - version = 1234L, - lastModifiedTS = "", - attributeDefs = new object[] - { - null - }, - endDef1 = new - { - cardinality = "SINGLE", - description = "", - isContainer = true, - isLegacyAttribute = true, - name = "", - type = "", - }, - relationshipCategory = "ASSOCIATION", - relationshipLabel = "", - } - }, - structDefs = new object[] - { - new - { - category = "PRIMITIVE", - createTime = 1234L, - createdBy = "", - description = "", - guid = "", - name = "", - options = new - { - key = "", - }, - serviceType = "", - typeVersion = "", - updateTime = 1234L, - updatedBy = "", - version = 1234L, - lastModifiedTS = "", - attributeDefs = new object[] - { - null - }, - } - }, - termTemplateDefs = new object[] - { - new - { - category = "PRIMITIVE", - createTime = 1234L, - createdBy = "", - description = "", - guid = "", - name = "", - options = new - { - key = "", - }, - serviceType = "", - typeVersion = "", - updateTime = 1234L, - updatedBy = "", - version = 1234L, - lastModifiedTS = "", - attributeDefs = new object[] - { - null - }, - } - }, }); -Response response = client.BatchUpdate(content); +Response response = client.BatchCreate(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("serviceType").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("typeVersion").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("serviceType").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("typeVersion").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("entityTypes")[0].ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("subTypes")[0].ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("superTypes")[0].ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("serviceType").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("typeVersion").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("subTypes")[0].ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("superTypes")[0].ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("includeInNotification").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("isIndexable").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("isOptional").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("isUnique").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("valuesMaxCount").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("valuesMinCount").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("isLegacyAttribute").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("relationshipTypeName").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("serviceType").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("typeVersion").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("elementDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("elementDefs")[0].GetProperty("ordinal").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("elementDefs")[0].GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("serviceType").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("typeVersion").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef1").GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef1").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef1").GetProperty("isContainer").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef1").GetProperty("isLegacyAttribute").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef1").GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef1").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef2").GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef2").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef2").GetProperty("isContainer").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef2").GetProperty("isLegacyAttribute").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef2").GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef2").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("relationshipCategory").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("relationshipLabel").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("serviceType").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("typeVersion").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("serviceType").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("typeVersion").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); +Console.WriteLine(result.ToString()); ]]> - + -This sample shows how to call BatchDeleteAsync. -"); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - -AtlasTypesDef body = new AtlasTypesDef(); -Response response = await client.BatchDeleteAsync(body); -]]> -This sample shows how to call BatchDeleteAsync with all parameters. +This sample shows how to call BatchUpdateAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); AtlasTypesDef body = new AtlasTypesDef { - BusinessMetadataDefs = {new AtlasBusinessMetadataDef + ClassificationDefs = { }, + EntityDefs = {new AtlasEntityDef { - Category = TypeCategory.Primitive, - CreateTime = 1234L, - CreatedBy = "", - DateFormatter = new AtlasDateFormat - { - AvailableLocales = {""}, - Calendar = 123.45F, - DateInstance = default, - DateTimeInstance = default, - Instance = default, - Lenient = true, - NumberFormat = new AtlasNumberFormat - { - AvailableLocales = {""}, - Currency = "", - CurrencyInstance = default, - GroupingUsed = true, - Instance = default, - IntegerInstance = default, - MaximumFractionDigits = 1234, - MaximumIntegerDigits = 1234, - MinimumFractionDigits = 1234, - MinimumIntegerDigits = 1234, - NumberInstance = default, - ParseIntegerOnly = true, - PercentInstance = default, - RoundingMode = RoundingMode.Up, - }, - TimeInstance = default, - TimeZone = new AtlasTimeZone - { - DstSavings = 1234, - Id = "", - AvailableIds = {""}, - Default = default, - DisplayName = "", - RawOffset = 1234, - }, - }, - Description = "", - Guid = "", - Name = "", - Options = + Name = "azure_sql_server", + TypeVersion = "1.0", + AttributeDefs = {new AtlasAttributeDef { - ["key"] = "" - }, - ServiceType = "", - TypeVersion = "", - UpdateTime = 1234L, - UpdatedBy = "", - Version = 1234L, - LastModifiedTS = "", + Cardinality = CardinalityValue.Set, + IsIndexable = false, + IsOptional = true, + IsUnique = false, + Name = "databases", + TypeName = "array", + }}, + SuperTypes = {"azure_resource"}, + }, new AtlasEntityDef + { + Name = "azure_sql_db", + TypeVersion = "1.0", AttributeDefs = {new AtlasAttributeDef { Cardinality = CardinalityValue.Single, @@ -7343,273 +1203,120 @@ AtlasTypesDef body = new AtlasTypesDef { Params = { - ["key"] = BinaryData.FromObjectAsJson(new object()) + ["attribute"] = BinaryData.FromObjectAsJson("databases") }, - Type = "", + Type = "inverseRef", }}, - DefaultValue = "", - Description = "", - IncludeInNotification = true, - IsIndexable = true, + IsIndexable = false, + IsOptional = false, + IsUnique = false, + Name = "server", + TypeName = "azure_sql_server", + }, new AtlasAttributeDef + { + Cardinality = CardinalityValue.Set, + IsIndexable = false, IsOptional = true, - IsUnique = true, - Name = "", - Options = - { - ["key"] = "" - }, - TypeName = "", - ValuesMaxCount = 1234, - ValuesMinCount = 1234, - }}, - }}, - ClassificationDefs = {new AtlasClassificationDef - { - Category = TypeCategory.Primitive, - CreateTime = 1234L, - CreatedBy = "", - DateFormatter = default, - Description = "", - Guid = "", - Name = "", - Options = - { - ["key"] = "" - }, - ServiceType = "", - TypeVersion = "", - UpdateTime = 1234L, - UpdatedBy = "", - Version = 1234L, - LastModifiedTS = "", - AttributeDefs = {default}, - EntityTypes = {""}, - SubTypes = {""}, - SuperTypes = {""}, - }}, - EntityDefs = {new AtlasEntityDef - { - Category = TypeCategory.Primitive, - CreateTime = 1234L, - CreatedBy = "", - DateFormatter = default, - Description = "", - Guid = "", - Name = "", - Options = - { - ["key"] = "" - }, - ServiceType = "", - TypeVersion = "", - UpdateTime = 1234L, - UpdatedBy = "", - Version = 1234L, - LastModifiedTS = "", - AttributeDefs = {default}, - SubTypes = {""}, - SuperTypes = {""}, - RelationshipAttributeDefs = {new AtlasRelationshipAttributeDef + IsUnique = false, + Name = "schemas", + TypeName = "array", + }, new AtlasAttributeDef { Cardinality = CardinalityValue.Single, - Constraints = {default}, - DefaultValue = "", - Description = "", - IncludeInNotification = true, - IsIndexable = true, - IsOptional = true, - IsUnique = true, - Name = "", - Options = - { - ["key"] = "" - }, - TypeName = "", - ValuesMaxCount = 1234, - ValuesMinCount = 1234, - IsLegacyAttribute = true, - RelationshipTypeName = "", - }}, - }}, - EnumDefs = {new AtlasEnumDef - { - Category = TypeCategory.Primitive, - CreateTime = 1234L, - CreatedBy = "", - DateFormatter = default, - Description = "", - Guid = "", - Name = "", - Options = - { - ["key"] = "" - }, - ServiceType = "", - TypeVersion = "", - UpdateTime = 1234L, - UpdatedBy = "", - Version = 1234L, - LastModifiedTS = "", - DefaultValue = "", - ElementDefs = {new AtlasEnumElementDef + IsIndexable = false, + IsOptional = true, + IsUnique = false, + Name = "collation", + TypeName = "string", + }, new AtlasAttributeDef { - Description = "", - Ordinal = 1234, - Value = "", + Cardinality = CardinalityValue.Single, + IsIndexable = false, + IsOptional = true, + IsUnique = false, + Name = "compatibilityLevel", + TypeName = "int", }}, + SuperTypes = {"azure_resource"}, }}, + EnumDefs = { }, RelationshipDefs = {new AtlasRelationshipDef { - Category = TypeCategory.Primitive, - CreateTime = 1234L, - CreatedBy = "", - DateFormatter = default, - Description = "", - Guid = "", - Name = "", - Options = + Name = "azure_sql_server_databases", + TypeVersion = "1.0", + EndDef1 = new AtlasRelationshipEndDef { - ["key"] = "" + Cardinality = CardinalityValue.Set, + IsContainer = true, + IsLegacyAttribute = true, + Name = "databases", + Type = "azure_sql_server", }, - ServiceType = "", - TypeVersion = "", - UpdateTime = 1234L, - UpdatedBy = "", - Version = 1234L, - LastModifiedTS = "", - AttributeDefs = {default}, - EndDef1 = new AtlasRelationshipEndDef + EndDef2 = new AtlasRelationshipEndDef { Cardinality = CardinalityValue.Single, - Description = "", - IsContainer = true, + IsContainer = false, IsLegacyAttribute = true, - Name = "", - Type = "", + Name = "server", + Type = "azure_sql_db", }, - EndDef2 = default, - RelationshipCategory = RelationshipCategory.Association, - RelationshipLabel = "", - }}, - StructDefs = {new AtlasStructDef + RelationshipCategory = RelationshipCategory.Composition, + }, new AtlasRelationshipDef { - Category = TypeCategory.Primitive, - CreateTime = 1234L, - CreatedBy = "", - DateFormatter = default, - Description = "", - Guid = "", - Name = "", - Options = + Name = "azure_sql_db_schemas", + TypeVersion = "1.0", + EndDef1 = new AtlasRelationshipEndDef { - ["key"] = "" + Cardinality = CardinalityValue.Set, + IsContainer = true, + IsLegacyAttribute = true, + Name = "schemas", + Type = "azure_sql_db", }, - ServiceType = "", - TypeVersion = "", - UpdateTime = 1234L, - UpdatedBy = "", - Version = 1234L, - LastModifiedTS = "", - AttributeDefs = {default}, - }}, - TermTemplateDefs = {new TermTemplateDef - { - Category = TypeCategory.Primitive, - CreateTime = 1234L, - CreatedBy = "", - DateFormatter = default, - Description = "", - Guid = "", - Name = "", - Options = + EndDef2 = new AtlasRelationshipEndDef { - ["key"] = "" + Cardinality = CardinalityValue.Single, + IsContainer = false, + IsLegacyAttribute = true, + Name = "db", + Type = "azure_sql_schema", }, - ServiceType = "", - TypeVersion = "", - UpdateTime = 1234L, - UpdatedBy = "", - Version = 1234L, - LastModifiedTS = "", - AttributeDefs = {default}, + RelationshipCategory = RelationshipCategory.Composition, }}, + StructDefs = { }, }; -Response response = await client.BatchDeleteAsync(body); +Response response = await client.BatchUpdateAsync(body); ]]> - + -This sample shows how to call BatchDelete. -"); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - -AtlasTypesDef body = new AtlasTypesDef(); -Response response = client.BatchDelete(body); -]]> -This sample shows how to call BatchDelete with all parameters. +This sample shows how to call BatchUpdate. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); AtlasTypesDef body = new AtlasTypesDef { - BusinessMetadataDefs = {new AtlasBusinessMetadataDef + ClassificationDefs = { }, + EntityDefs = {new AtlasEntityDef { - Category = TypeCategory.Primitive, - CreateTime = 1234L, - CreatedBy = "", - DateFormatter = new AtlasDateFormat - { - AvailableLocales = {""}, - Calendar = 123.45F, - DateInstance = default, - DateTimeInstance = default, - Instance = default, - Lenient = true, - NumberFormat = new AtlasNumberFormat - { - AvailableLocales = {""}, - Currency = "", - CurrencyInstance = default, - GroupingUsed = true, - Instance = default, - IntegerInstance = default, - MaximumFractionDigits = 1234, - MaximumIntegerDigits = 1234, - MinimumFractionDigits = 1234, - MinimumIntegerDigits = 1234, - NumberInstance = default, - ParseIntegerOnly = true, - PercentInstance = default, - RoundingMode = RoundingMode.Up, - }, - TimeInstance = default, - TimeZone = new AtlasTimeZone - { - DstSavings = 1234, - Id = "", - AvailableIds = {""}, - Default = default, - DisplayName = "", - RawOffset = 1234, - }, - }, - Description = "", - Guid = "", - Name = "", - Options = + Name = "azure_sql_server", + TypeVersion = "1.0", + AttributeDefs = {new AtlasAttributeDef { - ["key"] = "" - }, - ServiceType = "", - TypeVersion = "", - UpdateTime = 1234L, - UpdatedBy = "", - Version = 1234L, - LastModifiedTS = "", + Cardinality = CardinalityValue.Set, + IsIndexable = false, + IsOptional = true, + IsUnique = false, + Name = "databases", + TypeName = "array", + }}, + SuperTypes = {"azure_resource"}, + }, new AtlasEntityDef + { + Name = "azure_sql_db", + TypeVersion = "1.0", AttributeDefs = {new AtlasAttributeDef { Cardinality = CardinalityValue.Single, @@ -7617,775 +1324,333 @@ AtlasTypesDef body = new AtlasTypesDef { Params = { - ["key"] = BinaryData.FromObjectAsJson(new object()) + ["attribute"] = BinaryData.FromObjectAsJson("databases") }, - Type = "", + Type = "inverseRef", }}, - DefaultValue = "", - Description = "", - IncludeInNotification = true, - IsIndexable = true, + IsIndexable = false, + IsOptional = false, + IsUnique = false, + Name = "server", + TypeName = "azure_sql_server", + }, new AtlasAttributeDef + { + Cardinality = CardinalityValue.Set, + IsIndexable = false, IsOptional = true, - IsUnique = true, - Name = "", - Options = - { - ["key"] = "" - }, - TypeName = "", - ValuesMaxCount = 1234, - ValuesMinCount = 1234, - }}, - }}, - ClassificationDefs = {new AtlasClassificationDef - { - Category = TypeCategory.Primitive, - CreateTime = 1234L, - CreatedBy = "", - DateFormatter = default, - Description = "", - Guid = "", - Name = "", - Options = - { - ["key"] = "" - }, - ServiceType = "", - TypeVersion = "", - UpdateTime = 1234L, - UpdatedBy = "", - Version = 1234L, - LastModifiedTS = "", - AttributeDefs = {default}, - EntityTypes = {""}, - SubTypes = {""}, - SuperTypes = {""}, - }}, - EntityDefs = {new AtlasEntityDef - { - Category = TypeCategory.Primitive, - CreateTime = 1234L, - CreatedBy = "", - DateFormatter = default, - Description = "", - Guid = "", - Name = "", - Options = - { - ["key"] = "" - }, - ServiceType = "", - TypeVersion = "", - UpdateTime = 1234L, - UpdatedBy = "", - Version = 1234L, - LastModifiedTS = "", - AttributeDefs = {default}, - SubTypes = {""}, - SuperTypes = {""}, - RelationshipAttributeDefs = {new AtlasRelationshipAttributeDef + IsUnique = false, + Name = "schemas", + TypeName = "array", + }, new AtlasAttributeDef { Cardinality = CardinalityValue.Single, - Constraints = {default}, - DefaultValue = "", - Description = "", - IncludeInNotification = true, - IsIndexable = true, + IsIndexable = false, IsOptional = true, - IsUnique = true, - Name = "", - Options = - { - ["key"] = "" - }, - TypeName = "", - ValuesMaxCount = 1234, - ValuesMinCount = 1234, - IsLegacyAttribute = true, - RelationshipTypeName = "", - }}, - }}, - EnumDefs = {new AtlasEnumDef - { - Category = TypeCategory.Primitive, - CreateTime = 1234L, - CreatedBy = "", - DateFormatter = default, - Description = "", - Guid = "", - Name = "", - Options = - { - ["key"] = "" - }, - ServiceType = "", - TypeVersion = "", - UpdateTime = 1234L, - UpdatedBy = "", - Version = 1234L, - LastModifiedTS = "", - DefaultValue = "", - ElementDefs = {new AtlasEnumElementDef + IsUnique = false, + Name = "collation", + TypeName = "string", + }, new AtlasAttributeDef { - Description = "", - Ordinal = 1234, - Value = "", + Cardinality = CardinalityValue.Single, + IsIndexable = false, + IsOptional = true, + IsUnique = false, + Name = "compatibilityLevel", + TypeName = "int", }}, + SuperTypes = {"azure_resource"}, }}, + EnumDefs = { }, RelationshipDefs = {new AtlasRelationshipDef { - Category = TypeCategory.Primitive, - CreateTime = 1234L, - CreatedBy = "", - DateFormatter = default, - Description = "", - Guid = "", - Name = "", - Options = + Name = "azure_sql_server_databases", + TypeVersion = "1.0", + EndDef1 = new AtlasRelationshipEndDef { - ["key"] = "" + Cardinality = CardinalityValue.Set, + IsContainer = true, + IsLegacyAttribute = true, + Name = "databases", + Type = "azure_sql_server", }, - ServiceType = "", - TypeVersion = "", - UpdateTime = 1234L, - UpdatedBy = "", - Version = 1234L, - LastModifiedTS = "", - AttributeDefs = {default}, - EndDef1 = new AtlasRelationshipEndDef + EndDef2 = new AtlasRelationshipEndDef { Cardinality = CardinalityValue.Single, - Description = "", - IsContainer = true, + IsContainer = false, IsLegacyAttribute = true, - Name = "", - Type = "", + Name = "server", + Type = "azure_sql_db", }, - EndDef2 = default, - RelationshipCategory = RelationshipCategory.Association, - RelationshipLabel = "", - }}, - StructDefs = {new AtlasStructDef + RelationshipCategory = RelationshipCategory.Composition, + }, new AtlasRelationshipDef { - Category = TypeCategory.Primitive, - CreateTime = 1234L, - CreatedBy = "", - DateFormatter = default, - Description = "", - Guid = "", - Name = "", - Options = + Name = "azure_sql_db_schemas", + TypeVersion = "1.0", + EndDef1 = new AtlasRelationshipEndDef { - ["key"] = "" + Cardinality = CardinalityValue.Set, + IsContainer = true, + IsLegacyAttribute = true, + Name = "schemas", + Type = "azure_sql_db", }, - ServiceType = "", - TypeVersion = "", - UpdateTime = 1234L, - UpdatedBy = "", - Version = 1234L, - LastModifiedTS = "", - AttributeDefs = {default}, - }}, - TermTemplateDefs = {new TermTemplateDef - { - Category = TypeCategory.Primitive, - CreateTime = 1234L, - CreatedBy = "", - DateFormatter = default, - Description = "", - Guid = "", - Name = "", - Options = + EndDef2 = new AtlasRelationshipEndDef { - ["key"] = "" + Cardinality = CardinalityValue.Single, + IsContainer = false, + IsLegacyAttribute = true, + Name = "db", + Type = "azure_sql_schema", }, - ServiceType = "", - TypeVersion = "", - UpdateTime = 1234L, - UpdatedBy = "", - Version = 1234L, - LastModifiedTS = "", - AttributeDefs = {default}, + RelationshipCategory = RelationshipCategory.Composition, }}, + StructDefs = { }, }; -Response response = client.BatchDelete(body); +Response response = client.BatchUpdate(body); ]]> - + -This sample shows how to call BatchDeleteAsync. -"); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - -using RequestContent content = RequestContent.Create(new object()); -Response response = await client.BatchDeleteAsync(content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call BatchDeleteAsync with all request content. +This sample shows how to call BatchUpdateAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); using RequestContent content = RequestContent.Create(new { - businessMetadataDefs = new object[] + enumDefs = Array.Empty(), + structDefs = Array.Empty(), + classificationDefs = Array.Empty(), + entityDefs = new object[] { new { - category = "PRIMITIVE", - createTime = 1234L, - createdBy = "", - dateFormatter = new - { - availableLocales = new object[] - { - "" - }, - calendar = 123.45F, - lenient = true, - numberFormat = new - { - availableLocales = new object[] - { - "" - }, - currency = "", - groupingUsed = true, - maximumFractionDigits = 1234, - maximumIntegerDigits = 1234, - minimumFractionDigits = 1234, - minimumIntegerDigits = 1234, - parseIntegerOnly = true, - roundingMode = "UP", - }, - timeZone = new Dictionary - { - ["dstSavings"] = 1234, - ["id"] = "", - ["availableIds"] = new object[] - { - "" - }, - ["default"] = null, - ["displayName"] = "", - ["rawOffset"] = 1234 - }, - }, - description = "", - guid = "", - name = "", - options = new + name = "azure_sql_server", + superTypes = new object[] { - key = "", + "azure_resource" }, - serviceType = "", - typeVersion = "", - updateTime = 1234L, - updatedBy = "", - version = 1234L, - lastModifiedTS = "", + typeVersion = "1.0", attributeDefs = new object[] { new { - cardinality = "SINGLE", - constraints = new object[] - { - new Dictionary - { - ["params"] = new - { - key = new object(), - }, - ["type"] = "" - } - }, - defaultValue = "", - description = "", - includeInNotification = true, - isIndexable = true, + name = "databases", + typeName = "array", + cardinality = "SET", + isIndexable = false, isOptional = true, - isUnique = true, - name = "", - options = new - { - key = "", - }, - typeName = "", - valuesMaxCount = 1234, - valuesMinCount = 1234, + isUnique = false, } }, - } - }, - classificationDefs = new object[] - { + }, new { - category = "PRIMITIVE", - createTime = 1234L, - createdBy = "", - description = "", - guid = "", - name = "", - options = new - { - key = "", - }, - serviceType = "", - typeVersion = "", - updateTime = 1234L, - updatedBy = "", - version = 1234L, - lastModifiedTS = "", - attributeDefs = new object[] - { - null - }, - entityTypes = new object[] - { - "" - }, - subTypes = new object[] - { - "" - }, + name = "azure_sql_db", superTypes = new object[] { - "" - }, - } - }, - entityDefs = new object[] - { - new - { - category = "PRIMITIVE", - createTime = 1234L, - createdBy = "", - description = "", - guid = "", - name = "", - options = new - { - key = "", + "azure_resource" }, - serviceType = "", - typeVersion = "", - updateTime = 1234L, - updatedBy = "", - version = 1234L, - lastModifiedTS = "", + typeVersion = "1.0", attributeDefs = new object[] - { - null - }, - subTypes = new object[] - { - "" - }, - superTypes = new object[] - { - "" - }, - relationshipAttributeDefs = new object[] { new { + name = "server", + typeName = "azure_sql_server", cardinality = "SINGLE", constraints = new object[] { - null - }, - defaultValue = "", - description = "", - includeInNotification = true, - isIndexable = true, - isOptional = true, - isUnique = true, - name = "", - options = new - { - key = "", + new Dictionary + { + ["type"] = "inverseRef", + ["params"] = new + { + attribute = "databases", + } + } }, - typeName = "", - valuesMaxCount = 1234, - valuesMinCount = 1234, - isLegacyAttribute = true, - relationshipTypeName = "", - } - }, - } - }, - enumDefs = new object[] - { - new - { - category = "PRIMITIVE", - createTime = 1234L, - createdBy = "", - description = "", - guid = "", - name = "", - options = new - { - key = "", - }, - serviceType = "", - typeVersion = "", - updateTime = 1234L, - updatedBy = "", - version = 1234L, - lastModifiedTS = "", - defaultValue = "", - elementDefs = new object[] - { - new - { - description = "", - ordinal = 1234, - value = "", - } - }, - } - }, - relationshipDefs = new object[] - { - new - { - category = "PRIMITIVE", - createTime = 1234L, - createdBy = "", - description = "", - guid = "", - name = "", - options = new - { - key = "", - }, - serviceType = "", - typeVersion = "", - updateTime = 1234L, - updatedBy = "", - version = 1234L, - lastModifiedTS = "", - attributeDefs = new object[] - { - null - }, - endDef1 = new - { - cardinality = "SINGLE", - description = "", - isContainer = true, - isLegacyAttribute = true, - name = "", - type = "", - }, - relationshipCategory = "ASSOCIATION", - relationshipLabel = "", - } - }, - structDefs = new object[] - { - new - { - category = "PRIMITIVE", - createTime = 1234L, - createdBy = "", - description = "", - guid = "", - name = "", - options = new - { - key = "", - }, - serviceType = "", - typeVersion = "", - updateTime = 1234L, - updatedBy = "", - version = 1234L, - lastModifiedTS = "", - attributeDefs = new object[] - { - null - }, - } - }, - termTemplateDefs = new object[] - { - new - { - category = "PRIMITIVE", - createTime = 1234L, - createdBy = "", - description = "", - guid = "", - name = "", - options = new - { - key = "", - }, - serviceType = "", - typeVersion = "", - updateTime = 1234L, - updatedBy = "", - version = 1234L, - lastModifiedTS = "", - attributeDefs = new object[] - { - null - }, - } - }, -}); -Response response = await client.BatchDeleteAsync(content); - -Console.WriteLine(response.Status); -]]> - - - -This sample shows how to call BatchDelete. -"); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - -using RequestContent content = RequestContent.Create(new object()); -Response response = client.BatchDelete(content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call BatchDelete with all request content. -"); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - -using RequestContent content = RequestContent.Create(new -{ - businessMetadataDefs = new object[] - { - new - { - category = "PRIMITIVE", - createTime = 1234L, - createdBy = "", - dateFormatter = new - { - availableLocales = new object[] - { - "" + isIndexable = false, + isOptional = false, + isUnique = false, }, - calendar = 123.45F, - lenient = true, - numberFormat = new + new { - availableLocales = new object[] - { - "" - }, - currency = "", - groupingUsed = true, - maximumFractionDigits = 1234, - maximumIntegerDigits = 1234, - minimumFractionDigits = 1234, - minimumIntegerDigits = 1234, - parseIntegerOnly = true, - roundingMode = "UP", + name = "schemas", + typeName = "array", + cardinality = "SET", + isIndexable = false, + isOptional = true, + isUnique = false, }, - timeZone = new Dictionary + new { - ["dstSavings"] = 1234, - ["id"] = "", - ["availableIds"] = new object[] - { - "" - }, - ["default"] = null, - ["displayName"] = "", - ["rawOffset"] = 1234 + name = "collation", + typeName = "string", + cardinality = "SINGLE", + isIndexable = false, + isOptional = true, + isUnique = false, }, - }, - description = "", - guid = "", - name = "", - options = new - { - key = "", - }, - serviceType = "", - typeVersion = "", - updateTime = 1234L, - updatedBy = "", - version = 1234L, - lastModifiedTS = "", - attributeDefs = new object[] - { new { + name = "compatibilityLevel", + typeName = "int", cardinality = "SINGLE", - constraints = new object[] - { - new Dictionary - { - ["params"] = new - { - key = new object(), - }, - ["type"] = "" - } - }, - defaultValue = "", - description = "", - includeInNotification = true, - isIndexable = true, + isIndexable = false, isOptional = true, - isUnique = true, - name = "", - options = new - { - key = "", - }, - typeName = "", - valuesMaxCount = 1234, - valuesMinCount = 1234, + isUnique = false, } }, } }, - classificationDefs = new object[] + relationshipDefs = new object[] { new { - category = "PRIMITIVE", - createTime = 1234L, - createdBy = "", - description = "", - guid = "", - name = "", - options = new - { - key = "", - }, - serviceType = "", - typeVersion = "", - updateTime = 1234L, - updatedBy = "", - version = 1234L, - lastModifiedTS = "", - attributeDefs = new object[] + name = "azure_sql_server_databases", + typeVersion = "1.0", + relationshipCategory = "COMPOSITION", + endDef1 = new { - null + type = "azure_sql_server", + name = "databases", + isContainer = true, + cardinality = "SET", + isLegacyAttribute = true, }, - entityTypes = new object[] + endDef2 = new { - "" + type = "azure_sql_db", + name = "server", + isContainer = false, + cardinality = "SINGLE", + isLegacyAttribute = true, }, - subTypes = new object[] + }, + new + { + name = "azure_sql_db_schemas", + typeVersion = "1.0", + relationshipCategory = "COMPOSITION", + endDef1 = new { - "" + type = "azure_sql_db", + name = "schemas", + isContainer = true, + cardinality = "SET", + isLegacyAttribute = true, }, - superTypes = new object[] + endDef2 = new { - "" + type = "azure_sql_schema", + name = "db", + isContainer = false, + cardinality = "SINGLE", + isLegacyAttribute = true, }, } }, +}); +Response response = await client.BatchUpdateAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> + + + +This sample shows how to call BatchUpdate and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +using RequestContent content = RequestContent.Create(new +{ + enumDefs = Array.Empty(), + structDefs = Array.Empty(), + classificationDefs = Array.Empty(), entityDefs = new object[] { new { - category = "PRIMITIVE", - createTime = 1234L, - createdBy = "", - description = "", - guid = "", - name = "", - options = new + name = "azure_sql_server", + superTypes = new object[] { - key = "", + "azure_resource" }, - serviceType = "", - typeVersion = "", - updateTime = 1234L, - updatedBy = "", - version = 1234L, - lastModifiedTS = "", + typeVersion = "1.0", attributeDefs = new object[] { - null - }, - subTypes = new object[] - { - "" + new + { + name = "databases", + typeName = "array", + cardinality = "SET", + isIndexable = false, + isOptional = true, + isUnique = false, + } }, + }, + new + { + name = "azure_sql_db", superTypes = new object[] { - "" + "azure_resource" }, - relationshipAttributeDefs = new object[] + typeVersion = "1.0", + attributeDefs = new object[] { new { + name = "server", + typeName = "azure_sql_server", cardinality = "SINGLE", constraints = new object[] { - null + new Dictionary + { + ["type"] = "inverseRef", + ["params"] = new + { + attribute = "databases", + } + } }, - defaultValue = "", - description = "", - includeInNotification = true, - isIndexable = true, + isIndexable = false, + isOptional = false, + isUnique = false, + }, + new + { + name = "schemas", + typeName = "array", + cardinality = "SET", + isIndexable = false, isOptional = true, - isUnique = true, - name = "", - options = new - { - key = "", - }, - typeName = "", - valuesMaxCount = 1234, - valuesMinCount = 1234, - isLegacyAttribute = true, - relationshipTypeName = "", - } - }, - } - }, - enumDefs = new object[] - { - new - { - category = "PRIMITIVE", - createTime = 1234L, - createdBy = "", - description = "", - guid = "", - name = "", - options = new - { - key = "", - }, - serviceType = "", - typeVersion = "", - updateTime = 1234L, - updatedBy = "", - version = 1234L, - lastModifiedTS = "", - defaultValue = "", - elementDefs = new object[] - { + isUnique = false, + }, new { - description = "", - ordinal = 1234, - value = "", + name = "collation", + typeName = "string", + cardinality = "SINGLE", + isIndexable = false, + isOptional = true, + isUnique = false, + }, + new + { + name = "compatibilityLevel", + typeName = "int", + cardinality = "SINGLE", + isIndexable = false, + isOptional = true, + isUnique = false, } }, } @@ -8394,91 +1659,204 @@ using RequestContent content = RequestContent.Create(new { new { - category = "PRIMITIVE", - createTime = 1234L, - createdBy = "", - description = "", - guid = "", - name = "", - options = new + name = "azure_sql_server_databases", + typeVersion = "1.0", + relationshipCategory = "COMPOSITION", + endDef1 = new { - key = "", + type = "azure_sql_server", + name = "databases", + isContainer = true, + cardinality = "SET", + isLegacyAttribute = true, }, - serviceType = "", - typeVersion = "", - updateTime = 1234L, - updatedBy = "", - version = 1234L, - lastModifiedTS = "", - attributeDefs = new object[] + endDef2 = new { - null + type = "azure_sql_db", + name = "server", + isContainer = false, + cardinality = "SINGLE", + isLegacyAttribute = true, }, + }, + new + { + name = "azure_sql_db_schemas", + typeVersion = "1.0", + relationshipCategory = "COMPOSITION", endDef1 = new { - cardinality = "SINGLE", - description = "", + type = "azure_sql_db", + name = "schemas", isContainer = true, + cardinality = "SET", + isLegacyAttribute = true, + }, + endDef2 = new + { + type = "azure_sql_schema", + name = "db", + isContainer = false, + cardinality = "SINGLE", isLegacyAttribute = true, - name = "", - type = "", }, - relationshipCategory = "ASSOCIATION", - relationshipLabel = "", } }, - structDefs = new object[] +}); +Response response = client.BatchUpdate(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> + + + +This sample shows how to call BatchDeleteAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +AtlasTypesDef body = new AtlasTypesDef +{ + ClassificationDefs = { }, + EntityDefs = {new AtlasEntityDef + { + Name = "azure_sql_server_example", + TypeVersion = "1.0", + AttributeDefs = {new AtlasAttributeDef + { + Cardinality = CardinalityValue.Set, + IsIndexable = false, + IsOptional = true, + IsUnique = false, + Name = "databases", + TypeName = "array", + }}, + SuperTypes = {"azure_resource"}, + }}, + EnumDefs = { }, + RelationshipDefs = { }, + StructDefs = { }, +}; +Response response = await client.BatchDeleteAsync(body); +]]> + + + +This sample shows how to call BatchDelete. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +AtlasTypesDef body = new AtlasTypesDef +{ + ClassificationDefs = { }, + EntityDefs = {new AtlasEntityDef + { + Name = "azure_sql_server_example", + TypeVersion = "1.0", + AttributeDefs = {new AtlasAttributeDef + { + Cardinality = CardinalityValue.Set, + IsIndexable = false, + IsOptional = true, + IsUnique = false, + Name = "databases", + TypeName = "array", + }}, + SuperTypes = {"azure_resource"}, + }}, + EnumDefs = { }, + RelationshipDefs = { }, + StructDefs = { }, +}; +Response response = client.BatchDelete(body); +]]> + + + +This sample shows how to call BatchDeleteAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +using RequestContent content = RequestContent.Create(new +{ + enumDefs = Array.Empty(), + structDefs = Array.Empty(), + classificationDefs = Array.Empty(), + entityDefs = new object[] { new { - category = "PRIMITIVE", - createTime = 1234L, - createdBy = "", - description = "", - guid = "", - name = "", - options = new + name = "azure_sql_server_example", + superTypes = new object[] { - key = "", + "azure_resource" }, - serviceType = "", - typeVersion = "", - updateTime = 1234L, - updatedBy = "", - version = 1234L, - lastModifiedTS = "", + typeVersion = "1.0", attributeDefs = new object[] { - null + new + { + name = "databases", + typeName = "array", + cardinality = "SET", + isIndexable = false, + isOptional = true, + isUnique = false, + } }, } }, - termTemplateDefs = new object[] + relationshipDefs = Array.Empty(), +}); +Response response = await client.BatchDeleteAsync(content); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call BatchDelete. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +using RequestContent content = RequestContent.Create(new +{ + enumDefs = Array.Empty(), + structDefs = Array.Empty(), + classificationDefs = Array.Empty(), + entityDefs = new object[] { new { - category = "PRIMITIVE", - createTime = 1234L, - createdBy = "", - description = "", - guid = "", - name = "", - options = new + name = "azure_sql_server_example", + superTypes = new object[] { - key = "", + "azure_resource" }, - serviceType = "", - typeVersion = "", - updateTime = 1234L, - updatedBy = "", - version = 1234L, - lastModifiedTS = "", + typeVersion = "1.0", attributeDefs = new object[] { - null + new + { + name = "databases", + typeName = "array", + cardinality = "SET", + isIndexable = false, + isOptional = true, + isUnique = false, + } }, } }, + relationshipDefs = Array.Empty(), }); Response response = client.BatchDelete(content); @@ -8489,440 +1867,150 @@ Console.WriteLine(response.Status); This sample shows how to call GetHeadersAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); Response> response = await client.GetHeadersAsync(); -]]> -This sample shows how to call GetHeadersAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(apiVersion: "2023-09-01"); - -Response> response = await client.GetHeadersAsync(includeTermTemplate: true, type: TypeCategory.Primitive); ]]> This sample shows how to call GetHeaders. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); Response> response = client.GetHeaders(); -]]> -This sample shows how to call GetHeaders with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(apiVersion: "2023-09-01"); - -Response> response = client.GetHeaders(includeTermTemplate: true, type: TypeCategory.Primitive); ]]> This sample shows how to call GetHeadersAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); -Response response = await client.GetHeadersAsync(null, null, null); +Response response = await client.GetHeadersAsync(true, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].ToString()); -]]> -This sample shows how to call GetHeadersAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(apiVersion: "2023-09-01"); - -Response response = await client.GetHeadersAsync(true, "PRIMITIVE", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result[0].GetProperty("category").ToString()); -Console.WriteLine(result[0].GetProperty("guid").ToString()); -Console.WriteLine(result[0].GetProperty("name").ToString()); ]]> This sample shows how to call GetHeaders and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); -Response response = client.GetHeaders(null, null, null); +Response response = client.GetHeaders(true, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].ToString()); -]]> -This sample shows how to call GetHeaders with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(apiVersion: "2023-09-01"); - -Response response = client.GetHeaders(true, "PRIMITIVE", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result[0].GetProperty("category").ToString()); -Console.WriteLine(result[0].GetProperty("guid").ToString()); -Console.WriteLine(result[0].GetProperty("name").ToString()); ]]> This sample shows how to call GetTermTemplateByIdAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(apiVersion: "2023-09-01"); -Response response = await client.GetTermTemplateByIdAsync(""); -]]> -This sample shows how to call GetTermTemplateByIdAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(apiVersion: "2023-09-01"); - -Response response = await client.GetTermTemplateByIdAsync(""); +Response response = await client.GetTermTemplateByIdAsync("d776af9c-985c-4168-abb2-477523dbfc70"); ]]> This sample shows how to call GetTermTemplateById. "); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(apiVersion: "2023-09-01"); - -Response response = client.GetTermTemplateById(""); -]]> -This sample shows how to call GetTermTemplateById with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(apiVersion: "2023-09-01"); -Response response = client.GetTermTemplateById(""); +Response response = client.GetTermTemplateById("d776af9c-985c-4168-abb2-477523dbfc70"); ]]> This sample shows how to call GetTermTemplateByIdAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(apiVersion: "2023-09-01"); -Response response = await client.GetTermTemplateByIdAsync("", null); +Response response = await client.GetTermTemplateByIdAsync("d776af9c-985c-4168-abb2-477523dbfc70", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetTermTemplateByIdAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(apiVersion: "2023-09-01"); - -Response response = await client.GetTermTemplateByIdAsync("", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("calendar").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("lenient").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); -Console.WriteLine(result.GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("serviceType").ToString()); -Console.WriteLine(result.GetProperty("typeVersion").ToString()); -Console.WriteLine(result.GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); ]]> This sample shows how to call GetTermTemplateById and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(apiVersion: "2023-09-01"); -Response response = client.GetTermTemplateById("", null); +Response response = client.GetTermTemplateById("d776af9c-985c-4168-abb2-477523dbfc70", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetTermTemplateById with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(apiVersion: "2023-09-01"); - -Response response = client.GetTermTemplateById("", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("calendar").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("lenient").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); -Console.WriteLine(result.GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("serviceType").ToString()); -Console.WriteLine(result.GetProperty("typeVersion").ToString()); -Console.WriteLine(result.GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); ]]> This sample shows how to call GetTermTemplateByNameAsync. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(apiVersion: "2023-09-01"); -Response response = await client.GetTermTemplateByNameAsync(""); -]]> -This sample shows how to call GetTermTemplateByNameAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(apiVersion: "2023-09-01"); - -Response response = await client.GetTermTemplateByNameAsync(""); +Response response = await client.GetTermTemplateByNameAsync("MS KPI"); ]]> This sample shows how to call GetTermTemplateByName. "); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(apiVersion: "2023-09-01"); - -Response response = client.GetTermTemplateByName(""); -]]> -This sample shows how to call GetTermTemplateByName with all parameters. -"); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(apiVersion: "2023-09-01"); -Response response = client.GetTermTemplateByName(""); +Response response = client.GetTermTemplateByName("MS KPI"); ]]> This sample shows how to call GetTermTemplateByNameAsync and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(apiVersion: "2023-09-01"); -Response response = await client.GetTermTemplateByNameAsync("", null); +Response response = await client.GetTermTemplateByNameAsync("MS KPI", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetTermTemplateByNameAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(apiVersion: "2023-09-01"); - -Response response = await client.GetTermTemplateByNameAsync("", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("calendar").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("lenient").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); -Console.WriteLine(result.GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("serviceType").ToString()); -Console.WriteLine(result.GetProperty("typeVersion").ToString()); -Console.WriteLine(result.GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); ]]> This sample shows how to call GetTermTemplateByName and parse the result. "); +Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(apiVersion: "2023-09-01"); -Response response = client.GetTermTemplateByName("", null); +Response response = client.GetTermTemplateByName("MS KPI", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetTermTemplateByName with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(apiVersion: "2023-09-01"); - -Response response = client.GetTermTemplateByName("", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("category").ToString()); -Console.WriteLine(result.GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("calendar").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("lenient").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); -Console.WriteLine(result.GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("serviceType").ToString()); -Console.WriteLine(result.GetProperty("typeVersion").ToString()); -Console.WriteLine(result.GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); ]]> diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/tests/Generated/Samples/Samples_Discovery.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/tests/Generated/Samples/Samples_Discovery.cs index d00590016f69..5c98277b4776 100644 --- a/sdk/purview/Azure.Analytics.Purview.DataMap/tests/Generated/Samples/Samples_Discovery.cs +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/tests/Generated/Samples/Samples_Discovery.cs @@ -6,6 +6,7 @@ #nullable disable using System; +using System.Collections.Generic; using System.Text.Json; using System.Threading.Tasks; using Azure.Core; @@ -18,13 +19,4060 @@ public partial class Samples_Discovery { [Test] [Ignore("Only validating compilation of examples")] - public void Example_Discovery_Query_ShortVersion() + public void Example_Discovery_Query_DiscoveryQuery() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); - using RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new + { + keywords = "exampledata", + filter = new Dictionary + { + ["$id"] = "4600", + ["and"] = new object[] + { +new Dictionary +{ +["$id"] = "4601", +["objectType"] = "Files" +}, +new Dictionary +{ +["$id"] = "4602", +["entityType"] = "azure_blob_path" +} + } + }, + limit = 10, + orderby = new object[] + { +new Dictionary +{ +["$id"] = "4606", +["name"] = "ASC" +}, +new Dictionary +{ +["$id"] = "4608", +["updateTime"] = "DESC" +} + }, + facets = new object[] + { +new +{ +facet = "assetType", +count = 0, +sort = new +{ +count = "desc", +}, +}, +new +{ +facet = "classification", +count = 10, +sort = new +{ +count = "desc", +}, +}, +new +{ +facet = "contactId", +count = 10, +sort = new +{ +count = "desc", +}, +}, +new +{ +facet = "label", +count = 10, +sort = new +{ +count = "desc", +}, +}, +new +{ +facet = "term", +count = 10, +sort = new +{ +count = "desc", +}, +} + }, + }); + Response response = client.Query(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Discovery_Query_DiscoveryQuery_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + using RequestContent content = RequestContent.Create(new + { + keywords = "exampledata", + filter = new Dictionary + { + ["$id"] = "4600", + ["and"] = new object[] + { +new Dictionary +{ +["$id"] = "4601", +["objectType"] = "Files" +}, +new Dictionary +{ +["$id"] = "4602", +["entityType"] = "azure_blob_path" +} + } + }, + limit = 10, + orderby = new object[] + { +new Dictionary +{ +["$id"] = "4606", +["name"] = "ASC" +}, +new Dictionary +{ +["$id"] = "4608", +["updateTime"] = "DESC" +} + }, + facets = new object[] + { +new +{ +facet = "assetType", +count = 0, +sort = new +{ +count = "desc", +}, +}, +new +{ +facet = "classification", +count = 10, +sort = new +{ +count = "desc", +}, +}, +new +{ +facet = "contactId", +count = 10, +sort = new +{ +count = "desc", +}, +}, +new +{ +facet = "label", +count = 10, +sort = new +{ +count = "desc", +}, +}, +new +{ +facet = "term", +count = 10, +sort = new +{ +count = "desc", +}, +} + }, + }); + Response response = await client.QueryAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Discovery_Query_DiscoveryQuery_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + QueryConfig body = new QueryConfig + { + Keywords = "exampledata", + Limit = 10, + Orderby = {BinaryData.FromObjectAsJson(new Dictionary +{ +["$id"] = "4606", +["name"] = "ASC" +}), BinaryData.FromObjectAsJson(new Dictionary +{ +["$id"] = "4608", +["updateTime"] = "DESC" +})}, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "4600", + ["and"] = new object[] + { +new Dictionary +{ +["$id"] = "4601", +["objectType"] = "Files" +}, +new Dictionary +{ +["$id"] = "4602", +["entityType"] = "azure_blob_path" +} + } + }), + Facets = {new SearchFacetItem +{ +Count = 0, +Facet = "assetType", +Sort = new SearchFacetSort +{ +Count = SearchSortOrder.Descend, +}, +}, new SearchFacetItem +{ +Count = 10, +Facet = "classification", +Sort = new SearchFacetSort +{ +Count = SearchSortOrder.Descend, +}, +}, new SearchFacetItem +{ +Count = 10, +Facet = "contactId", +Sort = new SearchFacetSort +{ +Count = SearchSortOrder.Descend, +}, +}, new SearchFacetItem +{ +Count = 10, +Facet = "label", +Sort = new SearchFacetSort +{ +Count = SearchSortOrder.Descend, +}, +}, new SearchFacetItem +{ +Count = 10, +Facet = "term", +Sort = new SearchFacetSort +{ +Count = SearchSortOrder.Descend, +}, +}}, + }; + Response response = client.Query(body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Discovery_Query_DiscoveryQuery_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + QueryConfig body = new QueryConfig + { + Keywords = "exampledata", + Limit = 10, + Orderby = {BinaryData.FromObjectAsJson(new Dictionary +{ +["$id"] = "4606", +["name"] = "ASC" +}), BinaryData.FromObjectAsJson(new Dictionary +{ +["$id"] = "4608", +["updateTime"] = "DESC" +})}, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "4600", + ["and"] = new object[] + { +new Dictionary +{ +["$id"] = "4601", +["objectType"] = "Files" +}, +new Dictionary +{ +["$id"] = "4602", +["entityType"] = "azure_blob_path" +} + } + }), + Facets = {new SearchFacetItem +{ +Count = 0, +Facet = "assetType", +Sort = new SearchFacetSort +{ +Count = SearchSortOrder.Descend, +}, +}, new SearchFacetItem +{ +Count = 10, +Facet = "classification", +Sort = new SearchFacetSort +{ +Count = SearchSortOrder.Descend, +}, +}, new SearchFacetItem +{ +Count = 10, +Facet = "contactId", +Sort = new SearchFacetSort +{ +Count = SearchSortOrder.Descend, +}, +}, new SearchFacetItem +{ +Count = 10, +Facet = "label", +Sort = new SearchFacetSort +{ +Count = SearchSortOrder.Descend, +}, +}, new SearchFacetItem +{ +Count = 10, +Facet = "term", +Sort = new SearchFacetSort +{ +Count = SearchSortOrder.Descend, +}, +}}, + }; + Response response = await client.QueryAsync(body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Discovery_Query_DiscoveryQueryAnd() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + using RequestContent content = RequestContent.Create(new + { + limit = 10, + filter = new Dictionary + { + ["$id"] = "4685", + ["and"] = new object[] + { +new Dictionary +{ +["$id"] = "4686", +["entityType"] = "azure_blob_path" +}, +new Dictionary +{ +["$id"] = "4687", +["attributeName"] = "qualifiedName", +["operator"] = "contains", +["attributeValue"] = ".csv" +} + } + }, + }); + Response response = client.Query(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Discovery_Query_DiscoveryQueryAnd_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + using RequestContent content = RequestContent.Create(new + { + limit = 10, + filter = new Dictionary + { + ["$id"] = "4685", + ["and"] = new object[] + { +new Dictionary +{ +["$id"] = "4686", +["entityType"] = "azure_blob_path" +}, +new Dictionary +{ +["$id"] = "4687", +["attributeName"] = "qualifiedName", +["operator"] = "contains", +["attributeValue"] = ".csv" +} + } + }, + }); + Response response = await client.QueryAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Discovery_Query_DiscoveryQueryAnd_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + QueryConfig body = new QueryConfig + { + Limit = 10, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "4685", + ["and"] = new object[] + { +new Dictionary +{ +["$id"] = "4686", +["entityType"] = "azure_blob_path" +}, +new Dictionary +{ +["$id"] = "4687", +["attributeName"] = "qualifiedName", +["operator"] = "contains", +["attributeValue"] = ".csv" +} + } + }), + }; + Response response = client.Query(body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Discovery_Query_DiscoveryQueryAnd_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + QueryConfig body = new QueryConfig + { + Limit = 10, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "4685", + ["and"] = new object[] + { +new Dictionary +{ +["$id"] = "4686", +["entityType"] = "azure_blob_path" +}, +new Dictionary +{ +["$id"] = "4687", +["attributeName"] = "qualifiedName", +["operator"] = "contains", +["attributeValue"] = ".csv" +} + } + }), + }; + Response response = await client.QueryAsync(body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Discovery_Query_DiscoveryQueryAndOrNested() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + using RequestContent content = RequestContent.Create(new + { + limit = 10, + filter = new Dictionary + { + ["$id"] = "4738", + ["and"] = new object[] + { +new Dictionary +{ +["$id"] = "4739", +["entityType"] = "azure_blob_path" +}, +new Dictionary +{ +["$id"] = "4740", +["attributeName"] = "qualifiedName", +["operator"] = "contains", +["attributeValue"] = ".csv" +}, +new Dictionary +{ +["$id"] = "4741", +["or"] = new object[] +{ +new Dictionary +{ +["$id"] = "4742", +["attributeName"] = "name", +["operator"] = "eq", +["attributeValue"] = "exampledata.csv" +}, +new Dictionary +{ +["$id"] = "4743", +["attributeName"] = "qualifiedName", +["operator"] = "prefix", +["attributeValue"] = "https://" +} +} +} + } + }, + }); + Response response = client.Query(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Discovery_Query_DiscoveryQueryAndOrNested_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + using RequestContent content = RequestContent.Create(new + { + limit = 10, + filter = new Dictionary + { + ["$id"] = "4738", + ["and"] = new object[] + { +new Dictionary +{ +["$id"] = "4739", +["entityType"] = "azure_blob_path" +}, +new Dictionary +{ +["$id"] = "4740", +["attributeName"] = "qualifiedName", +["operator"] = "contains", +["attributeValue"] = ".csv" +}, +new Dictionary +{ +["$id"] = "4741", +["or"] = new object[] +{ +new Dictionary +{ +["$id"] = "4742", +["attributeName"] = "name", +["operator"] = "eq", +["attributeValue"] = "exampledata.csv" +}, +new Dictionary +{ +["$id"] = "4743", +["attributeName"] = "qualifiedName", +["operator"] = "prefix", +["attributeValue"] = "https://" +} +} +} + } + }, + }); + Response response = await client.QueryAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Discovery_Query_DiscoveryQueryAndOrNested_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + QueryConfig body = new QueryConfig + { + Limit = 10, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "4738", + ["and"] = new object[] + { +new Dictionary +{ +["$id"] = "4739", +["entityType"] = "azure_blob_path" +}, +new Dictionary +{ +["$id"] = "4740", +["attributeName"] = "qualifiedName", +["operator"] = "contains", +["attributeValue"] = ".csv" +}, +new Dictionary +{ +["$id"] = "4741", +["or"] = new object[] +{ +new Dictionary +{ +["$id"] = "4742", +["attributeName"] = "name", +["operator"] = "eq", +["attributeValue"] = "exampledata.csv" +}, +new Dictionary +{ +["$id"] = "4743", +["attributeName"] = "qualifiedName", +["operator"] = "prefix", +["attributeValue"] = "https://" +} +} +} + } + }), + }; + Response response = client.Query(body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Discovery_Query_DiscoveryQueryAndOrNested_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + QueryConfig body = new QueryConfig + { + Limit = 10, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "4738", + ["and"] = new object[] + { +new Dictionary +{ +["$id"] = "4739", +["entityType"] = "azure_blob_path" +}, +new Dictionary +{ +["$id"] = "4740", +["attributeName"] = "qualifiedName", +["operator"] = "contains", +["attributeValue"] = ".csv" +}, +new Dictionary +{ +["$id"] = "4741", +["or"] = new object[] +{ +new Dictionary +{ +["$id"] = "4742", +["attributeName"] = "name", +["operator"] = "eq", +["attributeValue"] = "exampledata.csv" +}, +new Dictionary +{ +["$id"] = "4743", +["attributeName"] = "qualifiedName", +["operator"] = "prefix", +["attributeValue"] = "https://" +} +} +} + } + }), + }; + Response response = await client.QueryAsync(body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Discovery_Query_DiscoveryQueryAssetType() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + using RequestContent content = RequestContent.Create(new + { + limit = 10, + filter = new Dictionary + { + ["$id"] = "4796", + ["or"] = new object[] + { +new Dictionary +{ +["$id"] = "4797", +["assetType"] = "SQL Server" +}, +new Dictionary +{ +["$id"] = "4798", +["assetType"] = "Azure SQL Server" +}, +new Dictionary +{ +["$id"] = "4799", +["assetType"] = "Azure SQL Database" +}, +new Dictionary +{ +["$id"] = "4800", +["assetType"] = "Azure SQL Data Warehouse" +}, +new Dictionary +{ +["$id"] = "4801", +["assetType"] = "Azure SQL Managed Instance" +}, +new Dictionary +{ +["$id"] = "4802", +["assetType"] = "Azure Storage Account" +}, +new Dictionary +{ +["$id"] = "4803", +["assetType"] = "Azure Blob Storage" +}, +new Dictionary +{ +["$id"] = "4804", +["assetType"] = "Azure Files" +}, +new Dictionary +{ +["$id"] = "4805", +["assetType"] = "Azure Table Storage" +}, +new Dictionary +{ +["$id"] = "4806", +["assetType"] = "Azure Data Lake Storage Gen1" +}, +new Dictionary +{ +["$id"] = "4807", +["assetType"] = "Azure Data Lake Storage Gen2" +}, +new Dictionary +{ +["$id"] = "4808", +["assetType"] = "Azure Cosmos DB" +}, +new Dictionary +{ +["$id"] = "4809", +["assetType"] = "Azure Data Factory" +}, +new Dictionary +{ +["$id"] = "4810", +["assetType"] = "Azure Cognitive Search" +}, +new Dictionary +{ +["$id"] = "4811", +["assetType"] = "Power BI" +}, +new Dictionary +{ +["$id"] = "4812", +["assetType"] = "Azure Data Explorer" +}, +new Dictionary +{ +["$id"] = "4813", +["assetType"] = "Amazon S3" +}, +new Dictionary +{ +["$id"] = "4814", +["assetType"] = "Azure Data Share" +}, +new Dictionary +{ +["$id"] = "4815", +["assetType"] = "Teradata" +}, +new Dictionary +{ +["$id"] = "4816", +["assetType"] = "SAP S4HANA" +}, +new Dictionary +{ +["$id"] = "4817", +["assetType"] = "SAP ECC" +}, +new Dictionary +{ +["$id"] = "4818", +["assetType"] = "SQL Server Integration Services" +}, +new Dictionary +{ +["$id"] = "4819", +["assetType"] = "hive" +}, +new Dictionary +{ +["$id"] = "4820", +["assetType"] = "Azure Database for MySQL" +}, +new Dictionary +{ +["$id"] = "4821", +["assetType"] = "Azure Database for MariaDB" +}, +new Dictionary +{ +["$id"] = "4822", +["assetType"] = "Azure Database for PostgreSQL" +}, +new Dictionary +{ +["$id"] = "4823", +["assetType"] = "Azure Synapse Analytics" +} + } + }, + }); + Response response = client.Query(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Discovery_Query_DiscoveryQueryAssetType_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + using RequestContent content = RequestContent.Create(new + { + limit = 10, + filter = new Dictionary + { + ["$id"] = "4796", + ["or"] = new object[] + { +new Dictionary +{ +["$id"] = "4797", +["assetType"] = "SQL Server" +}, +new Dictionary +{ +["$id"] = "4798", +["assetType"] = "Azure SQL Server" +}, +new Dictionary +{ +["$id"] = "4799", +["assetType"] = "Azure SQL Database" +}, +new Dictionary +{ +["$id"] = "4800", +["assetType"] = "Azure SQL Data Warehouse" +}, +new Dictionary +{ +["$id"] = "4801", +["assetType"] = "Azure SQL Managed Instance" +}, +new Dictionary +{ +["$id"] = "4802", +["assetType"] = "Azure Storage Account" +}, +new Dictionary +{ +["$id"] = "4803", +["assetType"] = "Azure Blob Storage" +}, +new Dictionary +{ +["$id"] = "4804", +["assetType"] = "Azure Files" +}, +new Dictionary +{ +["$id"] = "4805", +["assetType"] = "Azure Table Storage" +}, +new Dictionary +{ +["$id"] = "4806", +["assetType"] = "Azure Data Lake Storage Gen1" +}, +new Dictionary +{ +["$id"] = "4807", +["assetType"] = "Azure Data Lake Storage Gen2" +}, +new Dictionary +{ +["$id"] = "4808", +["assetType"] = "Azure Cosmos DB" +}, +new Dictionary +{ +["$id"] = "4809", +["assetType"] = "Azure Data Factory" +}, +new Dictionary +{ +["$id"] = "4810", +["assetType"] = "Azure Cognitive Search" +}, +new Dictionary +{ +["$id"] = "4811", +["assetType"] = "Power BI" +}, +new Dictionary +{ +["$id"] = "4812", +["assetType"] = "Azure Data Explorer" +}, +new Dictionary +{ +["$id"] = "4813", +["assetType"] = "Amazon S3" +}, +new Dictionary +{ +["$id"] = "4814", +["assetType"] = "Azure Data Share" +}, +new Dictionary +{ +["$id"] = "4815", +["assetType"] = "Teradata" +}, +new Dictionary +{ +["$id"] = "4816", +["assetType"] = "SAP S4HANA" +}, +new Dictionary +{ +["$id"] = "4817", +["assetType"] = "SAP ECC" +}, +new Dictionary +{ +["$id"] = "4818", +["assetType"] = "SQL Server Integration Services" +}, +new Dictionary +{ +["$id"] = "4819", +["assetType"] = "hive" +}, +new Dictionary +{ +["$id"] = "4820", +["assetType"] = "Azure Database for MySQL" +}, +new Dictionary +{ +["$id"] = "4821", +["assetType"] = "Azure Database for MariaDB" +}, +new Dictionary +{ +["$id"] = "4822", +["assetType"] = "Azure Database for PostgreSQL" +}, +new Dictionary +{ +["$id"] = "4823", +["assetType"] = "Azure Synapse Analytics" +} + } + }, + }); + Response response = await client.QueryAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Discovery_Query_DiscoveryQueryAssetType_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + QueryConfig body = new QueryConfig + { + Limit = 10, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "4796", + ["or"] = new object[] + { +new Dictionary +{ +["$id"] = "4797", +["assetType"] = "SQL Server" +}, +new Dictionary +{ +["$id"] = "4798", +["assetType"] = "Azure SQL Server" +}, +new Dictionary +{ +["$id"] = "4799", +["assetType"] = "Azure SQL Database" +}, +new Dictionary +{ +["$id"] = "4800", +["assetType"] = "Azure SQL Data Warehouse" +}, +new Dictionary +{ +["$id"] = "4801", +["assetType"] = "Azure SQL Managed Instance" +}, +new Dictionary +{ +["$id"] = "4802", +["assetType"] = "Azure Storage Account" +}, +new Dictionary +{ +["$id"] = "4803", +["assetType"] = "Azure Blob Storage" +}, +new Dictionary +{ +["$id"] = "4804", +["assetType"] = "Azure Files" +}, +new Dictionary +{ +["$id"] = "4805", +["assetType"] = "Azure Table Storage" +}, +new Dictionary +{ +["$id"] = "4806", +["assetType"] = "Azure Data Lake Storage Gen1" +}, +new Dictionary +{ +["$id"] = "4807", +["assetType"] = "Azure Data Lake Storage Gen2" +}, +new Dictionary +{ +["$id"] = "4808", +["assetType"] = "Azure Cosmos DB" +}, +new Dictionary +{ +["$id"] = "4809", +["assetType"] = "Azure Data Factory" +}, +new Dictionary +{ +["$id"] = "4810", +["assetType"] = "Azure Cognitive Search" +}, +new Dictionary +{ +["$id"] = "4811", +["assetType"] = "Power BI" +}, +new Dictionary +{ +["$id"] = "4812", +["assetType"] = "Azure Data Explorer" +}, +new Dictionary +{ +["$id"] = "4813", +["assetType"] = "Amazon S3" +}, +new Dictionary +{ +["$id"] = "4814", +["assetType"] = "Azure Data Share" +}, +new Dictionary +{ +["$id"] = "4815", +["assetType"] = "Teradata" +}, +new Dictionary +{ +["$id"] = "4816", +["assetType"] = "SAP S4HANA" +}, +new Dictionary +{ +["$id"] = "4817", +["assetType"] = "SAP ECC" +}, +new Dictionary +{ +["$id"] = "4818", +["assetType"] = "SQL Server Integration Services" +}, +new Dictionary +{ +["$id"] = "4819", +["assetType"] = "hive" +}, +new Dictionary +{ +["$id"] = "4820", +["assetType"] = "Azure Database for MySQL" +}, +new Dictionary +{ +["$id"] = "4821", +["assetType"] = "Azure Database for MariaDB" +}, +new Dictionary +{ +["$id"] = "4822", +["assetType"] = "Azure Database for PostgreSQL" +}, +new Dictionary +{ +["$id"] = "4823", +["assetType"] = "Azure Synapse Analytics" +} + } + }), + }; + Response response = client.Query(body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Discovery_Query_DiscoveryQueryAssetType_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + QueryConfig body = new QueryConfig + { + Limit = 10, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "4796", + ["or"] = new object[] + { +new Dictionary +{ +["$id"] = "4797", +["assetType"] = "SQL Server" +}, +new Dictionary +{ +["$id"] = "4798", +["assetType"] = "Azure SQL Server" +}, +new Dictionary +{ +["$id"] = "4799", +["assetType"] = "Azure SQL Database" +}, +new Dictionary +{ +["$id"] = "4800", +["assetType"] = "Azure SQL Data Warehouse" +}, +new Dictionary +{ +["$id"] = "4801", +["assetType"] = "Azure SQL Managed Instance" +}, +new Dictionary +{ +["$id"] = "4802", +["assetType"] = "Azure Storage Account" +}, +new Dictionary +{ +["$id"] = "4803", +["assetType"] = "Azure Blob Storage" +}, +new Dictionary +{ +["$id"] = "4804", +["assetType"] = "Azure Files" +}, +new Dictionary +{ +["$id"] = "4805", +["assetType"] = "Azure Table Storage" +}, +new Dictionary +{ +["$id"] = "4806", +["assetType"] = "Azure Data Lake Storage Gen1" +}, +new Dictionary +{ +["$id"] = "4807", +["assetType"] = "Azure Data Lake Storage Gen2" +}, +new Dictionary +{ +["$id"] = "4808", +["assetType"] = "Azure Cosmos DB" +}, +new Dictionary +{ +["$id"] = "4809", +["assetType"] = "Azure Data Factory" +}, +new Dictionary +{ +["$id"] = "4810", +["assetType"] = "Azure Cognitive Search" +}, +new Dictionary +{ +["$id"] = "4811", +["assetType"] = "Power BI" +}, +new Dictionary +{ +["$id"] = "4812", +["assetType"] = "Azure Data Explorer" +}, +new Dictionary +{ +["$id"] = "4813", +["assetType"] = "Amazon S3" +}, +new Dictionary +{ +["$id"] = "4814", +["assetType"] = "Azure Data Share" +}, +new Dictionary +{ +["$id"] = "4815", +["assetType"] = "Teradata" +}, +new Dictionary +{ +["$id"] = "4816", +["assetType"] = "SAP S4HANA" +}, +new Dictionary +{ +["$id"] = "4817", +["assetType"] = "SAP ECC" +}, +new Dictionary +{ +["$id"] = "4818", +["assetType"] = "SQL Server Integration Services" +}, +new Dictionary +{ +["$id"] = "4819", +["assetType"] = "hive" +}, +new Dictionary +{ +["$id"] = "4820", +["assetType"] = "Azure Database for MySQL" +}, +new Dictionary +{ +["$id"] = "4821", +["assetType"] = "Azure Database for MariaDB" +}, +new Dictionary +{ +["$id"] = "4822", +["assetType"] = "Azure Database for PostgreSQL" +}, +new Dictionary +{ +["$id"] = "4823", +["assetType"] = "Azure Synapse Analytics" +} + } + }), + }; + Response response = await client.QueryAsync(body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Discovery_Query_DiscoveryQueryAttribute() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + using RequestContent content = RequestContent.Create(new + { + limit = 10, + filter = new Dictionary + { + ["$id"] = "4865", + ["or"] = new object[] + { +new Dictionary +{ +["$id"] = "4866", +["attributeName"] = "name", +["operator"] = "eq", +["attributeValue"] = "exampledata.csv" +}, +new Dictionary +{ +["$id"] = "4867", +["attributeName"] = "createTime", +["operator"] = "ge", +["attributeValue"] = 1545580800000L +}, +new Dictionary +{ +["$id"] = "4868", +["attributeName"] = "modifiedTime", +["operator"] = "timerange", +["attributeValue"] = "LAST_24H|LAST_7D|LAST_30D|LAST_365D|MORE_THAN_365D" +} + } + }, + }); + Response response = client.Query(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Discovery_Query_DiscoveryQueryAttribute_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + using RequestContent content = RequestContent.Create(new + { + limit = 10, + filter = new Dictionary + { + ["$id"] = "4865", + ["or"] = new object[] + { +new Dictionary +{ +["$id"] = "4866", +["attributeName"] = "name", +["operator"] = "eq", +["attributeValue"] = "exampledata.csv" +}, +new Dictionary +{ +["$id"] = "4867", +["attributeName"] = "createTime", +["operator"] = "ge", +["attributeValue"] = 1545580800000L +}, +new Dictionary +{ +["$id"] = "4868", +["attributeName"] = "modifiedTime", +["operator"] = "timerange", +["attributeValue"] = "LAST_24H|LAST_7D|LAST_30D|LAST_365D|MORE_THAN_365D" +} + } + }, + }); + Response response = await client.QueryAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Discovery_Query_DiscoveryQueryAttribute_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + QueryConfig body = new QueryConfig + { + Limit = 10, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "4865", + ["or"] = new object[] + { +new Dictionary +{ +["$id"] = "4866", +["attributeName"] = "name", +["operator"] = "eq", +["attributeValue"] = "exampledata.csv" +}, +new Dictionary +{ +["$id"] = "4867", +["attributeName"] = "createTime", +["operator"] = "ge", +["attributeValue"] = 1545580800000L +}, +new Dictionary +{ +["$id"] = "4868", +["attributeName"] = "modifiedTime", +["operator"] = "timerange", +["attributeValue"] = "LAST_24H|LAST_7D|LAST_30D|LAST_365D|MORE_THAN_365D" +} + } + }), + }; + Response response = client.Query(body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Discovery_Query_DiscoveryQueryAttribute_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + QueryConfig body = new QueryConfig + { + Limit = 10, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "4865", + ["or"] = new object[] + { +new Dictionary +{ +["$id"] = "4866", +["attributeName"] = "name", +["operator"] = "eq", +["attributeValue"] = "exampledata.csv" +}, +new Dictionary +{ +["$id"] = "4867", +["attributeName"] = "createTime", +["operator"] = "ge", +["attributeValue"] = 1545580800000L +}, +new Dictionary +{ +["$id"] = "4868", +["attributeName"] = "modifiedTime", +["operator"] = "timerange", +["attributeValue"] = "LAST_24H|LAST_7D|LAST_30D|LAST_365D|MORE_THAN_365D" +} + } + }), + }; + Response response = await client.QueryAsync(body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Discovery_Query_DiscoveryQueryBusinessMetadataAttribute() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + using RequestContent content = RequestContent.Create(new + { + limit = 10, + filter = new Dictionary + { + ["$id"] = "4930", + ["or"] = new object[] + { +new Dictionary +{ +["$id"] = "4931", +["attributeName"] = ".", +["operator"] = "eq|ne|contains|prefix", +["attributeValue"] = "string value" +}, +new Dictionary +{ +["$id"] = "4932", +["attributeName"] = ".", +["operator"] = "eq|ne|gt|ge|lt|le", +["attributeValue"] = 123 +}, +new Dictionary +{ +["$id"] = "4933", +["attributeName"] = ".", +["operator"] = "eq|ne", +["attributeValue"] = true +}, +new Dictionary +{ +["$id"] = "4934", +["attributeName"] = ".", +["operator"] = "timerange", +["attributeValue"] = "LAST_24H|LAST_7D|LAST_30D|LAST_365D|MORE_THAN_365D" +} + } + }, + }); + Response response = client.Query(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Discovery_Query_DiscoveryQueryBusinessMetadataAttribute_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + using RequestContent content = RequestContent.Create(new + { + limit = 10, + filter = new Dictionary + { + ["$id"] = "4930", + ["or"] = new object[] + { +new Dictionary +{ +["$id"] = "4931", +["attributeName"] = ".", +["operator"] = "eq|ne|contains|prefix", +["attributeValue"] = "string value" +}, +new Dictionary +{ +["$id"] = "4932", +["attributeName"] = ".", +["operator"] = "eq|ne|gt|ge|lt|le", +["attributeValue"] = 123 +}, +new Dictionary +{ +["$id"] = "4933", +["attributeName"] = ".", +["operator"] = "eq|ne", +["attributeValue"] = true +}, +new Dictionary +{ +["$id"] = "4934", +["attributeName"] = ".", +["operator"] = "timerange", +["attributeValue"] = "LAST_24H|LAST_7D|LAST_30D|LAST_365D|MORE_THAN_365D" +} + } + }, + }); + Response response = await client.QueryAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Discovery_Query_DiscoveryQueryBusinessMetadataAttribute_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + QueryConfig body = new QueryConfig + { + Limit = 10, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "4930", + ["or"] = new object[] + { +new Dictionary +{ +["$id"] = "4931", +["attributeName"] = ".", +["operator"] = "eq|ne|contains|prefix", +["attributeValue"] = "string value" +}, +new Dictionary +{ +["$id"] = "4932", +["attributeName"] = ".", +["operator"] = "eq|ne|gt|ge|lt|le", +["attributeValue"] = 123 +}, +new Dictionary +{ +["$id"] = "4933", +["attributeName"] = ".", +["operator"] = "eq|ne", +["attributeValue"] = true +}, +new Dictionary +{ +["$id"] = "4934", +["attributeName"] = ".", +["operator"] = "timerange", +["attributeValue"] = "LAST_24H|LAST_7D|LAST_30D|LAST_365D|MORE_THAN_365D" +} + } + }), + }; + Response response = client.Query(body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Discovery_Query_DiscoveryQueryBusinessMetadataAttribute_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + QueryConfig body = new QueryConfig + { + Limit = 10, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "4930", + ["or"] = new object[] + { +new Dictionary +{ +["$id"] = "4931", +["attributeName"] = ".", +["operator"] = "eq|ne|contains|prefix", +["attributeValue"] = "string value" +}, +new Dictionary +{ +["$id"] = "4932", +["attributeName"] = ".", +["operator"] = "eq|ne|gt|ge|lt|le", +["attributeValue"] = 123 +}, +new Dictionary +{ +["$id"] = "4933", +["attributeName"] = ".", +["operator"] = "eq|ne", +["attributeValue"] = true +}, +new Dictionary +{ +["$id"] = "4934", +["attributeName"] = ".", +["operator"] = "timerange", +["attributeValue"] = "LAST_24H|LAST_7D|LAST_30D|LAST_365D|MORE_THAN_365D" +} + } + }), + }; + Response response = await client.QueryAsync(body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Discovery_Query_DiscoveryQueryClassification() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + using RequestContent content = RequestContent.Create(new + { + limit = 10, + filter = new Dictionary + { + ["$id"] = "4957", + ["classification"] = "MICROSOFT.PERSONAL.EMAIL", + ["includeSubClassifications"] = true + }, + }); + Response response = client.Query(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Discovery_Query_DiscoveryQueryClassification_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + using RequestContent content = RequestContent.Create(new + { + limit = 10, + filter = new Dictionary + { + ["$id"] = "4957", + ["classification"] = "MICROSOFT.PERSONAL.EMAIL", + ["includeSubClassifications"] = true + }, + }); + Response response = await client.QueryAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Discovery_Query_DiscoveryQueryClassification_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + QueryConfig body = new QueryConfig + { + Limit = 10, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "4957", + ["classification"] = "MICROSOFT.PERSONAL.EMAIL", + ["includeSubClassifications"] = true + }), + }; + Response response = client.Query(body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Discovery_Query_DiscoveryQueryClassification_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + QueryConfig body = new QueryConfig + { + Limit = 10, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "4957", + ["classification"] = "MICROSOFT.PERSONAL.EMAIL", + ["includeSubClassifications"] = true + }), + }; + Response response = await client.QueryAsync(body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Discovery_Query_DiscoveryQueryCollection() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + using RequestContent content = RequestContent.Create(new + { + limit = 10, + filter = new Dictionary + { + ["$id"] = "5007", + ["collectionId"] = "collectionName" + }, + }); + Response response = client.Query(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Discovery_Query_DiscoveryQueryCollection_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + using RequestContent content = RequestContent.Create(new + { + limit = 10, + filter = new Dictionary + { + ["$id"] = "5007", + ["collectionId"] = "collectionName" + }, + }); + Response response = await client.QueryAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Discovery_Query_DiscoveryQueryCollection_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + QueryConfig body = new QueryConfig + { + Limit = 10, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "5007", + ["collectionId"] = "collectionName" + }), + }; + Response response = client.Query(body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Discovery_Query_DiscoveryQueryCollection_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + QueryConfig body = new QueryConfig + { + Limit = 10, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "5007", + ["collectionId"] = "collectionName" + }), + }; + Response response = await client.QueryAsync(body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Discovery_Query_DiscoveryQueryFacet() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + using RequestContent content = RequestContent.Create(new + { + filter = new Dictionary + { + ["$id"] = "5056", + ["objectType"] = "Tables" + }, + limit = 10, + facets = new object[] + { +new +{ +facet = "assetType", +count = 10, +}, +new +{ +facet = "classification", +count = 10, +}, +new +{ +facet = "term", +count = 10, +}, +new +{ +facet = "label", +count = 10, +} + }, + }); + Response response = client.Query(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Discovery_Query_DiscoveryQueryFacet_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + using RequestContent content = RequestContent.Create(new + { + filter = new Dictionary + { + ["$id"] = "5056", + ["objectType"] = "Tables" + }, + limit = 10, + facets = new object[] + { +new +{ +facet = "assetType", +count = 10, +}, +new +{ +facet = "classification", +count = 10, +}, +new +{ +facet = "term", +count = 10, +}, +new +{ +facet = "label", +count = 10, +} + }, + }); + Response response = await client.QueryAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Discovery_Query_DiscoveryQueryFacet_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + QueryConfig body = new QueryConfig + { + Limit = 10, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "5056", + ["objectType"] = "Tables" + }), + Facets = {new SearchFacetItem +{ +Count = 10, +Facet = "assetType", +}, new SearchFacetItem +{ +Count = 10, +Facet = "classification", +}, new SearchFacetItem +{ +Count = 10, +Facet = "term", +}, new SearchFacetItem +{ +Count = 10, +Facet = "label", +}}, + }; + Response response = client.Query(body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Discovery_Query_DiscoveryQueryFacet_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + QueryConfig body = new QueryConfig + { + Limit = 10, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "5056", + ["objectType"] = "Tables" + }), + Facets = {new SearchFacetItem +{ +Count = 10, +Facet = "assetType", +}, new SearchFacetItem +{ +Count = 10, +Facet = "classification", +}, new SearchFacetItem +{ +Count = 10, +Facet = "term", +}, new SearchFacetItem +{ +Count = 10, +Facet = "label", +}}, + }; + Response response = await client.QueryAsync(body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Discovery_Query_DiscoveryQueryFileExtension() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + using RequestContent content = RequestContent.Create(new + { + limit = 10, + filter = new Dictionary + { + ["$id"] = "5186", + ["and"] = new object[] + { +new Dictionary +{ +["$id"] = "5187", +["fileExtension"] = "txt" +} + } + }, + }); + Response response = client.Query(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Discovery_Query_DiscoveryQueryFileExtension_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + using RequestContent content = RequestContent.Create(new + { + limit = 10, + filter = new Dictionary + { + ["$id"] = "5186", + ["and"] = new object[] + { +new Dictionary +{ +["$id"] = "5187", +["fileExtension"] = "txt" +} + } + }, + }); + Response response = await client.QueryAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Discovery_Query_DiscoveryQueryFileExtension_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + QueryConfig body = new QueryConfig + { + Limit = 10, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "5186", + ["and"] = new object[] + { +new Dictionary +{ +["$id"] = "5187", +["fileExtension"] = "txt" +} + } + }), + }; + Response response = client.Query(body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Discovery_Query_DiscoveryQueryFileExtension_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + QueryConfig body = new QueryConfig + { + Limit = 10, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "5186", + ["and"] = new object[] + { +new Dictionary +{ +["$id"] = "5187", +["fileExtension"] = "txt" +} + } + }), + }; + Response response = await client.QueryAsync(body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Discovery_Query_DiscoveryQueryGlossaryTerm() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + using RequestContent content = RequestContent.Create(new + { + keywords = "", + limit = 10, + filter = new Dictionary + { + ["$id"] = "5230", + ["and"] = new object[] + { +new Dictionary +{ +["$id"] = "5231", +["objectType"] = "Glossary terms" +}, +new Dictionary +{ +["$id"] = "5232", +["or"] = new object[] +{ +new Dictionary +{ +["$id"] = "5233", +["glossaryType"] = "AtlasGlossary" +}, +new Dictionary +{ +["$id"] = "5234", +["glossaryType"] = "AtlasGlossaryTerm" +} +} +} + } + }, + facets = new object[] + { +new +{ +facet = "termStatus", +count = 10, +sort = new +{ +count = "desc", +}, +}, +new +{ +facet = "termTemplate", +count = 10, +sort = new +{ +count = "desc", +}, +} + }, + }); + Response response = client.Query(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Discovery_Query_DiscoveryQueryGlossaryTerm_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + using RequestContent content = RequestContent.Create(new + { + keywords = "", + limit = 10, + filter = new Dictionary + { + ["$id"] = "5230", + ["and"] = new object[] + { +new Dictionary +{ +["$id"] = "5231", +["objectType"] = "Glossary terms" +}, +new Dictionary +{ +["$id"] = "5232", +["or"] = new object[] +{ +new Dictionary +{ +["$id"] = "5233", +["glossaryType"] = "AtlasGlossary" +}, +new Dictionary +{ +["$id"] = "5234", +["glossaryType"] = "AtlasGlossaryTerm" +} +} +} + } + }, + facets = new object[] + { +new +{ +facet = "termStatus", +count = 10, +sort = new +{ +count = "desc", +}, +}, +new +{ +facet = "termTemplate", +count = 10, +sort = new +{ +count = "desc", +}, +} + }, + }); + Response response = await client.QueryAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Discovery_Query_DiscoveryQueryGlossaryTerm_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + QueryConfig body = new QueryConfig + { + Keywords = "", + Limit = 10, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "5230", + ["and"] = new object[] + { +new Dictionary +{ +["$id"] = "5231", +["objectType"] = "Glossary terms" +}, +new Dictionary +{ +["$id"] = "5232", +["or"] = new object[] +{ +new Dictionary +{ +["$id"] = "5233", +["glossaryType"] = "AtlasGlossary" +}, +new Dictionary +{ +["$id"] = "5234", +["glossaryType"] = "AtlasGlossaryTerm" +} +} +} + } + }), + Facets = {new SearchFacetItem +{ +Count = 10, +Facet = "termStatus", +Sort = new SearchFacetSort +{ +Count = SearchSortOrder.Descend, +}, +}, new SearchFacetItem +{ +Count = 10, +Facet = "termTemplate", +Sort = new SearchFacetSort +{ +Count = SearchSortOrder.Descend, +}, +}}, + }; + Response response = client.Query(body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Discovery_Query_DiscoveryQueryGlossaryTerm_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + QueryConfig body = new QueryConfig + { + Keywords = "", + Limit = 10, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "5230", + ["and"] = new object[] + { +new Dictionary +{ +["$id"] = "5231", +["objectType"] = "Glossary terms" +}, +new Dictionary +{ +["$id"] = "5232", +["or"] = new object[] +{ +new Dictionary +{ +["$id"] = "5233", +["glossaryType"] = "AtlasGlossary" +}, +new Dictionary +{ +["$id"] = "5234", +["glossaryType"] = "AtlasGlossaryTerm" +} +} +} + } + }), + Facets = {new SearchFacetItem +{ +Count = 10, +Facet = "termStatus", +Sort = new SearchFacetSort +{ +Count = SearchSortOrder.Descend, +}, +}, new SearchFacetItem +{ +Count = 10, +Facet = "termTemplate", +Sort = new SearchFacetSort +{ +Count = SearchSortOrder.Descend, +}, +}}, + }; + Response response = await client.QueryAsync(body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Discovery_Query_DiscoveryQueryId() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + using RequestContent content = RequestContent.Create(new + { + limit = 10, + filter = new Dictionary + { + ["$id"] = "5302", + ["and"] = new object[] + { +new Dictionary +{ +["$id"] = "5303", +["id"] = "bfecbcc3-1838-45fe-96d6-112de8a170f9" +} + } + }, + }); + Response response = client.Query(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Discovery_Query_DiscoveryQueryId_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + using RequestContent content = RequestContent.Create(new + { + limit = 10, + filter = new Dictionary + { + ["$id"] = "5302", + ["and"] = new object[] + { +new Dictionary +{ +["$id"] = "5303", +["id"] = "bfecbcc3-1838-45fe-96d6-112de8a170f9" +} + } + }, + }); + Response response = await client.QueryAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Discovery_Query_DiscoveryQueryId_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + QueryConfig body = new QueryConfig + { + Limit = 10, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "5302", + ["and"] = new object[] + { +new Dictionary +{ +["$id"] = "5303", +["id"] = "bfecbcc3-1838-45fe-96d6-112de8a170f9" +} + } + }), + }; + Response response = client.Query(body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Discovery_Query_DiscoveryQueryId_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + QueryConfig body = new QueryConfig + { + Limit = 10, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "5302", + ["and"] = new object[] + { +new Dictionary +{ +["$id"] = "5303", +["id"] = "bfecbcc3-1838-45fe-96d6-112de8a170f9" +} + } + }), + }; + Response response = await client.QueryAsync(body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Discovery_Query_DiscoveryQueryNot() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + using RequestContent content = RequestContent.Create(new + { + limit = 10, + filter = new Dictionary + { + ["$id"] = "5331", + ["not"] = new Dictionary + { + ["$id"] = "5332", + ["classification"] = "MICROSOFT.SYSTEM.TEMP_FILE" + } + }, + }); + Response response = client.Query(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Discovery_Query_DiscoveryQueryNot_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + using RequestContent content = RequestContent.Create(new + { + limit = 10, + filter = new Dictionary + { + ["$id"] = "5331", + ["not"] = new Dictionary + { + ["$id"] = "5332", + ["classification"] = "MICROSOFT.SYSTEM.TEMP_FILE" + } + }, + }); + Response response = await client.QueryAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Discovery_Query_DiscoveryQueryNot_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + QueryConfig body = new QueryConfig + { + Limit = 10, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "5331", + ["not"] = new Dictionary + { + ["$id"] = "5332", + ["classification"] = "MICROSOFT.SYSTEM.TEMP_FILE" + } + }), + }; + Response response = client.Query(body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Discovery_Query_DiscoveryQueryNot_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + QueryConfig body = new QueryConfig + { + Limit = 10, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "5331", + ["not"] = new Dictionary + { + ["$id"] = "5332", + ["classification"] = "MICROSOFT.SYSTEM.TEMP_FILE" + } + }), + }; + Response response = await client.QueryAsync(body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Discovery_Query_DiscoveryQueryObjectType() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + using RequestContent content = RequestContent.Create(new + { + limit = 10, + filter = new Dictionary + { + ["$id"] = "5374", + ["or"] = new object[] + { +new Dictionary +{ +["$id"] = "5375", +["objectType"] = "Dashboards" +}, +new Dictionary +{ +["$id"] = "5376", +["objectType"] = "Data pipelines" +}, +new Dictionary +{ +["$id"] = "5377", +["objectType"] = "Files" +}, +new Dictionary +{ +["$id"] = "5378", +["objectType"] = "Folders" +}, +new Dictionary +{ +["$id"] = "5379", +["objectType"] = "Glossary terms" +}, +new Dictionary +{ +["$id"] = "5380", +["objectType"] = "Reports" +}, +new Dictionary +{ +["$id"] = "5381", +["objectType"] = "Stored procedures" +}, +new Dictionary +{ +["$id"] = "5382", +["objectType"] = "Tables" +} + } + }, + }); + Response response = client.Query(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Discovery_Query_DiscoveryQueryObjectType_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + using RequestContent content = RequestContent.Create(new + { + limit = 10, + filter = new Dictionary + { + ["$id"] = "5374", + ["or"] = new object[] + { +new Dictionary +{ +["$id"] = "5375", +["objectType"] = "Dashboards" +}, +new Dictionary +{ +["$id"] = "5376", +["objectType"] = "Data pipelines" +}, +new Dictionary +{ +["$id"] = "5377", +["objectType"] = "Files" +}, +new Dictionary +{ +["$id"] = "5378", +["objectType"] = "Folders" +}, +new Dictionary +{ +["$id"] = "5379", +["objectType"] = "Glossary terms" +}, +new Dictionary +{ +["$id"] = "5380", +["objectType"] = "Reports" +}, +new Dictionary +{ +["$id"] = "5381", +["objectType"] = "Stored procedures" +}, +new Dictionary +{ +["$id"] = "5382", +["objectType"] = "Tables" +} + } + }, + }); + Response response = await client.QueryAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Discovery_Query_DiscoveryQueryObjectType_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + QueryConfig body = new QueryConfig + { + Limit = 10, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "5374", + ["or"] = new object[] + { +new Dictionary +{ +["$id"] = "5375", +["objectType"] = "Dashboards" +}, +new Dictionary +{ +["$id"] = "5376", +["objectType"] = "Data pipelines" +}, +new Dictionary +{ +["$id"] = "5377", +["objectType"] = "Files" +}, +new Dictionary +{ +["$id"] = "5378", +["objectType"] = "Folders" +}, +new Dictionary +{ +["$id"] = "5379", +["objectType"] = "Glossary terms" +}, +new Dictionary +{ +["$id"] = "5380", +["objectType"] = "Reports" +}, +new Dictionary +{ +["$id"] = "5381", +["objectType"] = "Stored procedures" +}, +new Dictionary +{ +["$id"] = "5382", +["objectType"] = "Tables" +} + } + }), + }; + Response response = client.Query(body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Discovery_Query_DiscoveryQueryObjectType_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + QueryConfig body = new QueryConfig + { + Limit = 10, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "5374", + ["or"] = new object[] + { +new Dictionary +{ +["$id"] = "5375", +["objectType"] = "Dashboards" +}, +new Dictionary +{ +["$id"] = "5376", +["objectType"] = "Data pipelines" +}, +new Dictionary +{ +["$id"] = "5377", +["objectType"] = "Files" +}, +new Dictionary +{ +["$id"] = "5378", +["objectType"] = "Folders" +}, +new Dictionary +{ +["$id"] = "5379", +["objectType"] = "Glossary terms" +}, +new Dictionary +{ +["$id"] = "5380", +["objectType"] = "Reports" +}, +new Dictionary +{ +["$id"] = "5381", +["objectType"] = "Stored procedures" +}, +new Dictionary +{ +["$id"] = "5382", +["objectType"] = "Tables" +} + } + }), + }; + Response response = await client.QueryAsync(body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Discovery_Query_DiscoveryQueryPaginationContinuationPage() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + using RequestContent content = RequestContent.Create(new + { + keywords = "exampledata", + filter = new Dictionary + { + ["$id"] = "5420", + ["and"] = new object[] + { +new Dictionary +{ +["$id"] = "5421", +["objectType"] = "Files" +}, +new Dictionary +{ +["$id"] = "5422", +["entityType"] = "azure_blob_path" +} + } + }, + limit = 2, + continuationToken = "", + orderby = new object[] + { +new Dictionary +{ +["$id"] = "5427", +["name"] = "ASC" +}, +new Dictionary +{ +["$id"] = "5429", +["updateTime"] = "DESC" +} + }, + facets = new object[] + { +new +{ +facet = "assetType", +count = 0, +sort = new +{ +count = "desc", +}, +}, +new +{ +facet = "classification", +count = 10, +sort = new +{ +count = "desc", +}, +}, +new +{ +facet = "contactId", +count = 10, +sort = new +{ +count = "desc", +}, +}, +new +{ +facet = "label", +count = 10, +sort = new +{ +count = "desc", +}, +}, +new +{ +facet = "term", +count = 10, +sort = new +{ +count = "desc", +}, +} + }, + }); + Response response = client.Query(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Discovery_Query_DiscoveryQueryPaginationContinuationPage_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + using RequestContent content = RequestContent.Create(new + { + keywords = "exampledata", + filter = new Dictionary + { + ["$id"] = "5420", + ["and"] = new object[] + { +new Dictionary +{ +["$id"] = "5421", +["objectType"] = "Files" +}, +new Dictionary +{ +["$id"] = "5422", +["entityType"] = "azure_blob_path" +} + } + }, + limit = 2, + continuationToken = "", + orderby = new object[] + { +new Dictionary +{ +["$id"] = "5427", +["name"] = "ASC" +}, +new Dictionary +{ +["$id"] = "5429", +["updateTime"] = "DESC" +} + }, + facets = new object[] + { +new +{ +facet = "assetType", +count = 0, +sort = new +{ +count = "desc", +}, +}, +new +{ +facet = "classification", +count = 10, +sort = new +{ +count = "desc", +}, +}, +new +{ +facet = "contactId", +count = 10, +sort = new +{ +count = "desc", +}, +}, +new +{ +facet = "label", +count = 10, +sort = new +{ +count = "desc", +}, +}, +new +{ +facet = "term", +count = 10, +sort = new +{ +count = "desc", +}, +} + }, + }); + Response response = await client.QueryAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Discovery_Query_DiscoveryQueryPaginationContinuationPage_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + QueryConfig body = new QueryConfig + { + Keywords = "exampledata", + Limit = 2, + ContinuationToken = "", + Orderby = {BinaryData.FromObjectAsJson(new Dictionary +{ +["$id"] = "5427", +["name"] = "ASC" +}), BinaryData.FromObjectAsJson(new Dictionary +{ +["$id"] = "5429", +["updateTime"] = "DESC" +})}, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "5420", + ["and"] = new object[] + { +new Dictionary +{ +["$id"] = "5421", +["objectType"] = "Files" +}, +new Dictionary +{ +["$id"] = "5422", +["entityType"] = "azure_blob_path" +} + } + }), + Facets = {new SearchFacetItem +{ +Count = 0, +Facet = "assetType", +Sort = new SearchFacetSort +{ +Count = SearchSortOrder.Descend, +}, +}, new SearchFacetItem +{ +Count = 10, +Facet = "classification", +Sort = new SearchFacetSort +{ +Count = SearchSortOrder.Descend, +}, +}, new SearchFacetItem +{ +Count = 10, +Facet = "contactId", +Sort = new SearchFacetSort +{ +Count = SearchSortOrder.Descend, +}, +}, new SearchFacetItem +{ +Count = 10, +Facet = "label", +Sort = new SearchFacetSort +{ +Count = SearchSortOrder.Descend, +}, +}, new SearchFacetItem +{ +Count = 10, +Facet = "term", +Sort = new SearchFacetSort +{ +Count = SearchSortOrder.Descend, +}, +}}, + }; + Response response = client.Query(body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Discovery_Query_DiscoveryQueryPaginationContinuationPage_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + QueryConfig body = new QueryConfig + { + Keywords = "exampledata", + Limit = 2, + ContinuationToken = "", + Orderby = {BinaryData.FromObjectAsJson(new Dictionary +{ +["$id"] = "5427", +["name"] = "ASC" +}), BinaryData.FromObjectAsJson(new Dictionary +{ +["$id"] = "5429", +["updateTime"] = "DESC" +})}, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "5420", + ["and"] = new object[] + { +new Dictionary +{ +["$id"] = "5421", +["objectType"] = "Files" +}, +new Dictionary +{ +["$id"] = "5422", +["entityType"] = "azure_blob_path" +} + } + }), + Facets = {new SearchFacetItem +{ +Count = 0, +Facet = "assetType", +Sort = new SearchFacetSort +{ +Count = SearchSortOrder.Descend, +}, +}, new SearchFacetItem +{ +Count = 10, +Facet = "classification", +Sort = new SearchFacetSort +{ +Count = SearchSortOrder.Descend, +}, +}, new SearchFacetItem +{ +Count = 10, +Facet = "contactId", +Sort = new SearchFacetSort +{ +Count = SearchSortOrder.Descend, +}, +}, new SearchFacetItem +{ +Count = 10, +Facet = "label", +Sort = new SearchFacetSort +{ +Count = SearchSortOrder.Descend, +}, +}, new SearchFacetItem +{ +Count = 10, +Facet = "term", +Sort = new SearchFacetSort +{ +Count = SearchSortOrder.Descend, +}, +}}, + }; + Response response = await client.QueryAsync(body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Discovery_Query_DiscoveryQueryPaginationFirstPage() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + using RequestContent content = RequestContent.Create(new + { + keywords = "exampledata", + filter = new Dictionary + { + ["$id"] = "5507", + ["and"] = new object[] + { +new Dictionary +{ +["$id"] = "5508", +["objectType"] = "Files" +}, +new Dictionary +{ +["$id"] = "5509", +["entityType"] = "azure_blob_path" +} + } + }, + limit = 2, + orderby = new object[] + { +new Dictionary +{ +["$id"] = "5513", +["name"] = "ASC" +}, +new Dictionary +{ +["$id"] = "5515", +["updateTime"] = "DESC" +} + }, + facets = new object[] + { +new +{ +facet = "assetType", +count = 0, +sort = new +{ +count = "desc", +}, +}, +new +{ +facet = "classification", +count = 10, +sort = new +{ +count = "desc", +}, +}, +new +{ +facet = "contactId", +count = 10, +sort = new +{ +count = "desc", +}, +}, +new +{ +facet = "label", +count = 10, +sort = new +{ +count = "desc", +}, +}, +new +{ +facet = "term", +count = 10, +sort = new +{ +count = "desc", +}, +} + }, + }); + Response response = client.Query(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Discovery_Query_DiscoveryQueryPaginationFirstPage_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + using RequestContent content = RequestContent.Create(new + { + keywords = "exampledata", + filter = new Dictionary + { + ["$id"] = "5507", + ["and"] = new object[] + { +new Dictionary +{ +["$id"] = "5508", +["objectType"] = "Files" +}, +new Dictionary +{ +["$id"] = "5509", +["entityType"] = "azure_blob_path" +} + } + }, + limit = 2, + orderby = new object[] + { +new Dictionary +{ +["$id"] = "5513", +["name"] = "ASC" +}, +new Dictionary +{ +["$id"] = "5515", +["updateTime"] = "DESC" +} + }, + facets = new object[] + { +new +{ +facet = "assetType", +count = 0, +sort = new +{ +count = "desc", +}, +}, +new +{ +facet = "classification", +count = 10, +sort = new +{ +count = "desc", +}, +}, +new +{ +facet = "contactId", +count = 10, +sort = new +{ +count = "desc", +}, +}, +new +{ +facet = "label", +count = 10, +sort = new +{ +count = "desc", +}, +}, +new +{ +facet = "term", +count = 10, +sort = new +{ +count = "desc", +}, +} + }, + }); + Response response = await client.QueryAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Discovery_Query_DiscoveryQueryPaginationFirstPage_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + QueryConfig body = new QueryConfig + { + Keywords = "exampledata", + Limit = 2, + Orderby = {BinaryData.FromObjectAsJson(new Dictionary +{ +["$id"] = "5513", +["name"] = "ASC" +}), BinaryData.FromObjectAsJson(new Dictionary +{ +["$id"] = "5515", +["updateTime"] = "DESC" +})}, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "5507", + ["and"] = new object[] + { +new Dictionary +{ +["$id"] = "5508", +["objectType"] = "Files" +}, +new Dictionary +{ +["$id"] = "5509", +["entityType"] = "azure_blob_path" +} + } + }), + Facets = {new SearchFacetItem +{ +Count = 0, +Facet = "assetType", +Sort = new SearchFacetSort +{ +Count = SearchSortOrder.Descend, +}, +}, new SearchFacetItem +{ +Count = 10, +Facet = "classification", +Sort = new SearchFacetSort +{ +Count = SearchSortOrder.Descend, +}, +}, new SearchFacetItem +{ +Count = 10, +Facet = "contactId", +Sort = new SearchFacetSort +{ +Count = SearchSortOrder.Descend, +}, +}, new SearchFacetItem +{ +Count = 10, +Facet = "label", +Sort = new SearchFacetSort +{ +Count = SearchSortOrder.Descend, +}, +}, new SearchFacetItem +{ +Count = 10, +Facet = "term", +Sort = new SearchFacetSort +{ +Count = SearchSortOrder.Descend, +}, +}}, + }; + Response response = client.Query(body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Discovery_Query_DiscoveryQueryPaginationFirstPage_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + QueryConfig body = new QueryConfig + { + Keywords = "exampledata", + Limit = 2, + Orderby = {BinaryData.FromObjectAsJson(new Dictionary +{ +["$id"] = "5513", +["name"] = "ASC" +}), BinaryData.FromObjectAsJson(new Dictionary +{ +["$id"] = "5515", +["updateTime"] = "DESC" +})}, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "5507", + ["and"] = new object[] + { +new Dictionary +{ +["$id"] = "5508", +["objectType"] = "Files" +}, +new Dictionary +{ +["$id"] = "5509", +["entityType"] = "azure_blob_path" +} + } + }), + Facets = {new SearchFacetItem +{ +Count = 0, +Facet = "assetType", +Sort = new SearchFacetSort +{ +Count = SearchSortOrder.Descend, +}, +}, new SearchFacetItem +{ +Count = 10, +Facet = "classification", +Sort = new SearchFacetSort +{ +Count = SearchSortOrder.Descend, +}, +}, new SearchFacetItem +{ +Count = 10, +Facet = "contactId", +Sort = new SearchFacetSort +{ +Count = SearchSortOrder.Descend, +}, +}, new SearchFacetItem +{ +Count = 10, +Facet = "label", +Sort = new SearchFacetSort +{ +Count = SearchSortOrder.Descend, +}, +}, new SearchFacetItem +{ +Count = 10, +Facet = "term", +Sort = new SearchFacetSort +{ +Count = SearchSortOrder.Descend, +}, +}}, + }; + Response response = await client.QueryAsync(body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Discovery_Query_DiscoveryQueryPaginationLastPage() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + using RequestContent content = RequestContent.Create(new + { + keywords = "exampledata", + filter = new Dictionary + { + ["$id"] = "5593", + ["and"] = new object[] + { +new Dictionary +{ +["$id"] = "5594", +["objectType"] = "Files" +}, +new Dictionary +{ +["$id"] = "5595", +["entityType"] = "azure_blob_path" +} + } + }, + limit = 2, + continuationToken = "", + orderby = new object[] + { +new Dictionary +{ +["$id"] = "5600", +["name"] = "ASC" +}, +new Dictionary +{ +["$id"] = "5602", +["updateTime"] = "DESC" +} + }, + facets = new object[] + { +new +{ +facet = "assetType", +count = 0, +sort = new +{ +count = "desc", +}, +}, +new +{ +facet = "classification", +count = 10, +sort = new +{ +count = "desc", +}, +}, +new +{ +facet = "contactId", +count = 10, +sort = new +{ +count = "desc", +}, +}, +new +{ +facet = "label", +count = 10, +sort = new +{ +count = "desc", +}, +}, +new +{ +facet = "term", +count = 10, +sort = new +{ +count = "desc", +}, +} + }, + }); + Response response = client.Query(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Discovery_Query_DiscoveryQueryPaginationLastPage_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + using RequestContent content = RequestContent.Create(new + { + keywords = "exampledata", + filter = new Dictionary + { + ["$id"] = "5593", + ["and"] = new object[] + { +new Dictionary +{ +["$id"] = "5594", +["objectType"] = "Files" +}, +new Dictionary +{ +["$id"] = "5595", +["entityType"] = "azure_blob_path" +} + } + }, + limit = 2, + continuationToken = "", + orderby = new object[] + { +new Dictionary +{ +["$id"] = "5600", +["name"] = "ASC" +}, +new Dictionary +{ +["$id"] = "5602", +["updateTime"] = "DESC" +} + }, + facets = new object[] + { +new +{ +facet = "assetType", +count = 0, +sort = new +{ +count = "desc", +}, +}, +new +{ +facet = "classification", +count = 10, +sort = new +{ +count = "desc", +}, +}, +new +{ +facet = "contactId", +count = 10, +sort = new +{ +count = "desc", +}, +}, +new +{ +facet = "label", +count = 10, +sort = new +{ +count = "desc", +}, +}, +new +{ +facet = "term", +count = 10, +sort = new +{ +count = "desc", +}, +} + }, + }); + Response response = await client.QueryAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Discovery_Query_DiscoveryQueryPaginationLastPage_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + QueryConfig body = new QueryConfig + { + Keywords = "exampledata", + Limit = 2, + ContinuationToken = "", + Orderby = {BinaryData.FromObjectAsJson(new Dictionary +{ +["$id"] = "5600", +["name"] = "ASC" +}), BinaryData.FromObjectAsJson(new Dictionary +{ +["$id"] = "5602", +["updateTime"] = "DESC" +})}, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "5593", + ["and"] = new object[] + { +new Dictionary +{ +["$id"] = "5594", +["objectType"] = "Files" +}, +new Dictionary +{ +["$id"] = "5595", +["entityType"] = "azure_blob_path" +} + } + }), + Facets = {new SearchFacetItem +{ +Count = 0, +Facet = "assetType", +Sort = new SearchFacetSort +{ +Count = SearchSortOrder.Descend, +}, +}, new SearchFacetItem +{ +Count = 10, +Facet = "classification", +Sort = new SearchFacetSort +{ +Count = SearchSortOrder.Descend, +}, +}, new SearchFacetItem +{ +Count = 10, +Facet = "contactId", +Sort = new SearchFacetSort +{ +Count = SearchSortOrder.Descend, +}, +}, new SearchFacetItem +{ +Count = 10, +Facet = "label", +Sort = new SearchFacetSort +{ +Count = SearchSortOrder.Descend, +}, +}, new SearchFacetItem +{ +Count = 10, +Facet = "term", +Sort = new SearchFacetSort +{ +Count = SearchSortOrder.Descend, +}, +}}, + }; + Response response = client.Query(body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Discovery_Query_DiscoveryQueryPaginationLastPage_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + QueryConfig body = new QueryConfig + { + Keywords = "exampledata", + Limit = 2, + ContinuationToken = "", + Orderby = {BinaryData.FromObjectAsJson(new Dictionary +{ +["$id"] = "5600", +["name"] = "ASC" +}), BinaryData.FromObjectAsJson(new Dictionary +{ +["$id"] = "5602", +["updateTime"] = "DESC" +})}, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "5593", + ["and"] = new object[] + { +new Dictionary +{ +["$id"] = "5594", +["objectType"] = "Files" +}, +new Dictionary +{ +["$id"] = "5595", +["entityType"] = "azure_blob_path" +} + } + }), + Facets = {new SearchFacetItem +{ +Count = 0, +Facet = "assetType", +Sort = new SearchFacetSort +{ +Count = SearchSortOrder.Descend, +}, +}, new SearchFacetItem +{ +Count = 10, +Facet = "classification", +Sort = new SearchFacetSort +{ +Count = SearchSortOrder.Descend, +}, +}, new SearchFacetItem +{ +Count = 10, +Facet = "contactId", +Sort = new SearchFacetSort +{ +Count = SearchSortOrder.Descend, +}, +}, new SearchFacetItem +{ +Count = 10, +Facet = "label", +Sort = new SearchFacetSort +{ +Count = SearchSortOrder.Descend, +}, +}, new SearchFacetItem +{ +Count = 10, +Facet = "term", +Sort = new SearchFacetSort +{ +Count = SearchSortOrder.Descend, +}, +}}, + }; + Response response = await client.QueryAsync(body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Discovery_Query_DiscoveryQuerySystemTime() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + using RequestContent content = RequestContent.Create(new + { + limit = 10, + filter = new Dictionary + { + ["$id"] = "5679", + ["or"] = new object[] + { +new Dictionary +{ +["$id"] = "5680", +["createTime"] = new Dictionary +{ +["$id"] = "5681", +["operator"] = "lt", +["timeThreshold"] = 1545580800000L +} +}, +new Dictionary +{ +["$id"] = "5682", +["updateTime"] = "LAST_24H|LAST_7D|LAST_30D|LAST_365D|MORE_THAN_365D" +} + } + }, + }); Response response = client.Query(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -33,13 +4081,38 @@ public void Example_Discovery_Query_ShortVersion() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Discovery_Query_ShortVersion_Async() + public async Task Example_Discovery_Query_DiscoveryQuerySystemTime_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); - using RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new + { + limit = 10, + filter = new Dictionary + { + ["$id"] = "5679", + ["or"] = new object[] + { +new Dictionary +{ +["$id"] = "5680", +["createTime"] = new Dictionary +{ +["$id"] = "5681", +["operator"] = "lt", +["timeThreshold"] = 1545580800000L +} +}, +new Dictionary +{ +["$id"] = "5682", +["updateTime"] = "LAST_24H|LAST_7D|LAST_30D|LAST_365D|MORE_THAN_365D" +} + } + }, + }); Response response = await client.QueryAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -48,251 +4121,307 @@ public async Task Example_Discovery_Query_ShortVersion_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Discovery_Query_ShortVersion_Convenience() + public void Example_Discovery_Query_DiscoveryQuerySystemTime_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); - QueryConfig body = new QueryConfig(); + QueryConfig body = new QueryConfig + { + Limit = 10, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "5679", + ["or"] = new object[] + { +new Dictionary +{ +["$id"] = "5680", +["createTime"] = new Dictionary +{ +["$id"] = "5681", +["operator"] = "lt", +["timeThreshold"] = 1545580800000L +} +}, +new Dictionary +{ +["$id"] = "5682", +["updateTime"] = "LAST_24H|LAST_7D|LAST_30D|LAST_365D|MORE_THAN_365D" +} + } + }), + }; Response response = client.Query(body); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Discovery_Query_ShortVersion_Convenience_Async() + public async Task Example_Discovery_Query_DiscoveryQuerySystemTime_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); - QueryConfig body = new QueryConfig(); + QueryConfig body = new QueryConfig + { + Limit = 10, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "5679", + ["or"] = new object[] + { +new Dictionary +{ +["$id"] = "5680", +["createTime"] = new Dictionary +{ +["$id"] = "5681", +["operator"] = "lt", +["timeThreshold"] = 1545580800000L +} +}, +new Dictionary +{ +["$id"] = "5682", +["updateTime"] = "LAST_24H|LAST_7D|LAST_30D|LAST_365D|MORE_THAN_365D" +} + } + }), + }; Response response = await client.QueryAsync(body); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Discovery_Query_AllParameters() + public void Example_Discovery_Query_DiscoveryQueryTaxonomy() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); using RequestContent content = RequestContent.Create(new { - keywords = "", - limit = 1234, - continuationToken = "", - orderby = new object[] - { -new object() - }, - filter = new object(), - facets = new object[] + keywords = "exampledata", + filter = new Dictionary + { + ["$id"] = "5715", + ["and"] = new object[] { -new +new Dictionary { -count = 1234, -facet = "", -sort = new +["$id"] = "5716", +["objectType"] = "Files" +}, +new Dictionary +{ +["$id"] = "5717", +["not"] = new Dictionary +{ +["$id"] = "5718", +["or"] = new object[] { -count = "asc", -value = "asc", +new Dictionary +{ +["$id"] = "5719", +["attributeName"] = "size", +["operator"] = "eq", +["attributeValue"] = 0 }, +new Dictionary +{ +["$id"] = "5720", +["attributeName"] = "fileSize", +["operator"] = "eq", +["attributeValue"] = 0 } - }, +} +} +}, +new Dictionary +{ +["$id"] = "5721", +["not"] = new Dictionary +{ +["$id"] = "5722", +["classification"] = "MICROSOFT.SYSTEM.TEMP_FILE" +} +} + } + }, + limit = 10, taxonomySetting = new { assetTypes = new object[] { -"" +"Azure Blob Storage" }, + facet = new + { + count = 10, + sort = new + { + count = "desc", + }, + }, }, }); Response response = client.Query(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("@search.count").ToString()); - Console.WriteLine(result.GetProperty("@search.count.approximate").ToString()); - Console.WriteLine(result.GetProperty("continuationToken").ToString()); - Console.WriteLine(result.GetProperty("@search.facets").GetProperty("entityType")[0].GetProperty("count").ToString()); - Console.WriteLine(result.GetProperty("@search.facets").GetProperty("entityType")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("@search.facets").GetProperty("assetType")[0].GetProperty("count").ToString()); - Console.WriteLine(result.GetProperty("@search.facets").GetProperty("assetType")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("@search.facets").GetProperty("classification")[0].GetProperty("count").ToString()); - Console.WriteLine(result.GetProperty("@search.facets").GetProperty("classification")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("@search.facets").GetProperty("term")[0].GetProperty("count").ToString()); - Console.WriteLine(result.GetProperty("@search.facets").GetProperty("term")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("@search.facets").GetProperty("contactId")[0].GetProperty("count").ToString()); - Console.WriteLine(result.GetProperty("@search.facets").GetProperty("contactId")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("@search.facets").GetProperty("contactType")[0].GetProperty("count").ToString()); - Console.WriteLine(result.GetProperty("@search.facets").GetProperty("contactType")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("@search.facets").GetProperty("label")[0].GetProperty("count").ToString()); - Console.WriteLine(result.GetProperty("@search.facets").GetProperty("label")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("@search.facets").GetProperty("glossaryType")[0].GetProperty("count").ToString()); - Console.WriteLine(result.GetProperty("@search.facets").GetProperty("glossaryType")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("@search.facets").GetProperty("termStatus")[0].GetProperty("count").ToString()); - Console.WriteLine(result.GetProperty("@search.facets").GetProperty("termStatus")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("@search.facets").GetProperty("termTemplate")[0].GetProperty("count").ToString()); - Console.WriteLine(result.GetProperty("@search.facets").GetProperty("termTemplate")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("@search.score").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("@search.highlights").GetProperty("id")[0].ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("@search.highlights").GetProperty("qualifiedName")[0].ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("@search.highlights").GetProperty("name")[0].ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("@search.highlights").GetProperty("description")[0].ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("@search.highlights").GetProperty("entityType")[0].ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("objectType").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("createTime").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("updateTime").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("qualifiedName").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("entityType").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("endorsement").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("owner").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("classification")[0].ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("label")[0].ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("term")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("term")[0].GetProperty("glossaryName").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("term")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("contact")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("contact")[0].GetProperty("info").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("contact")[0].GetProperty("contactType").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("assetType")[0].ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("glossaryType").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("glossary").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("termStatus").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("termTemplate")[0].ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("longDescription").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Discovery_Query_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); - - using RequestContent content = RequestContent.Create(new - { - keywords = "", - limit = 1234, - continuationToken = "", - orderby = new object[] + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Discovery_Query_DiscoveryQueryTaxonomy_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + using RequestContent content = RequestContent.Create(new { -new object() - }, - filter = new object(), - facets = new object[] + keywords = "exampledata", + filter = new Dictionary + { + ["$id"] = "5715", + ["and"] = new object[] { -new +new Dictionary { -count = 1234, -facet = "", -sort = new +["$id"] = "5716", +["objectType"] = "Files" +}, +new Dictionary +{ +["$id"] = "5717", +["not"] = new Dictionary +{ +["$id"] = "5718", +["or"] = new object[] +{ +new Dictionary +{ +["$id"] = "5719", +["attributeName"] = "size", +["operator"] = "eq", +["attributeValue"] = 0 +}, +new Dictionary { -count = "asc", -value = "asc", +["$id"] = "5720", +["attributeName"] = "fileSize", +["operator"] = "eq", +["attributeValue"] = 0 +} +} +} }, +new Dictionary +{ +["$id"] = "5721", +["not"] = new Dictionary +{ +["$id"] = "5722", +["classification"] = "MICROSOFT.SYSTEM.TEMP_FILE" } - }, +} + } + }, + limit = 10, taxonomySetting = new { assetTypes = new object[] { -"" +"Azure Blob Storage" }, + facet = new + { + count = 10, + sort = new + { + count = "desc", + }, + }, }, }); Response response = await client.QueryAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("@search.count").ToString()); - Console.WriteLine(result.GetProperty("@search.count.approximate").ToString()); - Console.WriteLine(result.GetProperty("continuationToken").ToString()); - Console.WriteLine(result.GetProperty("@search.facets").GetProperty("entityType")[0].GetProperty("count").ToString()); - Console.WriteLine(result.GetProperty("@search.facets").GetProperty("entityType")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("@search.facets").GetProperty("assetType")[0].GetProperty("count").ToString()); - Console.WriteLine(result.GetProperty("@search.facets").GetProperty("assetType")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("@search.facets").GetProperty("classification")[0].GetProperty("count").ToString()); - Console.WriteLine(result.GetProperty("@search.facets").GetProperty("classification")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("@search.facets").GetProperty("term")[0].GetProperty("count").ToString()); - Console.WriteLine(result.GetProperty("@search.facets").GetProperty("term")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("@search.facets").GetProperty("contactId")[0].GetProperty("count").ToString()); - Console.WriteLine(result.GetProperty("@search.facets").GetProperty("contactId")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("@search.facets").GetProperty("contactType")[0].GetProperty("count").ToString()); - Console.WriteLine(result.GetProperty("@search.facets").GetProperty("contactType")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("@search.facets").GetProperty("label")[0].GetProperty("count").ToString()); - Console.WriteLine(result.GetProperty("@search.facets").GetProperty("label")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("@search.facets").GetProperty("glossaryType")[0].GetProperty("count").ToString()); - Console.WriteLine(result.GetProperty("@search.facets").GetProperty("glossaryType")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("@search.facets").GetProperty("termStatus")[0].GetProperty("count").ToString()); - Console.WriteLine(result.GetProperty("@search.facets").GetProperty("termStatus")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("@search.facets").GetProperty("termTemplate")[0].GetProperty("count").ToString()); - Console.WriteLine(result.GetProperty("@search.facets").GetProperty("termTemplate")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("@search.score").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("@search.highlights").GetProperty("id")[0].ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("@search.highlights").GetProperty("qualifiedName")[0].ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("@search.highlights").GetProperty("name")[0].ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("@search.highlights").GetProperty("description")[0].ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("@search.highlights").GetProperty("entityType")[0].ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("objectType").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("createTime").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("updateTime").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("qualifiedName").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("entityType").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("endorsement").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("owner").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("classification")[0].ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("label")[0].ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("term")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("term")[0].GetProperty("glossaryName").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("term")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("contact")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("contact")[0].GetProperty("info").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("contact")[0].GetProperty("contactType").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("assetType")[0].ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("glossaryType").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("glossary").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("termStatus").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("termTemplate")[0].ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("longDescription").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Discovery_Query_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); - - QueryConfig body = new QueryConfig - { - Keywords = "", - Limit = 1234, - ContinuationToken = "", - Orderby = { BinaryData.FromObjectAsJson(new object()) }, - Filter = BinaryData.FromObjectAsJson(new object()), - Facets = {new SearchFacetItem + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Discovery_Query_DiscoveryQueryTaxonomy_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + QueryConfig body = new QueryConfig + { + Keywords = "exampledata", + Limit = 10, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "5715", + ["and"] = new object[] + { +new Dictionary { -Count = 1234, -Facet = "", -Sort = new SearchFacetSort +["$id"] = "5716", +["objectType"] = "Files" +}, +new Dictionary +{ +["$id"] = "5717", +["not"] = new Dictionary +{ +["$id"] = "5718", +["or"] = new object[] +{ +new Dictionary { -Count = SearchSortOrder.Ascend, -Value = SearchSortOrder.Ascend, +["$id"] = "5719", +["attributeName"] = "size", +["operator"] = "eq", +["attributeValue"] = 0 }, -}}, +new Dictionary +{ +["$id"] = "5720", +["attributeName"] = "fileSize", +["operator"] = "eq", +["attributeValue"] = 0 +} +} +} +}, +new Dictionary +{ +["$id"] = "5721", +["not"] = new Dictionary +{ +["$id"] = "5722", +["classification"] = "MICROSOFT.SYSTEM.TEMP_FILE" +} +} + } + }), TaxonomySetting = new SearchTaxonomySetting { - AssetTypes = { "" }, - Facet = default, + AssetTypes = { "Azure Blob Storage" }, + Facet = new SearchFacetItem + { + Count = 10, + Sort = new SearchFacetSort + { + Count = SearchSortOrder.Descend, + }, + }, }, }; Response response = client.Query(body); @@ -300,33 +4429,73 @@ public void Example_Discovery_Query_AllParameters_Convenience() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Discovery_Query_AllParameters_Convenience_Async() + public async Task Example_Discovery_Query_DiscoveryQueryTaxonomy_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); QueryConfig body = new QueryConfig { - Keywords = "", - Limit = 1234, - ContinuationToken = "", - Orderby = { BinaryData.FromObjectAsJson(new object()) }, - Filter = BinaryData.FromObjectAsJson(new object()), - Facets = {new SearchFacetItem + Keywords = "exampledata", + Limit = 10, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "5715", + ["and"] = new object[] + { +new Dictionary { -Count = 1234, -Facet = "", -Sort = new SearchFacetSort +["$id"] = "5716", +["objectType"] = "Files" +}, +new Dictionary +{ +["$id"] = "5717", +["not"] = new Dictionary { -Count = SearchSortOrder.Ascend, -Value = SearchSortOrder.Ascend, +["$id"] = "5718", +["or"] = new object[] +{ +new Dictionary +{ +["$id"] = "5719", +["attributeName"] = "size", +["operator"] = "eq", +["attributeValue"] = 0 }, -}}, +new Dictionary +{ +["$id"] = "5720", +["attributeName"] = "fileSize", +["operator"] = "eq", +["attributeValue"] = 0 +} +} +} +}, +new Dictionary +{ +["$id"] = "5721", +["not"] = new Dictionary +{ +["$id"] = "5722", +["classification"] = "MICROSOFT.SYSTEM.TEMP_FILE" +} +} + } + }), TaxonomySetting = new SearchTaxonomySetting { - AssetTypes = { "" }, - Facet = default, + AssetTypes = { "Azure Blob Storage" }, + Facet = new SearchFacetItem + { + Count = 10, + Sort = new SearchFacetSort + { + Count = SearchSortOrder.Descend, + }, + }, }, }; Response response = await client.QueryAsync(body); @@ -334,14 +4503,41 @@ public async Task Example_Discovery_Query_AllParameters_Convenience_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Discovery_Suggest_ShortVersion() + public void Example_Discovery_Query_DiscoveryQueryTermAssignment() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); - using RequestContent content = RequestContent.Create(new object()); - Response response = client.Suggest(content); + using RequestContent content = RequestContent.Create(new + { + keywords = "", + limit = 3, + filter = new Dictionary + { + ["$id"] = "5776", + ["or"] = new object[] + { +new Dictionary +{ +["$id"] = "5777", +["term"] = "ExampleTerm" +}, +new Dictionary +{ +["$id"] = "5778", +["term"] = "ExampleTerm", +["glossary"] = "GlossaryName" +}, +new Dictionary +{ +["$id"] = "5779", +["termGuid"] = "" +} + } + }, + }); + Response response = client.Query(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -349,14 +4545,41 @@ public void Example_Discovery_Suggest_ShortVersion() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Discovery_Suggest_ShortVersion_Async() + public async Task Example_Discovery_Query_DiscoveryQueryTermAssignment_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); - using RequestContent content = RequestContent.Create(new object()); - Response response = await client.SuggestAsync(content); + using RequestContent content = RequestContent.Create(new + { + keywords = "", + limit = 3, + filter = new Dictionary + { + ["$id"] = "5776", + ["or"] = new object[] + { +new Dictionary +{ +["$id"] = "5777", +["term"] = "ExampleTerm" +}, +new Dictionary +{ +["$id"] = "5778", +["term"] = "ExampleTerm", +["glossary"] = "GlossaryName" +}, +new Dictionary +{ +["$id"] = "5779", +["termGuid"] = "" +} + } + }, + }); + Response response = await client.QueryAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -364,162 +4587,227 @@ public async Task Example_Discovery_Suggest_ShortVersion_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Discovery_Suggest_ShortVersion_Convenience() + public void Example_Discovery_Query_DiscoveryQueryTermAssignment_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); - SuggestConfig body = new SuggestConfig(); - Response response = client.Suggest(body); + QueryConfig body = new QueryConfig + { + Keywords = "", + Limit = 3, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "5776", + ["or"] = new object[] + { +new Dictionary +{ +["$id"] = "5777", +["term"] = "ExampleTerm" +}, +new Dictionary +{ +["$id"] = "5778", +["term"] = "ExampleTerm", +["glossary"] = "GlossaryName" +}, +new Dictionary +{ +["$id"] = "5779", +["termGuid"] = "" +} + } + }), + }; + Response response = client.Query(body); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Discovery_Suggest_ShortVersion_Convenience_Async() + public async Task Example_Discovery_Query_DiscoveryQueryTermAssignment_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); - SuggestConfig body = new SuggestConfig(); - Response response = await client.SuggestAsync(body); + QueryConfig body = new QueryConfig + { + Keywords = "", + Limit = 3, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "5776", + ["or"] = new object[] + { +new Dictionary +{ +["$id"] = "5777", +["term"] = "ExampleTerm" +}, +new Dictionary +{ +["$id"] = "5778", +["term"] = "ExampleTerm", +["glossary"] = "GlossaryName" +}, +new Dictionary +{ +["$id"] = "5779", +["termGuid"] = "" +} + } + }), + }; + Response response = await client.QueryAsync(body); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Discovery_Suggest_AllParameters() + public void Example_Discovery_Query_DiscoveryQueryType() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); using RequestContent content = RequestContent.Create(new { - keywords = "", - limit = 1234, - filter = new object(), + limit = 10, + filter = new Dictionary + { + ["$id"] = "5812", + ["and"] = new object[] + { +new Dictionary +{ +["$id"] = "5813", +["entityType"] = "azure_blob_path", +["includeSubTypes"] = false +} + } + }, }); - Response response = client.Suggest(content); + Response response = client.Query(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("value")[0].GetProperty("@search.score").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("@search.text").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("objectType").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("createTime").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("updateTime").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("qualifiedName").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("entityType").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("endorsement").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("owner").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("classification")[0].ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("label")[0].ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("term")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("term")[0].GetProperty("glossaryName").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("term")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("contact")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("contact")[0].GetProperty("info").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("contact")[0].GetProperty("contactType").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("assetType")[0].ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("glossaryType").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("glossary").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("termStatus").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("termTemplate")[0].ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("longDescription").ToString()); + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Discovery_Suggest_AllParameters_Async() + public async Task Example_Discovery_Query_DiscoveryQueryType_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); using RequestContent content = RequestContent.Create(new { - keywords = "", - limit = 1234, - filter = new object(), + limit = 10, + filter = new Dictionary + { + ["$id"] = "5812", + ["and"] = new object[] + { +new Dictionary +{ +["$id"] = "5813", +["entityType"] = "azure_blob_path", +["includeSubTypes"] = false +} + } + }, }); - Response response = await client.SuggestAsync(content); + Response response = await client.QueryAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("value")[0].GetProperty("@search.score").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("@search.text").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("objectType").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("createTime").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("updateTime").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("qualifiedName").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("entityType").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("endorsement").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("owner").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("classification")[0].ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("label")[0].ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("term")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("term")[0].GetProperty("glossaryName").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("term")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("contact")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("contact")[0].GetProperty("info").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("contact")[0].GetProperty("contactType").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("assetType")[0].ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("glossaryType").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("glossary").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("termStatus").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("termTemplate")[0].ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("longDescription").ToString()); + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Discovery_Suggest_AllParameters_Convenience() + public void Example_Discovery_Query_DiscoveryQueryType_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); - SuggestConfig body = new SuggestConfig + QueryConfig body = new QueryConfig { - Keywords = "", - Limit = 1234, - Filter = BinaryData.FromObjectAsJson(new object()), + Limit = 10, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "5812", + ["and"] = new object[] + { +new Dictionary +{ +["$id"] = "5813", +["entityType"] = "azure_blob_path", +["includeSubTypes"] = false +} + } + }), }; - Response response = client.Suggest(body); + Response response = client.Query(body); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Discovery_Suggest_AllParameters_Convenience_Async() + public async Task Example_Discovery_Query_DiscoveryQueryType_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); - SuggestConfig body = new SuggestConfig + QueryConfig body = new QueryConfig { - Keywords = "", - Limit = 1234, - Filter = BinaryData.FromObjectAsJson(new object()), + Limit = 10, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "5812", + ["and"] = new object[] + { +new Dictionary +{ +["$id"] = "5813", +["entityType"] = "azure_blob_path", +["includeSubTypes"] = false +} + } + }), }; - Response response = await client.SuggestAsync(body); + Response response = await client.QueryAsync(body); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Discovery_AutoComplete_ShortVersion() + public void Example_Discovery_Suggest_DiscoverySuggest() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); - using RequestContent content = RequestContent.Create(new object()); - Response response = client.AutoComplete(content); + using RequestContent content = RequestContent.Create(new + { + keywords = "exampledata", + filter = new Dictionary + { + ["$id"] = "5869", + ["and"] = new object[] + { +new Dictionary +{ +["$id"] = "5870", +["entityType"] = "azure_blob_path", +["includeSubTypes"] = false +} + } + }, + limit = 10, + }); + Response response = client.Suggest(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -527,14 +4815,31 @@ public void Example_Discovery_AutoComplete_ShortVersion() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Discovery_AutoComplete_ShortVersion_Async() + public async Task Example_Discovery_Suggest_DiscoverySuggest_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); - using RequestContent content = RequestContent.Create(new object()); - Response response = await client.AutoCompleteAsync(content); + using RequestContent content = RequestContent.Create(new + { + keywords = "exampledata", + filter = new Dictionary + { + ["$id"] = "5869", + ["and"] = new object[] + { +new Dictionary +{ +["$id"] = "5870", +["entityType"] = "azure_blob_path", +["includeSubTypes"] = false +} + } + }, + limit = 10, + }); + Response response = await client.SuggestAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -542,100 +4847,180 @@ public async Task Example_Discovery_AutoComplete_ShortVersion_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Discovery_AutoComplete_ShortVersion_Convenience() + public void Example_Discovery_Suggest_DiscoverySuggest_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); - AutoCompleteConfig body = new AutoCompleteConfig(); - Response response = client.AutoComplete(body); + SuggestConfig body = new SuggestConfig + { + Keywords = "exampledata", + Limit = 10, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "5869", + ["and"] = new object[] + { +new Dictionary +{ +["$id"] = "5870", +["entityType"] = "azure_blob_path", +["includeSubTypes"] = false +} + } + }), + }; + Response response = client.Suggest(body); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Discovery_AutoComplete_ShortVersion_Convenience_Async() + public async Task Example_Discovery_Suggest_DiscoverySuggest_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); - AutoCompleteConfig body = new AutoCompleteConfig(); - Response response = await client.AutoCompleteAsync(body); + SuggestConfig body = new SuggestConfig + { + Keywords = "exampledata", + Limit = 10, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "5869", + ["and"] = new object[] + { +new Dictionary +{ +["$id"] = "5870", +["entityType"] = "azure_blob_path", +["includeSubTypes"] = false +} + } + }), + }; + Response response = await client.SuggestAsync(body); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Discovery_AutoComplete_AllParameters() + public void Example_Discovery_AutoComplete_DiscoveryAutoComplete() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); using RequestContent content = RequestContent.Create(new { - keywords = "", - limit = 1234, - filter = new object(), + keywords = "exa", + filter = new Dictionary + { + ["$id"] = "5924", + ["and"] = new object[] + { +new Dictionary +{ +["$id"] = "5925", +["entityType"] = "azure_blob_path", +["includeSubTypes"] = false +} + } + }, + limit = 10, }); Response response = client.AutoComplete(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("value")[0].GetProperty("text").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("queryPlusText").ToString()); + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Discovery_AutoComplete_AllParameters_Async() + public async Task Example_Discovery_AutoComplete_DiscoveryAutoComplete_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); using RequestContent content = RequestContent.Create(new { - keywords = "", - limit = 1234, - filter = new object(), + keywords = "exa", + filter = new Dictionary + { + ["$id"] = "5924", + ["and"] = new object[] + { +new Dictionary +{ +["$id"] = "5925", +["entityType"] = "azure_blob_path", +["includeSubTypes"] = false +} + } + }, + limit = 10, }); Response response = await client.AutoCompleteAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("value")[0].GetProperty("text").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("queryPlusText").ToString()); + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Discovery_AutoComplete_AllParameters_Convenience() + public void Example_Discovery_AutoComplete_DiscoveryAutoComplete_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); AutoCompleteConfig body = new AutoCompleteConfig { - Keywords = "", - Limit = 1234, - Filter = BinaryData.FromObjectAsJson(new object()), + Keywords = "exa", + Limit = 10, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "5924", + ["and"] = new object[] + { +new Dictionary +{ +["$id"] = "5925", +["entityType"] = "azure_blob_path", +["includeSubTypes"] = false +} + } + }), }; Response response = client.AutoComplete(body); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Discovery_AutoComplete_AllParameters_Convenience_Async() + public async Task Example_Discovery_AutoComplete_DiscoveryAutoComplete_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); AutoCompleteConfig body = new AutoCompleteConfig { - Keywords = "", - Limit = 1234, - Filter = BinaryData.FromObjectAsJson(new object()), + Keywords = "exa", + Limit = 10, + Filter = BinaryData.FromObjectAsJson(new Dictionary + { + ["$id"] = "5924", + ["and"] = new object[] + { +new Dictionary +{ +["$id"] = "5925", +["entityType"] = "azure_blob_path", +["includeSubTypes"] = false +} + } + }), }; Response response = await client.AutoCompleteAsync(body); } diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/tests/Generated/Samples/Samples_Entity.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/tests/Generated/Samples/Samples_Entity.cs index 3fdd99d59980..77e1ee0c2cc3 100644 --- a/sdk/purview/Azure.Analytics.Purview.DataMap/tests/Generated/Samples/Samples_Entity.cs +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/tests/Generated/Samples/Samples_Entity.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using System.IO; using System.Text.Json; using System.Threading.Tasks; using Azure.Core; @@ -20,13 +19,33 @@ public partial class Samples_Entity { [Test] [Ignore("Only validating compilation of examples")] - public void Example_Entity_CreateOrUpdate_ShortVersion() + public void Example_Entity_CreateOrUpdate_EntityAddCustomAttribute() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); - using RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new + { + referredEntities = new object(), + entity = new + { + typeName = "azure_storage_account", + attributes = new + { + owner = "ExampleOwner", + modifiedTime = 0, + createTime = 0, + qualifiedName = "https://exampleaccount.core.windows.net", + name = "ExampleStorageAccount", + }, + customAttributes = new + { + custAttr1 = "attr1", + custAttr2 = "attr2", + }, + }, + }); Response response = client.CreateOrUpdate(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -35,13 +54,33 @@ public void Example_Entity_CreateOrUpdate_ShortVersion() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_CreateOrUpdate_ShortVersion_Async() + public async Task Example_Entity_CreateOrUpdate_EntityAddCustomAttribute_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); - using RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new + { + referredEntities = new object(), + entity = new + { + typeName = "azure_storage_account", + attributes = new + { + owner = "ExampleOwner", + modifiedTime = 0, + createTime = 0, + qualifiedName = "https://exampleaccount.core.windows.net", + name = "ExampleStorageAccount", + }, + customAttributes = new + { + custAttr1 = "attr1", + custAttr2 = "attr2", + }, + }, + }); Response response = await client.CreateOrUpdateAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -50,553 +89,120 @@ public async Task Example_Entity_CreateOrUpdate_ShortVersion_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Entity_CreateOrUpdate_ShortVersion_Convenience() + public void Example_Entity_CreateOrUpdate_EntityAddCustomAttribute_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); - AtlasEntityWithExtInfo body = new AtlasEntityWithExtInfo(); + AtlasEntityWithExtInfo body = new AtlasEntityWithExtInfo + { + ReferredEntities = { }, + Entity = new AtlasEntity + { + Attributes = +{ +["owner"] = BinaryData.FromObjectAsJson("ExampleOwner"), +["modifiedTime"] = BinaryData.FromObjectAsJson(0), +["createTime"] = BinaryData.FromObjectAsJson(0), +["qualifiedName"] = BinaryData.FromObjectAsJson("https://exampleaccount.core.windows.net"), +["name"] = BinaryData.FromObjectAsJson("ExampleStorageAccount"), +["description"] = null, +["publicAccessLevel"] = null +}, + TypeName = "azure_storage_account", + CustomAttributes = +{ +["custAttr1"] = "attr1", +["custAttr2"] = "attr2" +}, + }, + }; Response response = client.CreateOrUpdate(body); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_CreateOrUpdate_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - AtlasEntityWithExtInfo body = new AtlasEntityWithExtInfo(); - Response response = await client.CreateOrUpdateAsync(body); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Entity_CreateOrUpdate_AllParameters() + public async Task Example_Entity_CreateOrUpdate_EntityAddCustomAttribute_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); - using RequestContent content = RequestContent.Create(new + AtlasEntityWithExtInfo body = new AtlasEntityWithExtInfo { - referredEntities = new + ReferredEntities = { }, + Entity = new AtlasEntity { - key = new - { - attributes = new - { - key = new object(), - }, - typeName = "", - lastModifiedTS = "", - businessAttributes = new - { - key = new object(), - }, - classifications = new object[] - { -new -{ -attributes = new + Attributes = { -key = new object(), +["owner"] = BinaryData.FromObjectAsJson("ExampleOwner"), +["modifiedTime"] = BinaryData.FromObjectAsJson(0), +["createTime"] = BinaryData.FromObjectAsJson(0), +["qualifiedName"] = BinaryData.FromObjectAsJson("https://exampleaccount.core.windows.net"), +["name"] = BinaryData.FromObjectAsJson("ExampleStorageAccount"), +["description"] = null, +["publicAccessLevel"] = null }, -typeName = "", -lastModifiedTS = "", -entityGuid = "", -entityStatus = "ACTIVE", -removePropagationsOnEntityDelete = true, -validityPeriods = new object[] -{ -new + TypeName = "azure_storage_account", + CustomAttributes = { -endTime = "", -startTime = "", -timeZone = "", -} +["custAttr1"] = "attr1", +["custAttr2"] = "attr2" }, -} - }, - createTime = 1234L, - createdBy = "", - customAttributes = new - { - key = "", - }, - guid = "", - homeId = "", - isIncomplete = true, - labels = new object[] - { -"" - }, - meanings = new object[] - { -new -{ -confidence = 1234, -createdBy = "", -description = "", -displayText = "", -expression = "", -relationGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", -status = "DISCOVERED", -steward = "", -termGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", -} - }, - provenanceType = 1234, - proxy = true, - relationshipAttributes = new - { - key = new object(), - }, - status = "ACTIVE", - updateTime = 1234L, - updatedBy = "", - version = 1234L, - contacts = new - { - key = new object[] - { -new -{ -id = "", -info = "", -} - }, - }, - }, }, - }); - Response response = client.CreateOrUpdate(content, businessAttributeUpdateBehavior: "ignore", collectionId: ""); + }; + Response response = await client.CreateOrUpdateAsync(body); + } - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meaningNames")[0].ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_CreateOrUpdate_AllParameters_Async() - { - Uri endpoint = new Uri(""); + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_CreateOrUpdate_EntityCreate() + { + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); using RequestContent content = RequestContent.Create(new { - referredEntities = new + referredEntities = new object(), + entity = new { - key = new + typeName = "azure_storage_account", + attributes = new { - attributes = new - { - key = new object(), - }, - typeName = "", - lastModifiedTS = "", - businessAttributes = new - { - key = new object(), - }, - classifications = new object[] - { -new -{ -attributes = new -{ -key = new object(), -}, -typeName = "", -lastModifiedTS = "", -entityGuid = "", -entityStatus = "ACTIVE", -removePropagationsOnEntityDelete = true, -validityPeriods = new object[] -{ -new -{ -endTime = "", -startTime = "", -timeZone = "", -} -}, -} - }, - createTime = 1234L, - createdBy = "", - customAttributes = new - { - key = "", - }, - guid = "", - homeId = "", - isIncomplete = true, - labels = new object[] - { -"" - }, - meanings = new object[] + owner = "ExampleOwner", + modifiedTime = 0, + createTime = 0, + qualifiedName = "https://exampleaccount.core.windows.net", + name = "ExampleStorageAccount", + }, + contacts = new + { + Expert = new object[] { new { -confidence = 1234, -createdBy = "", -description = "", -displayText = "", -expression = "", -relationGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", -status = "DISCOVERED", -steward = "", -termGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", +id = "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", +info = "Example Expert Info", } }, - provenanceType = 1234, - proxy = true, - relationshipAttributes = new - { - key = new object(), - }, - status = "ACTIVE", - updateTime = 1234L, - updatedBy = "", - version = 1234L, - contacts = new - { - key = new object[] + Owner = new object[] { new { -id = "", -info = "", +id = "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", +info = "Example Owner Info", } }, - }, }, + status = "ACTIVE", + createdBy = "ExampleCreator", + updatedBy = "ExampleUpdator", + version = 0, }, }); - Response response = await client.CreateOrUpdateAsync(content, businessAttributeUpdateBehavior: "ignore", collectionId: ""); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meaningNames")[0].ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Entity_CreateOrUpdate_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); - - AtlasEntityWithExtInfo body = new AtlasEntityWithExtInfo - { - ReferredEntities = -{ -["key"] = new AtlasEntity -{ -Attributes = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -}, -TypeName = "", -LastModifiedTS = "", -BusinessAttributes = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -}, -Classifications = {new AtlasClassification -{ -Attributes = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -}, -TypeName = "", -LastModifiedTS = "", -EntityGuid = "", -EntityStatus = EntityStatus.Active, -RemovePropagationsOnEntityDelete = true, -ValidityPeriods = {new TimeBoundary -{ -EndTime = "", -StartTime = "", -TimeZone = "", -}}, -}}, -CreateTime = 1234L, -CreatedBy = "", -CustomAttributes = -{ -["key"] = "" -}, -Guid = "", -HomeId = "", -IsIncomplete = true, -Labels = {""}, -Meanings = {new AtlasTermAssignmentHeader -{ -Confidence = 1234, -CreatedBy = "", -Description = "", -DisplayText = "", -Expression = "", -RelationGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), -Status = AtlasTermAssignmentStatus.Discovered, -Steward = "", -TermGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), -}}, -ProvenanceType = 1234, -Proxy = true, -RelationshipAttributes = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -}, -Status = EntityStatus.Active, -UpdateTime = 1234L, -UpdatedBy = "", -Version = 1234L, -Contacts = -{ -["key"] = {new ContactInfo -{ -Id = "", -Info = "", -}} -}, -} -}, - Entity = default, - }; - Response response = client.CreateOrUpdate(body, businessAttributeUpdateBehavior: BusinessAttributeUpdateBehavior.Ignore, collectionId: ""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_CreateOrUpdate_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); - - AtlasEntityWithExtInfo body = new AtlasEntityWithExtInfo - { - ReferredEntities = -{ -["key"] = new AtlasEntity -{ -Attributes = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -}, -TypeName = "", -LastModifiedTS = "", -BusinessAttributes = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -}, -Classifications = {new AtlasClassification -{ -Attributes = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -}, -TypeName = "", -LastModifiedTS = "", -EntityGuid = "", -EntityStatus = EntityStatus.Active, -RemovePropagationsOnEntityDelete = true, -ValidityPeriods = {new TimeBoundary -{ -EndTime = "", -StartTime = "", -TimeZone = "", -}}, -}}, -CreateTime = 1234L, -CreatedBy = "", -CustomAttributes = -{ -["key"] = "" -}, -Guid = "", -HomeId = "", -IsIncomplete = true, -Labels = {""}, -Meanings = {new AtlasTermAssignmentHeader -{ -Confidence = 1234, -CreatedBy = "", -Description = "", -DisplayText = "", -Expression = "", -RelationGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), -Status = AtlasTermAssignmentStatus.Discovered, -Steward = "", -TermGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), -}}, -ProvenanceType = 1234, -Proxy = true, -RelationshipAttributes = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -}, -Status = EntityStatus.Active, -UpdateTime = 1234L, -UpdatedBy = "", -Version = 1234L, -Contacts = -{ -["key"] = {new ContactInfo -{ -Id = "", -Info = "", -}} -}, -} -}, - Entity = default, - }; - Response response = await client.CreateOrUpdateAsync(body, businessAttributeUpdateBehavior: BusinessAttributeUpdateBehavior.Ignore, collectionId: ""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Entity_GetByIds_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = client.GetByIds(new string[] { "" }, null, null, null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_GetByIds_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = await client.GetByIdsAsync(new string[] { "" }, null, null, null); + Response response = client.CreateOrUpdate(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -604,4389 +210,1042 @@ public async Task Example_Entity_GetByIds_ShortVersion_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Entity_GetByIds_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = client.GetByIds(new string[] { "" }); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_GetByIds_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = await client.GetByIdsAsync(new string[] { "" }); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Entity_GetByIds_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); - - Response response = client.GetByIds(new string[] { "" }, true, true, null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("businessAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createTime").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("customAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("homeId").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("collectionId").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("provenanceType").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("proxy").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("relationshipAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updateTime").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updatedBy").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("businessAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("createTime").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("customAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("homeId").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("collectionId").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("provenanceType").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("proxy").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("relationshipAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("updateTime").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("updatedBy").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_GetByIds_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); - - Response response = await client.GetByIdsAsync(new string[] { "" }, true, true, null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("businessAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createTime").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("customAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("homeId").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("collectionId").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("provenanceType").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("proxy").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("relationshipAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updateTime").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updatedBy").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("businessAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("createTime").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("customAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("homeId").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("collectionId").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("provenanceType").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("proxy").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("relationshipAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("updateTime").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("updatedBy").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Entity_GetByIds_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); - - Response response = client.GetByIds(new string[] { "" }, minExtInfo: true, ignoreRelationships: true); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_GetByIds_AllParameters_Convenience_Async() + public async Task Example_Entity_CreateOrUpdate_EntityCreate_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); - Response response = await client.GetByIdsAsync(new string[] { "" }, minExtInfo: true, ignoreRelationships: true); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Entity_BatchCreateOrUpdate_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - using RequestContent content = RequestContent.Create(new object()); - Response response = client.BatchCreateOrUpdate(content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_BatchCreateOrUpdate_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - using RequestContent content = RequestContent.Create(new object()); - Response response = await client.BatchCreateOrUpdateAsync(content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Entity_BatchCreateOrUpdate_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - AtlasEntitiesWithExtInfo body = new AtlasEntitiesWithExtInfo(); - Response response = client.BatchCreateOrUpdate(body); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_BatchCreateOrUpdate_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - AtlasEntitiesWithExtInfo body = new AtlasEntitiesWithExtInfo(); - Response response = await client.BatchCreateOrUpdateAsync(body); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Entity_BatchCreateOrUpdate_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); - - using RequestContent content = RequestContent.Create(new - { - referredEntities = new - { - key = new - { - attributes = new - { - key = new object(), - }, - typeName = "", - lastModifiedTS = "", - businessAttributes = new - { - key = new object(), - }, - classifications = new object[] - { -new -{ -attributes = new -{ -key = new object(), -}, -typeName = "", -lastModifiedTS = "", -entityGuid = "", -entityStatus = "ACTIVE", -removePropagationsOnEntityDelete = true, -validityPeriods = new object[] -{ -new -{ -endTime = "", -startTime = "", -timeZone = "", -} -}, -} - }, - createTime = 1234L, - createdBy = "", - customAttributes = new - { - key = "", - }, - guid = "", - homeId = "", - isIncomplete = true, - labels = new object[] - { -"" - }, - meanings = new object[] - { -new -{ -confidence = 1234, -createdBy = "", -description = "", -displayText = "", -expression = "", -relationGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", -status = "DISCOVERED", -steward = "", -termGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", -} - }, - provenanceType = 1234, - proxy = true, - relationshipAttributes = new - { - key = new object(), - }, - status = "ACTIVE", - updateTime = 1234L, - updatedBy = "", - version = 1234L, - contacts = new - { - key = new object[] - { -new -{ -id = "", -info = "", -} - }, - }, - }, - }, - entities = new object[] - { -null - }, - }); - Response response = client.BatchCreateOrUpdate(content, collectionId: "", businessAttributeUpdateBehavior: "ignore"); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meaningNames")[0].ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_BatchCreateOrUpdate_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); - - using RequestContent content = RequestContent.Create(new - { - referredEntities = new - { - key = new - { - attributes = new - { - key = new object(), - }, - typeName = "", - lastModifiedTS = "", - businessAttributes = new - { - key = new object(), - }, - classifications = new object[] - { -new -{ -attributes = new -{ -key = new object(), -}, -typeName = "", -lastModifiedTS = "", -entityGuid = "", -entityStatus = "ACTIVE", -removePropagationsOnEntityDelete = true, -validityPeriods = new object[] -{ -new -{ -endTime = "", -startTime = "", -timeZone = "", -} -}, -} - }, - createTime = 1234L, - createdBy = "", - customAttributes = new - { - key = "", - }, - guid = "", - homeId = "", - isIncomplete = true, - labels = new object[] - { -"" - }, - meanings = new object[] - { -new -{ -confidence = 1234, -createdBy = "", -description = "", -displayText = "", -expression = "", -relationGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", -status = "DISCOVERED", -steward = "", -termGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", -} - }, - provenanceType = 1234, - proxy = true, - relationshipAttributes = new - { - key = new object(), - }, - status = "ACTIVE", - updateTime = 1234L, - updatedBy = "", - version = 1234L, - contacts = new - { - key = new object[] - { -new -{ -id = "", -info = "", -} - }, - }, - }, - }, - entities = new object[] - { -null - }, - }); - Response response = await client.BatchCreateOrUpdateAsync(content, collectionId: "", businessAttributeUpdateBehavior: "ignore"); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meaningNames")[0].ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Entity_BatchCreateOrUpdate_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); - - AtlasEntitiesWithExtInfo body = new AtlasEntitiesWithExtInfo - { - ReferredEntities = -{ -["key"] = new AtlasEntity -{ -Attributes = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -}, -TypeName = "", -LastModifiedTS = "", -BusinessAttributes = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -}, -Classifications = {new AtlasClassification -{ -Attributes = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -}, -TypeName = "", -LastModifiedTS = "", -EntityGuid = "", -EntityStatus = EntityStatus.Active, -RemovePropagationsOnEntityDelete = true, -ValidityPeriods = {new TimeBoundary -{ -EndTime = "", -StartTime = "", -TimeZone = "", -}}, -}}, -CreateTime = 1234L, -CreatedBy = "", -CustomAttributes = -{ -["key"] = "" -}, -Guid = "", -HomeId = "", -IsIncomplete = true, -Labels = {""}, -Meanings = {new AtlasTermAssignmentHeader -{ -Confidence = 1234, -CreatedBy = "", -Description = "", -DisplayText = "", -Expression = "", -RelationGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), -Status = AtlasTermAssignmentStatus.Discovered, -Steward = "", -TermGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), -}}, -ProvenanceType = 1234, -Proxy = true, -RelationshipAttributes = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -}, -Status = EntityStatus.Active, -UpdateTime = 1234L, -UpdatedBy = "", -Version = 1234L, -Contacts = -{ -["key"] = {new ContactInfo -{ -Id = "", -Info = "", -}} -}, -} -}, - Entities = { default }, - }; - Response response = client.BatchCreateOrUpdate(body, collectionId: "", businessAttributeUpdateBehavior: BusinessAttributeUpdateBehavior.Ignore); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_BatchCreateOrUpdate_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); - - AtlasEntitiesWithExtInfo body = new AtlasEntitiesWithExtInfo - { - ReferredEntities = -{ -["key"] = new AtlasEntity -{ -Attributes = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -}, -TypeName = "", -LastModifiedTS = "", -BusinessAttributes = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -}, -Classifications = {new AtlasClassification -{ -Attributes = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -}, -TypeName = "", -LastModifiedTS = "", -EntityGuid = "", -EntityStatus = EntityStatus.Active, -RemovePropagationsOnEntityDelete = true, -ValidityPeriods = {new TimeBoundary -{ -EndTime = "", -StartTime = "", -TimeZone = "", -}}, -}}, -CreateTime = 1234L, -CreatedBy = "", -CustomAttributes = -{ -["key"] = "" -}, -Guid = "", -HomeId = "", -IsIncomplete = true, -Labels = {""}, -Meanings = {new AtlasTermAssignmentHeader -{ -Confidence = 1234, -CreatedBy = "", -Description = "", -DisplayText = "", -Expression = "", -RelationGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), -Status = AtlasTermAssignmentStatus.Discovered, -Steward = "", -TermGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), -}}, -ProvenanceType = 1234, -Proxy = true, -RelationshipAttributes = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -}, -Status = EntityStatus.Active, -UpdateTime = 1234L, -UpdatedBy = "", -Version = 1234L, -Contacts = -{ -["key"] = {new ContactInfo -{ -Id = "", -Info = "", -}} -}, -} -}, - Entities = { default }, - }; - Response response = await client.BatchCreateOrUpdateAsync(body, collectionId: "", businessAttributeUpdateBehavior: BusinessAttributeUpdateBehavior.Ignore); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Entity_BatchDelete_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = client.BatchDelete(new string[] { "" }, null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_BatchDelete_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = await client.BatchDeleteAsync(new string[] { "" }, null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Entity_BatchDelete_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = client.BatchDelete(new string[] { "" }); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_BatchDelete_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = await client.BatchDeleteAsync(new string[] { "" }); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Entity_BatchDelete_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = client.BatchDelete(new string[] { "" }, null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meaningNames")[0].ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_BatchDelete_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = await client.BatchDeleteAsync(new string[] { "" }, null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meaningNames")[0].ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Entity_BatchDelete_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = client.BatchDelete(new string[] { "" }); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_BatchDelete_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = await client.BatchDeleteAsync(new string[] { "" }); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Entity_AddClassification_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - using RequestContent content = RequestContent.Create(new object()); - Response response = client.AddClassification(content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_AddClassification_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - using RequestContent content = RequestContent.Create(new object()); - Response response = await client.AddClassificationAsync(content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Entity_AddClassification_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - ClassificationAssociateConfig body = new ClassificationAssociateConfig(); - Response response = client.AddClassification(body); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_AddClassification_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - ClassificationAssociateConfig body = new ClassificationAssociateConfig(); - Response response = await client.AddClassificationAsync(body); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Entity_AddClassification_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - using RequestContent content = RequestContent.Create(new - { - classification = new - { - attributes = new - { - key = new object(), - }, - typeName = "", - lastModifiedTS = "", - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new object[] - { -new -{ -endTime = "", -startTime = "", -timeZone = "", -} - }, - }, - entityGuids = new object[] - { -"" - }, - }); - Response response = client.AddClassification(content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_AddClassification_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - using RequestContent content = RequestContent.Create(new - { - classification = new - { - attributes = new - { - key = new object(), - }, - typeName = "", - lastModifiedTS = "", - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new object[] - { -new -{ -endTime = "", -startTime = "", -timeZone = "", -} - }, - }, - entityGuids = new object[] - { -"" - }, - }); - Response response = await client.AddClassificationAsync(content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Entity_AddClassification_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - ClassificationAssociateConfig body = new ClassificationAssociateConfig - { - Classification = new AtlasClassification - { - Attributes = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -}, - TypeName = "", - LastModifiedTS = "", - EntityGuid = "", - EntityStatus = EntityStatus.Active, - RemovePropagationsOnEntityDelete = true, - ValidityPeriods = {new TimeBoundary -{ -EndTime = "", -StartTime = "", -TimeZone = "", -}}, - }, - EntityGuids = { "" }, - }; - Response response = client.AddClassification(body); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_AddClassification_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - ClassificationAssociateConfig body = new ClassificationAssociateConfig - { - Classification = new AtlasClassification - { - Attributes = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -}, - TypeName = "", - LastModifiedTS = "", - EntityGuid = "", - EntityStatus = EntityStatus.Active, - RemovePropagationsOnEntityDelete = true, - ValidityPeriods = {new TimeBoundary -{ -EndTime = "", -StartTime = "", -TimeZone = "", -}}, - }, - EntityGuids = { "" }, - }; - Response response = await client.AddClassificationAsync(body); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Entity_GetEntity_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = client.GetEntity("", null, null, null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_GetEntity_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = await client.GetEntityAsync("", null, null, null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Entity_GetEntity_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = client.GetEntity(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_GetEntity_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = await client.GetEntityAsync(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Entity_GetEntity_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = client.GetEntity("", true, true, null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("businessAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createTime").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("customAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("homeId").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("collectionId").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("provenanceType").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("proxy").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("relationshipAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updateTime").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updatedBy").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("businessAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("createTime").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("customAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("homeId").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("collectionId").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("provenanceType").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("proxy").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("relationshipAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("updateTime").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("updatedBy").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_GetEntity_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = await client.GetEntityAsync("", true, true, null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("businessAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createTime").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("customAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("homeId").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("collectionId").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("provenanceType").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("proxy").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("relationshipAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updateTime").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updatedBy").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("businessAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("createTime").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("customAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("homeId").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("collectionId").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("provenanceType").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("proxy").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("relationshipAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("updateTime").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("updatedBy").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Entity_GetEntity_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = client.GetEntity("", minExtInfo: true, ignoreRelationships: true); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_GetEntity_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = await client.GetEntityAsync("", minExtInfo: true, ignoreRelationships: true); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Entity_UpdateAttributeById_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - using RequestContent content = RequestContent.Create(new object()); - Response response = client.UpdateAttributeById("", "", content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_UpdateAttributeById_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - using RequestContent content = RequestContent.Create(new object()); - Response response = await client.UpdateAttributeByIdAsync("", "", content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Entity_UpdateAttributeById_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = client.UpdateAttributeById("", "", BinaryData.FromObjectAsJson(new object())); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_UpdateAttributeById_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = await client.UpdateAttributeByIdAsync("", "", BinaryData.FromObjectAsJson(new object())); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Entity_UpdateAttributeById_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - using RequestContent content = RequestContent.Create(new object()); - Response response = client.UpdateAttributeById("", "", content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meaningNames")[0].ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_UpdateAttributeById_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - using RequestContent content = RequestContent.Create(new object()); - Response response = await client.UpdateAttributeByIdAsync("", "", content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meaningNames")[0].ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Entity_UpdateAttributeById_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = client.UpdateAttributeById("", "", BinaryData.FromObjectAsJson(new object())); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_UpdateAttributeById_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = await client.UpdateAttributeByIdAsync("", "", BinaryData.FromObjectAsJson(new object())); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Entity_Delete_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = client.Delete("", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_Delete_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = await client.DeleteAsync("", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Entity_Delete_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = client.Delete(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_Delete_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = await client.DeleteAsync(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Entity_Delete_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = client.Delete("", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meaningNames")[0].ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_Delete_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = await client.DeleteAsync("", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meaningNames")[0].ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Entity_Delete_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = client.Delete(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_Delete_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = await client.DeleteAsync(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Entity_GetClassification_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = client.GetClassification("", "", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_GetClassification_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = await client.GetClassificationAsync("", "", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Entity_GetClassification_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = client.GetClassification("", ""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_GetClassification_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = await client.GetClassificationAsync("", ""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Entity_GetClassification_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = client.GetClassification("", "", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_GetClassification_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = await client.GetClassificationAsync("", "", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Entity_GetClassification_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = client.GetClassification("", ""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_GetClassification_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = await client.GetClassificationAsync("", ""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Entity_RemoveClassification_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = client.RemoveClassification("", ""); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_RemoveClassification_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = await client.RemoveClassificationAsync("", ""); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Entity_RemoveClassification_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = client.RemoveClassification("", ""); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_RemoveClassification_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = await client.RemoveClassificationAsync("", ""); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Entity_GetClassifications_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = client.GetClassifications("", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_GetClassifications_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = await client.GetClassificationsAsync("", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Entity_GetClassifications_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = client.GetClassifications(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_GetClassifications_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = await client.GetClassificationsAsync(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Entity_GetClassifications_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = client.GetClassifications("", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("list")[0].ToString()); - Console.WriteLine(result.GetProperty("pageSize").ToString()); - Console.WriteLine(result.GetProperty("sortBy").ToString()); - Console.WriteLine(result.GetProperty("sortType").ToString()); - Console.WriteLine(result.GetProperty("startIndex").ToString()); - Console.WriteLine(result.GetProperty("totalCount").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_GetClassifications_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = await client.GetClassificationsAsync("", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("list")[0].ToString()); - Console.WriteLine(result.GetProperty("pageSize").ToString()); - Console.WriteLine(result.GetProperty("sortBy").ToString()); - Console.WriteLine(result.GetProperty("sortType").ToString()); - Console.WriteLine(result.GetProperty("startIndex").ToString()); - Console.WriteLine(result.GetProperty("totalCount").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Entity_GetClassifications_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = client.GetClassifications(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_GetClassifications_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = await client.GetClassificationsAsync(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Entity_AddClassifications_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - using RequestContent content = RequestContent.Create(new object[] - { -new object() - }); - Response response = client.AddClassifications("", content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_AddClassifications_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - using RequestContent content = RequestContent.Create(new object[] - { -new object() - }); - Response response = await client.AddClassificationsAsync("", content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Entity_AddClassifications_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = client.AddClassifications("", new AtlasClassification[] - { -new AtlasClassification() - }); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_AddClassifications_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = await client.AddClassificationsAsync("", new AtlasClassification[] - { -new AtlasClassification() - }); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Entity_AddClassifications_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - using RequestContent content = RequestContent.Create(new object[] - { -new -{ -attributes = new -{ -key = new object(), -}, -typeName = "", -lastModifiedTS = "", -entityGuid = "", -entityStatus = "ACTIVE", -removePropagationsOnEntityDelete = true, -validityPeriods = new object[] -{ -new -{ -endTime = "", -startTime = "", -timeZone = "", -} -}, -} - }); - Response response = client.AddClassifications("", content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_AddClassifications_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - using RequestContent content = RequestContent.Create(new object[] - { -new -{ -attributes = new -{ -key = new object(), -}, -typeName = "", -lastModifiedTS = "", -entityGuid = "", -entityStatus = "ACTIVE", -removePropagationsOnEntityDelete = true, -validityPeriods = new object[] -{ -new -{ -endTime = "", -startTime = "", -timeZone = "", -} -}, -} - }); - Response response = await client.AddClassificationsAsync("", content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Entity_AddClassifications_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = client.AddClassifications("", new AtlasClassification[] - { -new AtlasClassification -{ -Attributes = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -}, -TypeName = "", -LastModifiedTS = "", -EntityGuid = "", -EntityStatus = EntityStatus.Active, -RemovePropagationsOnEntityDelete = true, -ValidityPeriods = {new TimeBoundary -{ -EndTime = "", -StartTime = "", -TimeZone = "", -}}, -} - }); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_AddClassifications_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = await client.AddClassificationsAsync("", new AtlasClassification[] - { -new AtlasClassification -{ -Attributes = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -}, -TypeName = "", -LastModifiedTS = "", -EntityGuid = "", -EntityStatus = EntityStatus.Active, -RemovePropagationsOnEntityDelete = true, -ValidityPeriods = {new TimeBoundary -{ -EndTime = "", -StartTime = "", -TimeZone = "", -}}, -} - }); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Entity_UpdateClassifications_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - using RequestContent content = RequestContent.Create(new object[] - { -new object() - }); - Response response = client.UpdateClassifications("", content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_UpdateClassifications_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - using RequestContent content = RequestContent.Create(new object[] - { -new object() - }); - Response response = await client.UpdateClassificationsAsync("", content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Entity_UpdateClassifications_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = client.UpdateClassifications("", new AtlasClassification[] - { -new AtlasClassification() - }); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_UpdateClassifications_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = await client.UpdateClassificationsAsync("", new AtlasClassification[] - { -new AtlasClassification() - }); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Entity_UpdateClassifications_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - using RequestContent content = RequestContent.Create(new object[] - { -new -{ -attributes = new -{ -key = new object(), -}, -typeName = "", -lastModifiedTS = "", -entityGuid = "", -entityStatus = "ACTIVE", -removePropagationsOnEntityDelete = true, -validityPeriods = new object[] -{ -new -{ -endTime = "", -startTime = "", -timeZone = "", -} -}, -} - }); - Response response = client.UpdateClassifications("", content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_UpdateClassifications_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - using RequestContent content = RequestContent.Create(new object[] - { -new -{ -attributes = new -{ -key = new object(), -}, -typeName = "", -lastModifiedTS = "", -entityGuid = "", -entityStatus = "ACTIVE", -removePropagationsOnEntityDelete = true, -validityPeriods = new object[] -{ -new -{ -endTime = "", -startTime = "", -timeZone = "", -} -}, -} - }); - Response response = await client.UpdateClassificationsAsync("", content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Entity_UpdateClassifications_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = client.UpdateClassifications("", new AtlasClassification[] - { -new AtlasClassification -{ -Attributes = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -}, -TypeName = "", -LastModifiedTS = "", -EntityGuid = "", -EntityStatus = EntityStatus.Active, -RemovePropagationsOnEntityDelete = true, -ValidityPeriods = {new TimeBoundary -{ -EndTime = "", -StartTime = "", -TimeZone = "", -}}, -} - }); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_UpdateClassifications_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = await client.UpdateClassificationsAsync("", new AtlasClassification[] - { -new AtlasClassification -{ -Attributes = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -}, -TypeName = "", -LastModifiedTS = "", -EntityGuid = "", -EntityStatus = EntityStatus.Active, -RemovePropagationsOnEntityDelete = true, -ValidityPeriods = {new TimeBoundary -{ -EndTime = "", -StartTime = "", -TimeZone = "", -}}, -} - }); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Entity_GetByUniqueAttribute_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = client.GetByUniqueAttribute("", null, null, null, null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_GetByUniqueAttribute_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = await client.GetByUniqueAttributeAsync("", null, null, null, null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Entity_GetByUniqueAttribute_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = client.GetByUniqueAttribute(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_GetByUniqueAttribute_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = await client.GetByUniqueAttributeAsync(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Entity_GetByUniqueAttribute_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = client.GetByUniqueAttribute("", true, true, "", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("businessAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createTime").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("customAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("homeId").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("collectionId").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("provenanceType").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("proxy").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("relationshipAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updateTime").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updatedBy").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("businessAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("createTime").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("customAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("homeId").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("collectionId").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("provenanceType").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("proxy").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("relationshipAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("updateTime").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("updatedBy").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_GetByUniqueAttribute_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = await client.GetByUniqueAttributeAsync("", true, true, "", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("businessAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createTime").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("customAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("homeId").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("collectionId").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("provenanceType").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("proxy").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("relationshipAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updateTime").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updatedBy").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("businessAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("createTime").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("customAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("homeId").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("collectionId").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("provenanceType").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("proxy").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("relationshipAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("updateTime").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("updatedBy").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Entity_GetByUniqueAttribute_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = client.GetByUniqueAttribute("", minExtInfo: true, ignoreRelationships: true, attribute: ""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_GetByUniqueAttribute_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = await client.GetByUniqueAttributeAsync("", minExtInfo: true, ignoreRelationships: true, attribute: ""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Entity_UpdateByUniqueAttribute_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - using RequestContent content = RequestContent.Create(new object()); - Response response = client.UpdateByUniqueAttribute("", content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_UpdateByUniqueAttribute_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - using RequestContent content = RequestContent.Create(new object()); - Response response = await client.UpdateByUniqueAttributeAsync("", content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Entity_UpdateByUniqueAttribute_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - AtlasEntityWithExtInfo body = new AtlasEntityWithExtInfo(); - Response response = client.UpdateByUniqueAttribute("", body); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_UpdateByUniqueAttribute_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - AtlasEntityWithExtInfo body = new AtlasEntityWithExtInfo(); - Response response = await client.UpdateByUniqueAttributeAsync("", body); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Entity_UpdateByUniqueAttribute_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - using RequestContent content = RequestContent.Create(new { - referredEntities = new + referredEntities = new object(), + entity = new { - key = new + typeName = "azure_storage_account", + attributes = new { - attributes = new - { - key = new object(), - }, - typeName = "", - lastModifiedTS = "", - businessAttributes = new - { - key = new object(), - }, - classifications = new object[] - { -new -{ -attributes = new -{ -key = new object(), -}, -typeName = "", -lastModifiedTS = "", -entityGuid = "", -entityStatus = "ACTIVE", -removePropagationsOnEntityDelete = true, -validityPeriods = new object[] -{ -new -{ -endTime = "", -startTime = "", -timeZone = "", -} -}, -} - }, - createTime = 1234L, - createdBy = "", - customAttributes = new - { - key = "", - }, - guid = "", - homeId = "", - isIncomplete = true, - labels = new object[] - { -"" - }, - meanings = new object[] - { -new -{ -confidence = 1234, -createdBy = "", -description = "", -displayText = "", -expression = "", -relationGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", -status = "DISCOVERED", -steward = "", -termGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", -} - }, - provenanceType = 1234, - proxy = true, - relationshipAttributes = new - { - key = new object(), - }, - status = "ACTIVE", - updateTime = 1234L, - updatedBy = "", - version = 1234L, - contacts = new - { - key = new object[] - { -new -{ -id = "", -info = "", -} - }, - }, + owner = "ExampleOwner", + modifiedTime = 0, + createTime = 0, + qualifiedName = "https://exampleaccount.core.windows.net", + name = "ExampleStorageAccount", }, - }, - }); - Response response = client.UpdateByUniqueAttribute("", content, attribute: ""); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meaningNames")[0].ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_UpdateByUniqueAttribute_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - using RequestContent content = RequestContent.Create(new - { - referredEntities = new - { - key = new + contacts = new { - attributes = new - { - key = new object(), - }, - typeName = "", - lastModifiedTS = "", - businessAttributes = new - { - key = new object(), - }, - classifications = new object[] - { -new -{ -attributes = new -{ -key = new object(), -}, -typeName = "", -lastModifiedTS = "", -entityGuid = "", -entityStatus = "ACTIVE", -removePropagationsOnEntityDelete = true, -validityPeriods = new object[] -{ -new -{ -endTime = "", -startTime = "", -timeZone = "", -} -}, -} - }, - createTime = 1234L, - createdBy = "", - customAttributes = new - { - key = "", - }, - guid = "", - homeId = "", - isIncomplete = true, - labels = new object[] - { -"" - }, - meanings = new object[] - { -new -{ -confidence = 1234, -createdBy = "", -description = "", -displayText = "", -expression = "", -relationGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", -status = "DISCOVERED", -steward = "", -termGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", -} - }, - provenanceType = 1234, - proxy = true, - relationshipAttributes = new - { - key = new object(), - }, - status = "ACTIVE", - updateTime = 1234L, - updatedBy = "", - version = 1234L, - contacts = new - { - key = new object[] - { -new -{ -id = "", -info = "", -} - }, - }, - }, - }, - }); - Response response = await client.UpdateByUniqueAttributeAsync("", content, attribute: ""); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meaningNames")[0].ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Entity_UpdateByUniqueAttribute_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - AtlasEntityWithExtInfo body = new AtlasEntityWithExtInfo - { - ReferredEntities = -{ -["key"] = new AtlasEntity -{ -Attributes = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -}, -TypeName = "", -LastModifiedTS = "", -BusinessAttributes = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -}, -Classifications = {new AtlasClassification -{ -Attributes = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -}, -TypeName = "", -LastModifiedTS = "", -EntityGuid = "", -EntityStatus = EntityStatus.Active, -RemovePropagationsOnEntityDelete = true, -ValidityPeriods = {new TimeBoundary -{ -EndTime = "", -StartTime = "", -TimeZone = "", -}}, -}}, -CreateTime = 1234L, -CreatedBy = "", -CustomAttributes = -{ -["key"] = "" -}, -Guid = "", -HomeId = "", -IsIncomplete = true, -Labels = {""}, -Meanings = {new AtlasTermAssignmentHeader -{ -Confidence = 1234, -CreatedBy = "", -Description = "", -DisplayText = "", -Expression = "", -RelationGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), -Status = AtlasTermAssignmentStatus.Discovered, -Steward = "", -TermGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), -}}, -ProvenanceType = 1234, -Proxy = true, -RelationshipAttributes = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -}, -Status = EntityStatus.Active, -UpdateTime = 1234L, -UpdatedBy = "", -Version = 1234L, -Contacts = -{ -["key"] = {new ContactInfo -{ -Id = "", -Info = "", -}} -}, -} -}, - Entity = default, - }; - Response response = client.UpdateByUniqueAttribute("", body, attribute: ""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_UpdateByUniqueAttribute_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - AtlasEntityWithExtInfo body = new AtlasEntityWithExtInfo - { - ReferredEntities = -{ -["key"] = new AtlasEntity -{ -Attributes = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -}, -TypeName = "", -LastModifiedTS = "", -BusinessAttributes = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -}, -Classifications = {new AtlasClassification -{ -Attributes = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -}, -TypeName = "", -LastModifiedTS = "", -EntityGuid = "", -EntityStatus = EntityStatus.Active, -RemovePropagationsOnEntityDelete = true, -ValidityPeriods = {new TimeBoundary -{ -EndTime = "", -StartTime = "", -TimeZone = "", -}}, -}}, -CreateTime = 1234L, -CreatedBy = "", -CustomAttributes = -{ -["key"] = "" -}, -Guid = "", -HomeId = "", -IsIncomplete = true, -Labels = {""}, -Meanings = {new AtlasTermAssignmentHeader -{ -Confidence = 1234, -CreatedBy = "", -Description = "", -DisplayText = "", -Expression = "", -RelationGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), -Status = AtlasTermAssignmentStatus.Discovered, -Steward = "", -TermGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), -}}, -ProvenanceType = 1234, -Proxy = true, -RelationshipAttributes = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -}, -Status = EntityStatus.Active, -UpdateTime = 1234L, -UpdatedBy = "", -Version = 1234L, -Contacts = -{ -["key"] = {new ContactInfo -{ -Id = "", -Info = "", -}} -}, -} -}, - Entity = default, - }; - Response response = await client.UpdateByUniqueAttributeAsync("", body, attribute: ""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Entity_DeleteByUniqueAttribute_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = client.DeleteByUniqueAttribute("", null, null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_DeleteByUniqueAttribute_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = await client.DeleteByUniqueAttributeAsync("", null, null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Entity_DeleteByUniqueAttribute_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = client.DeleteByUniqueAttribute(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_DeleteByUniqueAttribute_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = await client.DeleteByUniqueAttributeAsync(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Entity_DeleteByUniqueAttribute_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = client.DeleteByUniqueAttribute("", "", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meaningNames")[0].ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_DeleteByUniqueAttribute_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = await client.DeleteByUniqueAttributeAsync("", "", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meaningNames")[0].ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Entity_DeleteByUniqueAttribute_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = client.DeleteByUniqueAttribute("", attribute: ""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_DeleteByUniqueAttribute_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = await client.DeleteByUniqueAttributeAsync("", attribute: ""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Entity_RemoveClassificationByUniqueAttribute_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = client.RemoveClassificationByUniqueAttribute("", ""); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_RemoveClassificationByUniqueAttribute_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = await client.RemoveClassificationByUniqueAttributeAsync("", ""); + Expert = new object[] + { +new +{ +id = "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", +info = "Example Expert Info", +} + }, + Owner = new object[] + { +new +{ +id = "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", +info = "Example Owner Info", +} + }, + }, + status = "ACTIVE", + createdBy = "ExampleCreator", + updatedBy = "ExampleUpdator", + version = 0, + }, + }); + Response response = await client.CreateOrUpdateAsync(content); - Console.WriteLine(response.Status); + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Entity_RemoveClassificationByUniqueAttribute_AllParameters() + public void Example_Entity_CreateOrUpdate_EntityCreate_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = client.RemoveClassificationByUniqueAttribute("", "", attribute: ""); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); - Console.WriteLine(response.Status); + AtlasEntityWithExtInfo body = new AtlasEntityWithExtInfo + { + ReferredEntities = { }, + Entity = new AtlasEntity + { + Attributes = +{ +["owner"] = BinaryData.FromObjectAsJson("ExampleOwner"), +["modifiedTime"] = BinaryData.FromObjectAsJson(0), +["createTime"] = BinaryData.FromObjectAsJson(0), +["qualifiedName"] = BinaryData.FromObjectAsJson("https://exampleaccount.core.windows.net"), +["name"] = BinaryData.FromObjectAsJson("ExampleStorageAccount"), +["description"] = null, +["publicAccessLevel"] = null +}, + TypeName = "azure_storage_account", + CreatedBy = "ExampleCreator", + Status = EntityStatus.Active, + UpdatedBy = "ExampleUpdator", + Version = 0, + Contacts = +{ +["Expert"] = {new ContactInfo +{ +Id = "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", +Info = "Example Expert Info", +}}, +["Owner"] = {new ContactInfo +{ +Id = "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", +Info = "Example Owner Info", +}} +}, + }, + }; + Response response = client.CreateOrUpdate(body); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_RemoveClassificationByUniqueAttribute_AllParameters_Async() + public async Task Example_Entity_CreateOrUpdate_EntityCreate_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = await client.RemoveClassificationByUniqueAttributeAsync("", "", attribute: ""); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); - Console.WriteLine(response.Status); + AtlasEntityWithExtInfo body = new AtlasEntityWithExtInfo + { + ReferredEntities = { }, + Entity = new AtlasEntity + { + Attributes = +{ +["owner"] = BinaryData.FromObjectAsJson("ExampleOwner"), +["modifiedTime"] = BinaryData.FromObjectAsJson(0), +["createTime"] = BinaryData.FromObjectAsJson(0), +["qualifiedName"] = BinaryData.FromObjectAsJson("https://exampleaccount.core.windows.net"), +["name"] = BinaryData.FromObjectAsJson("ExampleStorageAccount"), +["description"] = null, +["publicAccessLevel"] = null +}, + TypeName = "azure_storage_account", + CreatedBy = "ExampleCreator", + Status = EntityStatus.Active, + UpdatedBy = "ExampleUpdator", + Version = 0, + Contacts = +{ +["Expert"] = {new ContactInfo +{ +Id = "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", +Info = "Example Expert Info", +}}, +["Owner"] = {new ContactInfo +{ +Id = "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", +Info = "Example Owner Info", +}} +}, + }, + }; + Response response = await client.CreateOrUpdateAsync(body); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Entity_AddClassificationsByUniqueAttribute_ShortVersion() + public void Example_Entity_CreateOrUpdate_EntityCreateOrUpdateWithRichText() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); - using RequestContent content = RequestContent.Create(new object[] + using RequestContent content = RequestContent.Create(new { -new object() + referredEntities = new object(), + entity = new + { + typeName = "azure_storage_account", + attributes = new + { + owner = "ExampleOwner", + modifiedTime = 0, + createTime = 0, + qualifiedName = "https://exampleaccount.core.windows.net", + name = "ExampleStorageAccount", + userDescription = "
testing
", + }, + customAttributes = new + { + microsoft_isDescriptionRichText = "true", + }, + status = "ACTIVE", + createdBy = "ExampleCreator", + updatedBy = "ExampleUpdator", + version = 0, + }, }); - Response response = client.AddClassificationsByUniqueAttribute("", content); + Response response = client.CreateOrUpdate(content); - Console.WriteLine(response.Status); + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_AddClassificationsByUniqueAttribute_ShortVersion_Async() + public async Task Example_Entity_CreateOrUpdate_EntityCreateOrUpdateWithRichText_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); - using RequestContent content = RequestContent.Create(new object[] + using RequestContent content = RequestContent.Create(new { -new object() + referredEntities = new object(), + entity = new + { + typeName = "azure_storage_account", + attributes = new + { + owner = "ExampleOwner", + modifiedTime = 0, + createTime = 0, + qualifiedName = "https://exampleaccount.core.windows.net", + name = "ExampleStorageAccount", + userDescription = "
testing
", + }, + customAttributes = new + { + microsoft_isDescriptionRichText = "true", + }, + status = "ACTIVE", + createdBy = "ExampleCreator", + updatedBy = "ExampleUpdator", + version = 0, + }, }); - Response response = await client.AddClassificationsByUniqueAttributeAsync("", content); + Response response = await client.CreateOrUpdateAsync(content); - Console.WriteLine(response.Status); + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Entity_AddClassificationsByUniqueAttribute_ShortVersion_Convenience() + public void Example_Entity_CreateOrUpdate_EntityCreateOrUpdateWithRichText_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); - Response response = client.AddClassificationsByUniqueAttribute("", new AtlasClassification[] + AtlasEntityWithExtInfo body = new AtlasEntityWithExtInfo { -new AtlasClassification() - }); + ReferredEntities = { }, + Entity = new AtlasEntity + { + Attributes = +{ +["owner"] = BinaryData.FromObjectAsJson("ExampleOwner"), +["modifiedTime"] = BinaryData.FromObjectAsJson(0), +["createTime"] = BinaryData.FromObjectAsJson(0), +["qualifiedName"] = BinaryData.FromObjectAsJson("https://exampleaccount.core.windows.net"), +["name"] = BinaryData.FromObjectAsJson("ExampleStorageAccount"), +["description"] = null, +["userDescription"] = BinaryData.FromObjectAsJson("
testing
"), +["publicAccessLevel"] = null +}, + TypeName = "azure_storage_account", + CreatedBy = "ExampleCreator", + CustomAttributes = +{ +["microsoft_isDescriptionRichText"] = "true" +}, + Status = EntityStatus.Active, + UpdatedBy = "ExampleUpdator", + Version = 0, + }, + }; + Response response = client.CreateOrUpdate(body); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_AddClassificationsByUniqueAttribute_ShortVersion_Convenience_Async() + public async Task Example_Entity_CreateOrUpdate_EntityCreateOrUpdateWithRichText_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); - Response response = await client.AddClassificationsByUniqueAttributeAsync("", new AtlasClassification[] + AtlasEntityWithExtInfo body = new AtlasEntityWithExtInfo { -new AtlasClassification() - }); + ReferredEntities = { }, + Entity = new AtlasEntity + { + Attributes = +{ +["owner"] = BinaryData.FromObjectAsJson("ExampleOwner"), +["modifiedTime"] = BinaryData.FromObjectAsJson(0), +["createTime"] = BinaryData.FromObjectAsJson(0), +["qualifiedName"] = BinaryData.FromObjectAsJson("https://exampleaccount.core.windows.net"), +["name"] = BinaryData.FromObjectAsJson("ExampleStorageAccount"), +["description"] = null, +["userDescription"] = BinaryData.FromObjectAsJson("
testing
"), +["publicAccessLevel"] = null +}, + TypeName = "azure_storage_account", + CreatedBy = "ExampleCreator", + CustomAttributes = +{ +["microsoft_isDescriptionRichText"] = "true" +}, + Status = EntityStatus.Active, + UpdatedBy = "ExampleUpdator", + Version = 0, + }, + }; + Response response = await client.CreateOrUpdateAsync(body); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Entity_AddClassificationsByUniqueAttribute_AllParameters() + public void Example_Entity_CreateOrUpdate_EntityUpdate() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); - using RequestContent content = RequestContent.Create(new object[] + using RequestContent content = RequestContent.Create(new + { + referredEntities = new object(), + entity = new + { + typeName = "azure_storage_account", + attributes = new + { + owner = "ExampleOwner", + modifiedTime = 0, + createTime = 0, + qualifiedName = "exampleaccount", + name = "ExampleStorageAccount", + }, + contacts = new + { + Expert = new object[] { new { -attributes = new -{ -key = new object(), -}, -typeName = "", -lastModifiedTS = "", -entityGuid = "", -entityStatus = "ACTIVE", -removePropagationsOnEntityDelete = true, -validityPeriods = new object[] -{ +id = "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", +info = "Example Expert Info", +} + }, + Owner = new object[] + { new { -endTime = "", -startTime = "", -timeZone = "", -} -}, +id = "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", +info = "Example Owner Info", } + }, + }, + status = "ACTIVE", + createdBy = "ExampleCreator", + updatedBy = "ExampleUpdator", + version = 0, + }, }); - Response response = client.AddClassificationsByUniqueAttribute("", content, attribute: ""); + Response response = client.CreateOrUpdate(content); - Console.WriteLine(response.Status); + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_AddClassificationsByUniqueAttribute_AllParameters_Async() + public async Task Example_Entity_CreateOrUpdate_EntityUpdate_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); - using RequestContent content = RequestContent.Create(new object[] + using RequestContent content = RequestContent.Create(new + { + referredEntities = new object(), + entity = new + { + typeName = "azure_storage_account", + attributes = new + { + owner = "ExampleOwner", + modifiedTime = 0, + createTime = 0, + qualifiedName = "exampleaccount", + name = "ExampleStorageAccount", + }, + contacts = new + { + Expert = new object[] { new { -attributes = new -{ -key = new object(), -}, -typeName = "", -lastModifiedTS = "", -entityGuid = "", -entityStatus = "ACTIVE", -removePropagationsOnEntityDelete = true, -validityPeriods = new object[] -{ +id = "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", +info = "Example Expert Info", +} + }, + Owner = new object[] + { new { -endTime = "", -startTime = "", -timeZone = "", -} -}, +id = "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", +info = "Example Owner Info", } + }, + }, + status = "ACTIVE", + createdBy = "ExampleCreator", + updatedBy = "ExampleUpdator", + version = 0, + }, }); - Response response = await client.AddClassificationsByUniqueAttributeAsync("", content, attribute: ""); + Response response = await client.CreateOrUpdateAsync(content); - Console.WriteLine(response.Status); + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Entity_AddClassificationsByUniqueAttribute_AllParameters_Convenience() + public void Example_Entity_CreateOrUpdate_EntityUpdate_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); - Response response = client.AddClassificationsByUniqueAttribute("", new AtlasClassification[] + AtlasEntityWithExtInfo body = new AtlasEntityWithExtInfo { -new AtlasClassification + ReferredEntities = { }, + Entity = new AtlasEntity + { + Attributes = { -Attributes = +["owner"] = BinaryData.FromObjectAsJson("ExampleOwner"), +["modifiedTime"] = BinaryData.FromObjectAsJson(0), +["createTime"] = BinaryData.FromObjectAsJson(0), +["qualifiedName"] = BinaryData.FromObjectAsJson("exampleaccount"), +["name"] = BinaryData.FromObjectAsJson("ExampleStorageAccount"), +["description"] = null, +["publicAccessLevel"] = null +}, + TypeName = "azure_storage_account", + CreatedBy = "ExampleCreator", + Status = EntityStatus.Active, + UpdatedBy = "ExampleUpdator", + Version = 0, + Contacts = +{ +["Expert"] = {new ContactInfo +{ +Id = "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", +Info = "Example Expert Info", +}}, +["Owner"] = {new ContactInfo { -["key"] = BinaryData.FromObjectAsJson(new object()) +Id = "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", +Info = "Example Owner Info", +}} }, -TypeName = "", -LastModifiedTS = "", -EntityGuid = "", -EntityStatus = EntityStatus.Active, -RemovePropagationsOnEntityDelete = true, -ValidityPeriods = {new TimeBoundary -{ -EndTime = "", -StartTime = "", -TimeZone = "", -}}, -} - }, attribute: ""); + }, + }; + Response response = client.CreateOrUpdate(body); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_AddClassificationsByUniqueAttribute_AllParameters_Convenience_Async() + public async Task Example_Entity_CreateOrUpdate_EntityUpdate_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); - Response response = await client.AddClassificationsByUniqueAttributeAsync("", new AtlasClassification[] + AtlasEntityWithExtInfo body = new AtlasEntityWithExtInfo { -new AtlasClassification + ReferredEntities = { }, + Entity = new AtlasEntity + { + Attributes = { -Attributes = +["owner"] = BinaryData.FromObjectAsJson("ExampleOwner"), +["modifiedTime"] = BinaryData.FromObjectAsJson(0), +["createTime"] = BinaryData.FromObjectAsJson(0), +["qualifiedName"] = BinaryData.FromObjectAsJson("exampleaccount"), +["name"] = BinaryData.FromObjectAsJson("ExampleStorageAccount"), +["description"] = null, +["publicAccessLevel"] = null +}, + TypeName = "azure_storage_account", + CreatedBy = "ExampleCreator", + Status = EntityStatus.Active, + UpdatedBy = "ExampleUpdator", + Version = 0, + Contacts = +{ +["Expert"] = {new ContactInfo +{ +Id = "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", +Info = "Example Expert Info", +}}, +["Owner"] = {new ContactInfo { -["key"] = BinaryData.FromObjectAsJson(new object()) +Id = "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", +Info = "Example Owner Info", +}} }, -TypeName = "", -LastModifiedTS = "", -EntityGuid = "", -EntityStatus = EntityStatus.Active, -RemovePropagationsOnEntityDelete = true, -ValidityPeriods = {new TimeBoundary -{ -EndTime = "", -StartTime = "", -TimeZone = "", -}}, -} - }, attribute: ""); + }, + }; + Response response = await client.CreateOrUpdateAsync(body); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Entity_UpdateClassificationsUniqueByAttribute_ShortVersion() + public void Example_Entity_GetByIds_EntityListByGuids() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - using RequestContent content = RequestContent.Create(new object[] - { -new object() - }); - Response response = client.UpdateClassificationsUniqueByAttribute("", content); + Response response = client.GetByIds(new string[] { "784c0f2f-afd2-e26b-f9cb-984f6c2c5021", "b4ebc8be-cef4-860a-bee9-28cc34cb5caa" }, true, null, null); - Console.WriteLine(response.Status); + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_UpdateClassificationsUniqueByAttribute_ShortVersion_Async() + public async Task Example_Entity_GetByIds_EntityListByGuids_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - using RequestContent content = RequestContent.Create(new object[] - { -new object() - }); - Response response = await client.UpdateClassificationsUniqueByAttributeAsync("", content); + Response response = await client.GetByIdsAsync(new string[] { "784c0f2f-afd2-e26b-f9cb-984f6c2c5021", "b4ebc8be-cef4-860a-bee9-28cc34cb5caa" }, true, null, null); - Console.WriteLine(response.Status); + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Entity_UpdateClassificationsUniqueByAttribute_ShortVersion_Convenience() + public void Example_Entity_GetByIds_EntityListByGuids_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - Response response = client.UpdateClassificationsUniqueByAttribute("", new AtlasClassification[] - { -new AtlasClassification() - }); + Response response = client.GetByIds(new string[] { "784c0f2f-afd2-e26b-f9cb-984f6c2c5021", "b4ebc8be-cef4-860a-bee9-28cc34cb5caa" }); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_UpdateClassificationsUniqueByAttribute_ShortVersion_Convenience_Async() + public async Task Example_Entity_GetByIds_EntityListByGuids_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - Response response = await client.UpdateClassificationsUniqueByAttributeAsync("", new AtlasClassification[] - { -new AtlasClassification() - }); + Response response = await client.GetByIdsAsync(new string[] { "784c0f2f-afd2-e26b-f9cb-984f6c2c5021", "b4ebc8be-cef4-860a-bee9-28cc34cb5caa" }); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Entity_UpdateClassificationsUniqueByAttribute_AllParameters() + public void Example_Entity_BatchCreateOrUpdate_EntityBulkCreateOrUpdate() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - using RequestContent content = RequestContent.Create(new object[] + using RequestContent content = RequestContent.Create(new + { + referredEntities = new object(), + entities = new object[] { new { +typeName = "azure_storage_account", +attributes = new +{ +owner = "ExampleOwner", +modifiedTime = 0, +createTime = 0, +qualifiedName = "exampleaccount1", +name = "ExampleStorageAccount1", +}, +contacts = new +{ +Expert = new object[] +{ +new +{ +id = "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", +info = "Example Expert Info", +} +}, +Owner = new object[] +{ +new +{ +id = "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", +info = "Example Owner Info", +} +}, +}, +status = "ACTIVE", +createdBy = "ExampleCreator", +updatedBy = "ExampleUpdator", +version = 0, +}, +new +{ +typeName = "azure_storage_account", attributes = new { -key = new object(), +owner = "ExampleOwner", +modifiedTime = 0, +createTime = 0, +qualifiedName = "exampleaccount2", +name = "ExampleStorageAccount2", +description = "Example Description", +}, +contacts = new +{ +Expert = new object[] +{ +new +{ +id = "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", +info = "Example Expert Info", +} }, -typeName = "", -lastModifiedTS = "", -entityGuid = "", -entityStatus = "ACTIVE", -removePropagationsOnEntityDelete = true, -validityPeriods = new object[] +Owner = new object[] { new { -endTime = "", -startTime = "", -timeZone = "", +id = "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", +info = "Example Owner Info", } }, +}, +status = "ACTIVE", +createdBy = "ExampleCreator", +updatedBy = "ExampleUpdator", +version = 0, } + }, }); - Response response = client.UpdateClassificationsUniqueByAttribute("", content, attribute: ""); + Response response = client.BatchCreateOrUpdate(content); - Console.WriteLine(response.Status); + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_UpdateClassificationsUniqueByAttribute_AllParameters_Async() + public async Task Example_Entity_BatchCreateOrUpdate_EntityBulkCreateOrUpdate_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - using RequestContent content = RequestContent.Create(new object[] + using RequestContent content = RequestContent.Create(new + { + referredEntities = new object(), + entities = new object[] { new { +typeName = "azure_storage_account", +attributes = new +{ +owner = "ExampleOwner", +modifiedTime = 0, +createTime = 0, +qualifiedName = "exampleaccount1", +name = "ExampleStorageAccount1", +}, +contacts = new +{ +Expert = new object[] +{ +new +{ +id = "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", +info = "Example Expert Info", +} +}, +Owner = new object[] +{ +new +{ +id = "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", +info = "Example Owner Info", +} +}, +}, +status = "ACTIVE", +createdBy = "ExampleCreator", +updatedBy = "ExampleUpdator", +version = 0, +}, +new +{ +typeName = "azure_storage_account", attributes = new { -key = new object(), +owner = "ExampleOwner", +modifiedTime = 0, +createTime = 0, +qualifiedName = "exampleaccount2", +name = "ExampleStorageAccount2", +description = "Example Description", +}, +contacts = new +{ +Expert = new object[] +{ +new +{ +id = "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", +info = "Example Expert Info", +} }, -typeName = "", -lastModifiedTS = "", -entityGuid = "", -entityStatus = "ACTIVE", -removePropagationsOnEntityDelete = true, -validityPeriods = new object[] +Owner = new object[] { new { -endTime = "", -startTime = "", -timeZone = "", +id = "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", +info = "Example Owner Info", } }, +}, +status = "ACTIVE", +createdBy = "ExampleCreator", +updatedBy = "ExampleUpdator", +version = 0, } + }, }); - Response response = await client.UpdateClassificationsUniqueByAttributeAsync("", content, attribute: ""); + Response response = await client.BatchCreateOrUpdateAsync(content); - Console.WriteLine(response.Status); + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Entity_UpdateClassificationsUniqueByAttribute_AllParameters_Convenience() + public void Example_Entity_BatchCreateOrUpdate_EntityBulkCreateOrUpdate_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - Response response = client.UpdateClassificationsUniqueByAttribute("", new AtlasClassification[] + AtlasEntitiesWithExtInfo body = new AtlasEntitiesWithExtInfo { -new AtlasClassification + ReferredEntities = { }, + Entities = {new AtlasEntity +{ +Attributes = +{ +["owner"] = BinaryData.FromObjectAsJson("ExampleOwner"), +["modifiedTime"] = BinaryData.FromObjectAsJson(0), +["createTime"] = BinaryData.FromObjectAsJson(0), +["qualifiedName"] = BinaryData.FromObjectAsJson("exampleaccount1"), +["name"] = BinaryData.FromObjectAsJson("ExampleStorageAccount1"), +["description"] = null, +["publicAccessLevel"] = null +}, +TypeName = "azure_storage_account", +CreatedBy = "ExampleCreator", +Status = EntityStatus.Active, +UpdatedBy = "ExampleUpdator", +Version = 0, +Contacts = +{ +["Expert"] = {new ContactInfo +{ +Id = "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", +Info = "Example Expert Info", +}}, +["Owner"] = {new ContactInfo +{ +Id = "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", +Info = "Example Owner Info", +}} +}, +}, new AtlasEntity { Attributes = { -["key"] = BinaryData.FromObjectAsJson(new object()) +["owner"] = BinaryData.FromObjectAsJson("ExampleOwner"), +["modifiedTime"] = BinaryData.FromObjectAsJson(0), +["createTime"] = BinaryData.FromObjectAsJson(0), +["qualifiedName"] = BinaryData.FromObjectAsJson("exampleaccount2"), +["name"] = BinaryData.FromObjectAsJson("ExampleStorageAccount2"), +["description"] = BinaryData.FromObjectAsJson("Example Description"), +["publicAccessLevel"] = null }, -TypeName = "", -LastModifiedTS = "", -EntityGuid = "", -EntityStatus = EntityStatus.Active, -RemovePropagationsOnEntityDelete = true, -ValidityPeriods = {new TimeBoundary -{ -EndTime = "", -StartTime = "", -TimeZone = "", +TypeName = "azure_storage_account", +CreatedBy = "ExampleCreator", +Status = EntityStatus.Active, +UpdatedBy = "ExampleUpdator", +Version = 0, +Contacts = +{ +["Expert"] = {new ContactInfo +{ +Id = "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", +Info = "Example Expert Info", }}, -} - }, attribute: ""); +["Owner"] = {new ContactInfo +{ +Id = "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", +Info = "Example Owner Info", +}} +}, +}}, + }; + Response response = client.BatchCreateOrUpdate(body); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_UpdateClassificationsUniqueByAttribute_AllParameters_Convenience_Async() + public async Task Example_Entity_BatchCreateOrUpdate_EntityBulkCreateOrUpdate_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - Response response = await client.UpdateClassificationsUniqueByAttributeAsync("", new AtlasClassification[] + AtlasEntitiesWithExtInfo body = new AtlasEntitiesWithExtInfo { -new AtlasClassification + ReferredEntities = { }, + Entities = {new AtlasEntity { Attributes = { -["key"] = BinaryData.FromObjectAsJson(new object()) +["owner"] = BinaryData.FromObjectAsJson("ExampleOwner"), +["modifiedTime"] = BinaryData.FromObjectAsJson(0), +["createTime"] = BinaryData.FromObjectAsJson(0), +["qualifiedName"] = BinaryData.FromObjectAsJson("exampleaccount1"), +["name"] = BinaryData.FromObjectAsJson("ExampleStorageAccount1"), +["description"] = null, +["publicAccessLevel"] = null }, -TypeName = "", -LastModifiedTS = "", -EntityGuid = "", -EntityStatus = EntityStatus.Active, -RemovePropagationsOnEntityDelete = true, -ValidityPeriods = {new TimeBoundary -{ -EndTime = "", -StartTime = "", -TimeZone = "", +TypeName = "azure_storage_account", +CreatedBy = "ExampleCreator", +Status = EntityStatus.Active, +UpdatedBy = "ExampleUpdator", +Version = 0, +Contacts = +{ +["Expert"] = {new ContactInfo +{ +Id = "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", +Info = "Example Expert Info", }}, -} - }, attribute: ""); +["Owner"] = {new ContactInfo +{ +Id = "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", +Info = "Example Owner Info", +}} +}, +}, new AtlasEntity +{ +Attributes = +{ +["owner"] = BinaryData.FromObjectAsJson("ExampleOwner"), +["modifiedTime"] = BinaryData.FromObjectAsJson(0), +["createTime"] = BinaryData.FromObjectAsJson(0), +["qualifiedName"] = BinaryData.FromObjectAsJson("exampleaccount2"), +["name"] = BinaryData.FromObjectAsJson("ExampleStorageAccount2"), +["description"] = BinaryData.FromObjectAsJson("Example Description"), +["publicAccessLevel"] = null +}, +TypeName = "azure_storage_account", +CreatedBy = "ExampleCreator", +Status = EntityStatus.Active, +UpdatedBy = "ExampleUpdator", +Version = 0, +Contacts = +{ +["Expert"] = {new ContactInfo +{ +Id = "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", +Info = "Example Expert Info", +}}, +["Owner"] = {new ContactInfo +{ +Id = "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", +Info = "Example Owner Info", +}} +}, +}}, + }; + Response response = await client.BatchCreateOrUpdateAsync(body); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Entity_BatchSetClassifications_ShortVersion() + public void Example_Entity_BatchDelete_EntityBulkDelete() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - using RequestContent content = RequestContent.Create(new object()); - Response response = client.BatchSetClassifications(content); + Response response = client.BatchDelete(new string[] { "18e06957-e265-967a-07f1-e14e2ab8940f", "cc0730ba-9b30-41f0-6953-559d17626d2b" }, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_BatchSetClassifications_ShortVersion_Async() + public async Task Example_Entity_BatchDelete_EntityBulkDelete_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - using RequestContent content = RequestContent.Create(new object()); - Response response = await client.BatchSetClassificationsAsync(content); + Response response = await client.BatchDeleteAsync(new string[] { "18e06957-e265-967a-07f1-e14e2ab8940f", "cc0730ba-9b30-41f0-6953-559d17626d2b" }, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Entity_BatchSetClassifications_ShortVersion_Convenience() + public void Example_Entity_BatchDelete_EntityBulkDelete_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - AtlasEntityHeaders body = new AtlasEntityHeaders(); - Response> response = client.BatchSetClassifications(body); + Response response = client.BatchDelete(new string[] { "18e06957-e265-967a-07f1-e14e2ab8940f", "cc0730ba-9b30-41f0-6953-559d17626d2b" }); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_BatchSetClassifications_ShortVersion_Convenience_Async() + public async Task Example_Entity_BatchDelete_EntityBulkDelete_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - AtlasEntityHeaders body = new AtlasEntityHeaders(); - Response> response = await client.BatchSetClassificationsAsync(body); + Response response = await client.BatchDeleteAsync(new string[] { "18e06957-e265-967a-07f1-e14e2ab8940f", "cc0730ba-9b30-41f0-6953-559d17626d2b" }); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Entity_BatchSetClassifications_AllParameters() + public void Example_Entity_AddClassification_EntityAddClassificationToEntityByGuids() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); using RequestContent content = RequestContent.Create(new { - guidHeaderMap = new + classification = new { - key = new - { - attributes = new - { - key = new object(), - }, - typeName = "", - lastModifiedTS = "", - classificationNames = new object[] - { -"" - }, - classifications = new object[] - { -new -{ -attributes = new -{ -key = new object(), -}, -typeName = "", -lastModifiedTS = "", -entityGuid = "", -entityStatus = "ACTIVE", -removePropagationsOnEntityDelete = true, -validityPeriods = new object[] -{ -new -{ -endTime = "", -startTime = "", -timeZone = "", -} -}, -} - }, - displayText = "", - guid = "", - isIncomplete = true, - labels = new object[] - { -"" - }, - meaningNames = new object[] - { -"" - }, - meanings = new object[] + typeName = "MICROSOFT.FINANCIAL.US.ABA_ROUTING_NUMBER", + attributes = new object(), + validityPeriods = Array.Empty(), + }, + entityGuids = new object[] { -new -{ -confidence = 1234, -createdBy = "", -description = "", -displayText = "", -expression = "", -relationGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", -status = "DISCOVERED", -steward = "", -termGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", -} +"784c0f2f-afd2-e26b-f9cb-984f6c2c5021", +"b4ebc8be-cef4-860a-bee9-28cc34cb5caa" }, - status = "ACTIVE", - }, - }, }); - Response response = client.BatchSetClassifications(content); + Response response = client.AddClassification(content); - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_BatchSetClassifications_AllParameters_Async() + public async Task Example_Entity_AddClassification_EntityAddClassificationToEntityByGuids_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); using RequestContent content = RequestContent.Create(new { - guidHeaderMap = new + classification = new { - key = new - { - attributes = new - { - key = new object(), - }, - typeName = "", - lastModifiedTS = "", - classificationNames = new object[] - { -"" - }, - classifications = new object[] - { -new -{ -attributes = new -{ -key = new object(), -}, -typeName = "", -lastModifiedTS = "", -entityGuid = "", -entityStatus = "ACTIVE", -removePropagationsOnEntityDelete = true, -validityPeriods = new object[] -{ -new -{ -endTime = "", -startTime = "", -timeZone = "", -} -}, -} - }, - displayText = "", - guid = "", - isIncomplete = true, - labels = new object[] - { -"" - }, - meaningNames = new object[] - { -"" - }, - meanings = new object[] + typeName = "MICROSOFT.FINANCIAL.US.ABA_ROUTING_NUMBER", + attributes = new object(), + validityPeriods = Array.Empty(), + }, + entityGuids = new object[] { -new -{ -confidence = 1234, -createdBy = "", -description = "", -displayText = "", -expression = "", -relationGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", -status = "DISCOVERED", -steward = "", -termGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", -} +"784c0f2f-afd2-e26b-f9cb-984f6c2c5021", +"b4ebc8be-cef4-860a-bee9-28cc34cb5caa" }, - status = "ACTIVE", - }, - }, }); - Response response = await client.BatchSetClassificationsAsync(content); + Response response = await client.AddClassificationAsync(content); - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Entity_BatchSetClassifications_AllParameters_Convenience() + public void Example_Entity_AddClassification_EntityAddClassificationToEntityByGuids_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - AtlasEntityHeaders body = new AtlasEntityHeaders + ClassificationAssociateConfig body = new ClassificationAssociateConfig { - GuidHeaderMap = -{ -["key"] = new AtlasEntityHeader -{ -Attributes = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -}, -TypeName = "", -LastModifiedTS = "", -ClassificationNames = {""}, -Classifications = {new AtlasClassification -{ -Attributes = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -}, -TypeName = "", -LastModifiedTS = "", -EntityGuid = "", -EntityStatus = EntityStatus.Active, -RemovePropagationsOnEntityDelete = true, -ValidityPeriods = {new TimeBoundary -{ -EndTime = "", -StartTime = "", -TimeZone = "", -}}, -}}, -DisplayText = "", -Guid = "", -IsIncomplete = true, -Labels = {""}, -MeaningNames = {""}, -Meanings = {new AtlasTermAssignmentHeader -{ -Confidence = 1234, -CreatedBy = "", -Description = "", -DisplayText = "", -Expression = "", -RelationGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), -Status = AtlasTermAssignmentStatus.Discovered, -Steward = "", -TermGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), -}}, -Status = EntityStatus.Active, -} -}, + Classification = new AtlasClassification + { + Attributes = { }, + TypeName = "MICROSOFT.FINANCIAL.US.ABA_ROUTING_NUMBER", + ValidityPeriods = { }, + }, + EntityGuids = { "784c0f2f-afd2-e26b-f9cb-984f6c2c5021", "b4ebc8be-cef4-860a-bee9-28cc34cb5caa" }, }; - Response> response = client.BatchSetClassifications(body); + Response response = client.AddClassification(body); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_BatchSetClassifications_AllParameters_Convenience_Async() + public async Task Example_Entity_AddClassification_EntityAddClassificationToEntityByGuids_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - AtlasEntityHeaders body = new AtlasEntityHeaders + ClassificationAssociateConfig body = new ClassificationAssociateConfig { - GuidHeaderMap = -{ -["key"] = new AtlasEntityHeader -{ -Attributes = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -}, -TypeName = "", -LastModifiedTS = "", -ClassificationNames = {""}, -Classifications = {new AtlasClassification -{ -Attributes = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -}, -TypeName = "", -LastModifiedTS = "", -EntityGuid = "", -EntityStatus = EntityStatus.Active, -RemovePropagationsOnEntityDelete = true, -ValidityPeriods = {new TimeBoundary -{ -EndTime = "", -StartTime = "", -TimeZone = "", -}}, -}}, -DisplayText = "", -Guid = "", -IsIncomplete = true, -Labels = {""}, -MeaningNames = {""}, -Meanings = {new AtlasTermAssignmentHeader -{ -Confidence = 1234, -CreatedBy = "", -Description = "", -DisplayText = "", -Expression = "", -RelationGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), -Status = AtlasTermAssignmentStatus.Discovered, -Steward = "", -TermGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), -}}, -Status = EntityStatus.Active, -} -}, + Classification = new AtlasClassification + { + Attributes = { }, + TypeName = "MICROSOFT.FINANCIAL.US.ABA_ROUTING_NUMBER", + ValidityPeriods = { }, + }, + EntityGuids = { "784c0f2f-afd2-e26b-f9cb-984f6c2c5021", "b4ebc8be-cef4-860a-bee9-28cc34cb5caa" }, }; - Response> response = await client.BatchSetClassificationsAsync(body); + Response response = await client.AddClassificationAsync(body); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Entity_BatchGetByUniqueAttributes_ShortVersion() + public void Example_Entity_GetEntity_EntityGet() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - Response response = client.BatchGetByUniqueAttributes("", null, null, null, null); + Response response = client.GetEntity("5cf8a9e5-c9fd-abe0-2e8c-d40024263dcb", true, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -4994,13 +1253,13 @@ public void Example_Entity_BatchGetByUniqueAttributes_ShortVersion() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_BatchGetByUniqueAttributes_ShortVersion_Async() + public async Task Example_Entity_GetEntity_EntityGet_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - Response response = await client.BatchGetByUniqueAttributesAsync("", null, null, null, null); + Response response = await client.GetEntityAsync("5cf8a9e5-c9fd-abe0-2e8c-d40024263dcb", true, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -5008,239 +1267,36 @@ public async Task Example_Entity_BatchGetByUniqueAttributes_ShortVersion_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Entity_BatchGetByUniqueAttributes_ShortVersion_Convenience() + public void Example_Entity_GetEntity_EntityGet_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - Response response = client.BatchGetByUniqueAttributes(""); + Response response = client.GetEntity("5cf8a9e5-c9fd-abe0-2e8c-d40024263dcb"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_BatchGetByUniqueAttributes_ShortVersion_Convenience_Async() + public async Task Example_Entity_GetEntity_EntityGet_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - Response response = await client.BatchGetByUniqueAttributesAsync(""); + Response response = await client.GetEntityAsync("5cf8a9e5-c9fd-abe0-2e8c-d40024263dcb"); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Entity_BatchGetByUniqueAttributes_AllParameters() + public void Example_Entity_UpdateAttributeById_EntityPartialUpdateAttributeByGuid() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - Response response = client.BatchGetByUniqueAttributes("", true, true, "", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("businessAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createTime").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("customAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("homeId").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("collectionId").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("provenanceType").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("proxy").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("relationshipAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updateTime").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updatedBy").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("businessAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("createTime").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("customAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("homeId").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("collectionId").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("provenanceType").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("proxy").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("relationshipAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("updateTime").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("updatedBy").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_BatchGetByUniqueAttributes_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = await client.BatchGetByUniqueAttributesAsync("", true, true, "", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("businessAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createTime").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("customAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("homeId").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("collectionId").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("provenanceType").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("proxy").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("relationshipAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updateTime").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updatedBy").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("businessAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("createTime").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("customAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("homeId").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("collectionId").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("provenanceType").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("proxy").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("relationshipAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("updateTime").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("updatedBy").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Entity_BatchGetByUniqueAttributes_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = client.BatchGetByUniqueAttributes("", minExtInfo: true, ignoreRelationships: true, attrNQualifiedName: ""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_BatchGetByUniqueAttributes_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = await client.BatchGetByUniqueAttributesAsync("", minExtInfo: true, ignoreRelationships: true, attrNQualifiedName: ""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Entity_GetHeader_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = client.GetHeader("", null); + using RequestContent content = RequestContent.Create("ExampleNewName"); + Response response = client.UpdateAttributeById("394d9a03-912e-483b-bbd2-bedee1a69798", "ExampleName", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -5248,13 +1304,14 @@ public void Example_Entity_GetHeader_ShortVersion() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_GetHeader_ShortVersion_Async() + public async Task Example_Entity_UpdateAttributeById_EntityPartialUpdateAttributeByGuid_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - Response response = await client.GetHeaderAsync("", null); + using RequestContent content = RequestContent.Create("ExampleNewName"); + Response response = await client.UpdateAttributeByIdAsync("394d9a03-912e-483b-bbd2-bedee1a69798", "ExampleName", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -5262,1603 +1319,1873 @@ public async Task Example_Entity_GetHeader_ShortVersion_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Entity_GetHeader_ShortVersion_Convenience() + public void Example_Entity_UpdateAttributeById_EntityPartialUpdateAttributeByGuid_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - Response response = client.GetHeader(""); + Response response = client.UpdateAttributeById("394d9a03-912e-483b-bbd2-bedee1a69798", "ExampleName", BinaryData.FromObjectAsJson("ExampleNewName")); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_GetHeader_ShortVersion_Convenience_Async() + public async Task Example_Entity_UpdateAttributeById_EntityPartialUpdateAttributeByGuid_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - Response response = await client.GetHeaderAsync(""); + Response response = await client.UpdateAttributeByIdAsync("394d9a03-912e-483b-bbd2-bedee1a69798", "ExampleName", BinaryData.FromObjectAsJson("ExampleNewName")); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Entity_GetHeader_AllParameters() + public void Example_Entity_Delete_EntityDelete() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - Response response = client.GetHeader("", null); + Response response = client.Delete("fd279eb4-f6c3-1b0b-ad67-e4f8abd2972f", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("classificationNames")[0].ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("meaningNames")[0].ToString()); - Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_GetHeader_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = await client.GetHeaderAsync("", null); + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_Delete_EntityDelete_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = await client.DeleteAsync("fd279eb4-f6c3-1b0b-ad67-e4f8abd2972f", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("classificationNames")[0].ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("meaningNames")[0].ToString()); - Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Entity_GetHeader_AllParameters_Convenience() + public void Example_Entity_Delete_EntityDelete_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - Response response = client.GetHeader(""); + Response response = client.Delete("fd279eb4-f6c3-1b0b-ad67-e4f8abd2972f"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_GetHeader_AllParameters_Convenience_Async() + public async Task Example_Entity_Delete_EntityDelete_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - Response response = await client.GetHeaderAsync(""); + Response response = await client.DeleteAsync("fd279eb4-f6c3-1b0b-ad67-e4f8abd2972f"); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Entity_RemoveBusinessMetadata_ShortVersion() + public void Example_Entity_GetClassification_EntityGetClassification() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - using RequestContent content = RequestContent.Create(new - { - key = new - { - key = new object(), - }, - }); - Response response = client.RemoveBusinessMetadata("", content); + Response response = client.GetClassification("9347abc5-7b86-4b82-a1e2-ad77c7c3cac3", "MICROSOFT.PERSONAL.DATE_OF_BIRTH", null); - Console.WriteLine(response.Status); + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_RemoveBusinessMetadata_ShortVersion_Async() + public async Task Example_Entity_GetClassification_EntityGetClassification_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - using RequestContent content = RequestContent.Create(new - { - key = new - { - key = new object(), - }, - }); - Response response = await client.RemoveBusinessMetadataAsync("", content); + Response response = await client.GetClassificationAsync("9347abc5-7b86-4b82-a1e2-ad77c7c3cac3", "MICROSOFT.PERSONAL.DATE_OF_BIRTH", null); - Console.WriteLine(response.Status); + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Entity_RemoveBusinessMetadata_ShortVersion_Convenience() + public void Example_Entity_GetClassification_EntityGetClassification_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - Response response = client.RemoveBusinessMetadata("", new Dictionary> - { - ["key"] = new Dictionary - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - } - }); + Response response = client.GetClassification("9347abc5-7b86-4b82-a1e2-ad77c7c3cac3", "MICROSOFT.PERSONAL.DATE_OF_BIRTH"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_RemoveBusinessMetadata_ShortVersion_Convenience_Async() + public async Task Example_Entity_GetClassification_EntityGetClassification_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - Response response = await client.RemoveBusinessMetadataAsync("", new Dictionary> - { - ["key"] = new Dictionary - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - } - }); + Response response = await client.GetClassificationAsync("9347abc5-7b86-4b82-a1e2-ad77c7c3cac3", "MICROSOFT.PERSONAL.DATE_OF_BIRTH"); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Entity_RemoveBusinessMetadata_AllParameters() + public void Example_Entity_RemoveClassification_EntityRemoveClassification() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - using RequestContent content = RequestContent.Create(new - { - key = new - { - key = new object(), - }, - }); - Response response = client.RemoveBusinessMetadata("", content); + Response response = client.RemoveClassification("cc0730ba-9b30-41f0-6953-559d17626d2b", "MICROSOFT.FINANCIAL.US.ABA_ROUTING_NUMBER"); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_RemoveClassification_EntityRemoveClassification_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = await client.RemoveClassificationAsync("cc0730ba-9b30-41f0-6953-559d17626d2b", "MICROSOFT.FINANCIAL.US.ABA_ROUTING_NUMBER"); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_RemoveBusinessMetadata_AllParameters_Async() + public void Example_Entity_GetClassifications_EntityGetClassifications() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = client.GetClassifications("67d26de6-771d-1a2d-cb2b-dec4dbd2a9bd", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_GetClassifications_EntityGetClassifications_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - using RequestContent content = RequestContent.Create(new - { - key = new - { - key = new object(), - }, - }); - Response response = await client.RemoveBusinessMetadataAsync("", content); + Response response = await client.GetClassificationsAsync("67d26de6-771d-1a2d-cb2b-dec4dbd2a9bd", null); - Console.WriteLine(response.Status); + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Entity_RemoveBusinessMetadata_AllParameters_Convenience() + public void Example_Entity_GetClassifications_EntityGetClassifications_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - Response response = client.RemoveBusinessMetadata("", new Dictionary> - { - ["key"] = new Dictionary - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - } - }); + Response response = client.GetClassifications("67d26de6-771d-1a2d-cb2b-dec4dbd2a9bd"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_RemoveBusinessMetadata_AllParameters_Convenience_Async() + public async Task Example_Entity_GetClassifications_EntityGetClassifications_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - Response response = await client.RemoveBusinessMetadataAsync("", new Dictionary> - { - ["key"] = new Dictionary - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - } - }); + Response response = await client.GetClassificationsAsync("67d26de6-771d-1a2d-cb2b-dec4dbd2a9bd"); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Entity_AddOrUpdateBusinessMetadata_ShortVersion() + public void Example_Entity_AddClassifications_EntityAddClassifications() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - using RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new object[] { - key = new - { - key = new object(), - }, +new +{ +typeName = "MICROSOFT.FINANCIAL.US.ABA_ROUTING_NUMBER", +entityGuid = "cc0730ba-9b30-41f0-6953-559d17626d2b", +}, +new +{ +typeName = "MICROSOFT.FINANCIAL.CREDIT_CARD_NUMBER", +entityGuid = "cc0730ba-9b30-41f0-6953-559d17626d2b", +} }); - Response response = client.AddOrUpdateBusinessMetadata("", content); + Response response = client.AddClassifications("cc0730ba-9b30-41f0-6953-559d17626d2b", content); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_AddOrUpdateBusinessMetadata_ShortVersion_Async() + public async Task Example_Entity_AddClassifications_EntityAddClassifications_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - using RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new object[] { - key = new - { - key = new object(), - }, +new +{ +typeName = "MICROSOFT.FINANCIAL.US.ABA_ROUTING_NUMBER", +entityGuid = "cc0730ba-9b30-41f0-6953-559d17626d2b", +}, +new +{ +typeName = "MICROSOFT.FINANCIAL.CREDIT_CARD_NUMBER", +entityGuid = "cc0730ba-9b30-41f0-6953-559d17626d2b", +} }); - Response response = await client.AddOrUpdateBusinessMetadataAsync("", content); + Response response = await client.AddClassificationsAsync("cc0730ba-9b30-41f0-6953-559d17626d2b", content); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Entity_AddOrUpdateBusinessMetadata_ShortVersion_Convenience() + public void Example_Entity_AddClassifications_EntityAddClassifications_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - Response response = client.AddOrUpdateBusinessMetadata("", new Dictionary> + Response response = client.AddClassifications("cc0730ba-9b30-41f0-6953-559d17626d2b", new AtlasClassification[] { - ["key"] = new Dictionary - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - } +new AtlasClassification +{ +TypeName = "MICROSOFT.FINANCIAL.US.ABA_ROUTING_NUMBER", +EntityGuid = "cc0730ba-9b30-41f0-6953-559d17626d2b", +}, +new AtlasClassification +{ +TypeName = "MICROSOFT.FINANCIAL.CREDIT_CARD_NUMBER", +EntityGuid = "cc0730ba-9b30-41f0-6953-559d17626d2b", +} }); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_AddOrUpdateBusinessMetadata_ShortVersion_Convenience_Async() + public async Task Example_Entity_AddClassifications_EntityAddClassifications_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - Response response = await client.AddOrUpdateBusinessMetadataAsync("", new Dictionary> + Response response = await client.AddClassificationsAsync("cc0730ba-9b30-41f0-6953-559d17626d2b", new AtlasClassification[] { - ["key"] = new Dictionary - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - } +new AtlasClassification +{ +TypeName = "MICROSOFT.FINANCIAL.US.ABA_ROUTING_NUMBER", +EntityGuid = "cc0730ba-9b30-41f0-6953-559d17626d2b", +}, +new AtlasClassification +{ +TypeName = "MICROSOFT.FINANCIAL.CREDIT_CARD_NUMBER", +EntityGuid = "cc0730ba-9b30-41f0-6953-559d17626d2b", +} }); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Entity_AddOrUpdateBusinessMetadata_AllParameters() + public void Example_Entity_UpdateClassifications_EntityUpdateClassifications() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - using RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new object[] { - key = new - { - key = new object(), - }, +new +{ +typeName = "MICROSOFT.FINANCIAL.CREDIT_CARD_NUMBER", +entityGuid = "45dd4404-e897-b7e2-ca3c-f6e6b11b4f24", +}, +new +{ +typeName = "MICROSOFT.FINANCIAL.US_BANK_ACCOUNT_NUMBER", +entityGuid = "45dd4404-e897-b7e2-ca3c-f6e6b11b4f24", +} }); - Response response = client.AddOrUpdateBusinessMetadata("", content, overwrite: true); + Response response = client.UpdateClassifications("45dd4404-e897-b7e2-ca3c-f6e6b11b4f24", content); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_AddOrUpdateBusinessMetadata_AllParameters_Async() + public async Task Example_Entity_UpdateClassifications_EntityUpdateClassifications_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - using RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new object[] { - key = new - { - key = new object(), - }, +new +{ +typeName = "MICROSOFT.FINANCIAL.CREDIT_CARD_NUMBER", +entityGuid = "45dd4404-e897-b7e2-ca3c-f6e6b11b4f24", +}, +new +{ +typeName = "MICROSOFT.FINANCIAL.US_BANK_ACCOUNT_NUMBER", +entityGuid = "45dd4404-e897-b7e2-ca3c-f6e6b11b4f24", +} }); - Response response = await client.AddOrUpdateBusinessMetadataAsync("", content, overwrite: true); + Response response = await client.UpdateClassificationsAsync("45dd4404-e897-b7e2-ca3c-f6e6b11b4f24", content); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Entity_AddOrUpdateBusinessMetadata_AllParameters_Convenience() + public void Example_Entity_UpdateClassifications_EntityUpdateClassifications_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - Response response = client.AddOrUpdateBusinessMetadata("", new Dictionary> + Response response = client.UpdateClassifications("45dd4404-e897-b7e2-ca3c-f6e6b11b4f24", new AtlasClassification[] { - ["key"] = new Dictionary - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - } - }, overwrite: true); +new AtlasClassification +{ +TypeName = "MICROSOFT.FINANCIAL.CREDIT_CARD_NUMBER", +EntityGuid = "45dd4404-e897-b7e2-ca3c-f6e6b11b4f24", +}, +new AtlasClassification +{ +TypeName = "MICROSOFT.FINANCIAL.US_BANK_ACCOUNT_NUMBER", +EntityGuid = "45dd4404-e897-b7e2-ca3c-f6e6b11b4f24", +} + }); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_AddOrUpdateBusinessMetadata_AllParameters_Convenience_Async() + public async Task Example_Entity_UpdateClassifications_EntityUpdateClassifications_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - Response response = await client.AddOrUpdateBusinessMetadataAsync("", new Dictionary> + Response response = await client.UpdateClassificationsAsync("45dd4404-e897-b7e2-ca3c-f6e6b11b4f24", new AtlasClassification[] { - ["key"] = new Dictionary - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - } - }, overwrite: true); +new AtlasClassification +{ +TypeName = "MICROSOFT.FINANCIAL.CREDIT_CARD_NUMBER", +EntityGuid = "45dd4404-e897-b7e2-ca3c-f6e6b11b4f24", +}, +new AtlasClassification +{ +TypeName = "MICROSOFT.FINANCIAL.US_BANK_ACCOUNT_NUMBER", +EntityGuid = "45dd4404-e897-b7e2-ca3c-f6e6b11b4f24", +} + }); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Entity_RemoveBusinessMetadataAttributes_ShortVersion() + public void Example_Entity_GetByUniqueAttribute_EntityGetByUniqueAttributes() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - using RequestContent content = RequestContent.Create(new - { - key = new object(), - }); - Response response = client.RemoveBusinessMetadataAttributes("", "", content); + Response response = client.GetByUniqueAttribute("azure_storage_account", true, null, "https://exampleaccount.core.windows.net", null); - Console.WriteLine(response.Status); + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_RemoveBusinessMetadataAttributes_ShortVersion_Async() + public async Task Example_Entity_GetByUniqueAttribute_EntityGetByUniqueAttributes_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - using RequestContent content = RequestContent.Create(new - { - key = new object(), - }); - Response response = await client.RemoveBusinessMetadataAttributesAsync("", "", content); + Response response = await client.GetByUniqueAttributeAsync("azure_storage_account", true, null, "https://exampleaccount.core.windows.net", null); - Console.WriteLine(response.Status); + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Entity_RemoveBusinessMetadataAttributes_ShortVersion_Convenience() + public void Example_Entity_GetByUniqueAttribute_EntityGetByUniqueAttributes_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - Response response = client.RemoveBusinessMetadataAttributes("", "", new Dictionary - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }); + Response response = client.GetByUniqueAttribute("azure_storage_account"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_RemoveBusinessMetadataAttributes_ShortVersion_Convenience_Async() + public async Task Example_Entity_GetByUniqueAttribute_EntityGetByUniqueAttributes_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - Response response = await client.RemoveBusinessMetadataAttributesAsync("", "", new Dictionary - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }); + Response response = await client.GetByUniqueAttributeAsync("azure_storage_account"); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Entity_RemoveBusinessMetadataAttributes_AllParameters() + public void Example_Entity_UpdateByUniqueAttribute_EntityPartialUpdateByUniqueAttributes() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); using RequestContent content = RequestContent.Create(new { - key = new object(), + entity = new + { + createTime = 1605766397985, + createdBy = "8c062c84-5d25-449f-a990-9d8ab70b8ec7", + guid = "dc507ccf-0c57-4165-9327-f37b0d13fda0", + relationshipAttributes = new + { + services = Array.Empty(), + meanings = Array.Empty(), + }, + status = "ACTIVE", + updateTime = 1605766397985, + updatedBy = "8c062c84-5d25-449f-a990-9d8ab70b8ec7", + lastModifiedTS = "1", + version = 0, + attributes = new + { + owner = "ExampleOwner", + qualifiedName = "https://exampleaccount.core.windows.net", + createTime = 0, + name = "ExampleNewName", + }, + typeName = "azure_storage_account", + }, + referredEntities = new object(), }); - Response response = client.RemoveBusinessMetadataAttributes("", "", content); + Response response = client.UpdateByUniqueAttribute("azure_storage_account", content); - Console.WriteLine(response.Status); + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_RemoveBusinessMetadataAttributes_AllParameters_Async() + public async Task Example_Entity_UpdateByUniqueAttribute_EntityPartialUpdateByUniqueAttributes_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); using RequestContent content = RequestContent.Create(new { - key = new object(), + entity = new + { + createTime = 1605766397985, + createdBy = "8c062c84-5d25-449f-a990-9d8ab70b8ec7", + guid = "dc507ccf-0c57-4165-9327-f37b0d13fda0", + relationshipAttributes = new + { + services = Array.Empty(), + meanings = Array.Empty(), + }, + status = "ACTIVE", + updateTime = 1605766397985, + updatedBy = "8c062c84-5d25-449f-a990-9d8ab70b8ec7", + lastModifiedTS = "1", + version = 0, + attributes = new + { + owner = "ExampleOwner", + qualifiedName = "https://exampleaccount.core.windows.net", + createTime = 0, + name = "ExampleNewName", + }, + typeName = "azure_storage_account", + }, + referredEntities = new object(), }); - Response response = await client.RemoveBusinessMetadataAttributesAsync("", "", content); + Response response = await client.UpdateByUniqueAttributeAsync("azure_storage_account", content); - Console.WriteLine(response.Status); + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Entity_RemoveBusinessMetadataAttributes_AllParameters_Convenience() + public void Example_Entity_UpdateByUniqueAttribute_EntityPartialUpdateByUniqueAttributes_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - Response response = client.RemoveBusinessMetadataAttributes("", "", new Dictionary + AtlasEntityWithExtInfo body = new AtlasEntityWithExtInfo { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }); + ReferredEntities = { }, + Entity = new AtlasEntity + { + Attributes = +{ +["owner"] = BinaryData.FromObjectAsJson("ExampleOwner"), +["qualifiedName"] = BinaryData.FromObjectAsJson("https://exampleaccount.core.windows.net"), +["createTime"] = BinaryData.FromObjectAsJson(0), +["name"] = BinaryData.FromObjectAsJson("ExampleNewName") +}, + TypeName = "azure_storage_account", + LastModifiedTS = "1", + CreateTime = 1605766397985, + CreatedBy = "8c062c84-5d25-449f-a990-9d8ab70b8ec7", + Guid = "dc507ccf-0c57-4165-9327-f37b0d13fda0", + RelationshipAttributes = +{ +["services"] = BinaryData.FromObjectAsJson(Array.Empty()), +["meanings"] = BinaryData.FromObjectAsJson(Array.Empty()) +}, + Status = EntityStatus.Active, + UpdateTime = 1605766397985, + UpdatedBy = "8c062c84-5d25-449f-a990-9d8ab70b8ec7", + Version = 0, + }, + }; + Response response = client.UpdateByUniqueAttribute("azure_storage_account", body); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_RemoveBusinessMetadataAttributes_AllParameters_Convenience_Async() + public async Task Example_Entity_UpdateByUniqueAttribute_EntityPartialUpdateByUniqueAttributes_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - Response response = await client.RemoveBusinessMetadataAttributesAsync("", "", new Dictionary + AtlasEntityWithExtInfo body = new AtlasEntityWithExtInfo { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }); + ReferredEntities = { }, + Entity = new AtlasEntity + { + Attributes = +{ +["owner"] = BinaryData.FromObjectAsJson("ExampleOwner"), +["qualifiedName"] = BinaryData.FromObjectAsJson("https://exampleaccount.core.windows.net"), +["createTime"] = BinaryData.FromObjectAsJson(0), +["name"] = BinaryData.FromObjectAsJson("ExampleNewName") +}, + TypeName = "azure_storage_account", + LastModifiedTS = "1", + CreateTime = 1605766397985, + CreatedBy = "8c062c84-5d25-449f-a990-9d8ab70b8ec7", + Guid = "dc507ccf-0c57-4165-9327-f37b0d13fda0", + RelationshipAttributes = +{ +["services"] = BinaryData.FromObjectAsJson(Array.Empty()), +["meanings"] = BinaryData.FromObjectAsJson(Array.Empty()) +}, + Status = EntityStatus.Active, + UpdateTime = 1605766397985, + UpdatedBy = "8c062c84-5d25-449f-a990-9d8ab70b8ec7", + Version = 0, + }, + }; + Response response = await client.UpdateByUniqueAttributeAsync("azure_storage_account", body); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Entity_AddOrUpdateBusinessMetadataAttributes_ShortVersion() + public void Example_Entity_DeleteByUniqueAttribute_EntityDeleteByUniqueAttribute() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - using RequestContent content = RequestContent.Create(new - { - key = new object(), - }); - Response response = client.AddOrUpdateBusinessMetadataAttributes("", "", content); + Response response = client.DeleteByUniqueAttribute("azure_storage_account", "https://exampleaccount.core.windows.net", null); - Console.WriteLine(response.Status); + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_AddOrUpdateBusinessMetadataAttributes_ShortVersion_Async() + public async Task Example_Entity_DeleteByUniqueAttribute_EntityDeleteByUniqueAttribute_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - using RequestContent content = RequestContent.Create(new - { - key = new object(), - }); - Response response = await client.AddOrUpdateBusinessMetadataAttributesAsync("", "", content); + Response response = await client.DeleteByUniqueAttributeAsync("azure_storage_account", "https://exampleaccount.core.windows.net", null); - Console.WriteLine(response.Status); + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Entity_AddOrUpdateBusinessMetadataAttributes_ShortVersion_Convenience() + public void Example_Entity_DeleteByUniqueAttribute_EntityDeleteByUniqueAttribute_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - Response response = client.AddOrUpdateBusinessMetadataAttributes("", "", new Dictionary - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }); + Response response = client.DeleteByUniqueAttribute("azure_storage_account"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_AddOrUpdateBusinessMetadataAttributes_ShortVersion_Convenience_Async() + public async Task Example_Entity_DeleteByUniqueAttribute_EntityDeleteByUniqueAttribute_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - Response response = await client.AddOrUpdateBusinessMetadataAttributesAsync("", "", new Dictionary - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }); + Response response = await client.DeleteByUniqueAttributeAsync("azure_storage_account"); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Entity_AddOrUpdateBusinessMetadataAttributes_AllParameters() + public void Example_Entity_RemoveClassificationByUniqueAttribute_EntityRemoveClassificationByUniqueAttribute() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - using RequestContent content = RequestContent.Create(new - { - key = new object(), - }); - Response response = client.AddOrUpdateBusinessMetadataAttributes("", "", content); + Response response = client.RemoveClassificationByUniqueAttribute("column", "MICROSOFT.FINANCIAL.US.ABA_ROUTING_NUMBER"); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_AddOrUpdateBusinessMetadataAttributes_AllParameters_Async() + public async Task Example_Entity_RemoveClassificationByUniqueAttribute_EntityRemoveClassificationByUniqueAttribute_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - using RequestContent content = RequestContent.Create(new - { - key = new object(), - }); - Response response = await client.AddOrUpdateBusinessMetadataAttributesAsync("", "", content); + Response response = await client.RemoveClassificationByUniqueAttributeAsync("column", "MICROSOFT.FINANCIAL.US.ABA_ROUTING_NUMBER"); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Entity_AddOrUpdateBusinessMetadataAttributes_AllParameters_Convenience() + public void Example_Entity_AddClassificationsByUniqueAttribute_EntityAddClassificationsByUniqueAttribute() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - Response response = client.AddOrUpdateBusinessMetadataAttributes("", "", new Dictionary + using RequestContent content = RequestContent.Create(new object[] { - ["key"] = BinaryData.FromObjectAsJson(new object()) +new +{ +typeName = "MICROSOFT.FINANCIAL.US.ABA_ROUTING_NUMBER", +}, +new +{ +typeName = "MICROSOFT.FINANCIAL.CREDIT_CARD_NUMBER", +} }); + Response response = client.AddClassificationsByUniqueAttribute("azure_storage_account", content); + + Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_AddOrUpdateBusinessMetadataAttributes_AllParameters_Convenience_Async() + public async Task Example_Entity_AddClassificationsByUniqueAttribute_EntityAddClassificationsByUniqueAttribute_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - Response response = await client.AddOrUpdateBusinessMetadataAttributesAsync("", "", new Dictionary + using RequestContent content = RequestContent.Create(new object[] { - ["key"] = BinaryData.FromObjectAsJson(new object()) +new +{ +typeName = "MICROSOFT.FINANCIAL.US.ABA_ROUTING_NUMBER", +}, +new +{ +typeName = "MICROSOFT.FINANCIAL.CREDIT_CARD_NUMBER", +} }); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Entity_GetBusinessMetadataTemplate_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = client.GetBusinessMetadataTemplate(null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_GetBusinessMetadataTemplate_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - - Response response = await client.GetBusinessMetadataTemplateAsync(null); + Response response = await client.AddClassificationsByUniqueAttributeAsync("azure_storage_account", content); - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Entity_GetBusinessMetadataTemplate_ShortVersion_Convenience() + public void Example_Entity_AddClassificationsByUniqueAttribute_EntityAddClassificationsByUniqueAttribute_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - Response response = client.GetBusinessMetadataTemplate(); + Response response = client.AddClassificationsByUniqueAttribute("azure_storage_account", new AtlasClassification[] + { +new AtlasClassification +{ +TypeName = "MICROSOFT.FINANCIAL.US.ABA_ROUTING_NUMBER", +}, +new AtlasClassification +{ +TypeName = "MICROSOFT.FINANCIAL.CREDIT_CARD_NUMBER", +} + }); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_GetBusinessMetadataTemplate_ShortVersion_Convenience_Async() + public async Task Example_Entity_AddClassificationsByUniqueAttribute_EntityAddClassificationsByUniqueAttribute_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - Response response = await client.GetBusinessMetadataTemplateAsync(); + Response response = await client.AddClassificationsByUniqueAttributeAsync("azure_storage_account", new AtlasClassification[] + { +new AtlasClassification +{ +TypeName = "MICROSOFT.FINANCIAL.US.ABA_ROUTING_NUMBER", +}, +new AtlasClassification +{ +TypeName = "MICROSOFT.FINANCIAL.CREDIT_CARD_NUMBER", +} + }); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Entity_GetBusinessMetadataTemplate_AllParameters() + public void Example_Entity_UpdateClassificationsUniqueByAttribute_EntityUpdateClassificationsByUniqueAttribute() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - Response response = client.GetBusinessMetadataTemplate(null); + using RequestContent content = RequestContent.Create(new object[] + { +new +{ +typeName = "MICROSOFT.FINANCIAL.US.ABA_ROUTING_NUMBER", +}, +new +{ +typeName = "MICROSOFT.FINANCIAL.CREDIT_CARD_NUMBER", +} + }); + Response response = client.UpdateClassificationsUniqueByAttribute("azure_storage_account", content); - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_GetBusinessMetadataTemplate_AllParameters_Async() + public async Task Example_Entity_UpdateClassificationsUniqueByAttribute_EntityUpdateClassificationsByUniqueAttribute_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - Response response = await client.GetBusinessMetadataTemplateAsync(null); + using RequestContent content = RequestContent.Create(new object[] + { +new +{ +typeName = "MICROSOFT.FINANCIAL.US.ABA_ROUTING_NUMBER", +}, +new +{ +typeName = "MICROSOFT.FINANCIAL.CREDIT_CARD_NUMBER", +} + }); + Response response = await client.UpdateClassificationsUniqueByAttributeAsync("azure_storage_account", content); - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Entity_GetBusinessMetadataTemplate_AllParameters_Convenience() + public void Example_Entity_UpdateClassificationsUniqueByAttribute_EntityUpdateClassificationsByUniqueAttribute_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - Response response = client.GetBusinessMetadataTemplate(); + Response response = client.UpdateClassificationsUniqueByAttribute("azure_storage_account", new AtlasClassification[] + { +new AtlasClassification +{ +TypeName = "MICROSOFT.FINANCIAL.US.ABA_ROUTING_NUMBER", +}, +new AtlasClassification +{ +TypeName = "MICROSOFT.FINANCIAL.CREDIT_CARD_NUMBER", +} + }); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_GetBusinessMetadataTemplate_AllParameters_Convenience_Async() + public async Task Example_Entity_UpdateClassificationsUniqueByAttribute_EntityUpdateClassificationsByUniqueAttribute_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - Response response = await client.GetBusinessMetadataTemplateAsync(); + Response response = await client.UpdateClassificationsUniqueByAttributeAsync("azure_storage_account", new AtlasClassification[] + { +new AtlasClassification +{ +TypeName = "MICROSOFT.FINANCIAL.US.ABA_ROUTING_NUMBER", +}, +new AtlasClassification +{ +TypeName = "MICROSOFT.FINANCIAL.CREDIT_CARD_NUMBER", +} + }); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Entity_ImportBusinessMetadata_ShortVersion() + public void Example_Entity_BatchSetClassifications_EntityBulkSetClassifications() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); using RequestContent content = RequestContent.Create(new { - file = File.OpenRead(""), + guidHeaderMap = new Dictionary + { + ["9fb74c11-ac48-4650-95bc-760665c5bd92"] = new + { + attributes = new + { + qualifiedName = "https://exampleaccount1.core.windows.net", + }, + typeName = "azure_storage_account", + classifications = new object[] + { +new +{ +typeName = "MICROSOFT.PERSONAL.EMAIL", +} + }, + }, + ["7fcc43ab-55ea-45d4-9971-ce0443cb10bb"] = new + { + attributes = new + { + qualifiedName = "https://exampleaccount2.core.windows.net", + }, + typeName = "azure_storage_account", + classifications = new object[] + { +new +{ +typeName = "MICROSOFT.PERSONAL.IPADDRESS", +} + }, + } + }, }); - Response response = client.ImportBusinessMetadata(content, "multipart/form-data"); + Response response = client.BatchSetClassifications(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_ImportBusinessMetadata_ShortVersion_Async() + public async Task Example_Entity_BatchSetClassifications_EntityBulkSetClassifications_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); using RequestContent content = RequestContent.Create(new { - file = File.OpenRead(""), + guidHeaderMap = new Dictionary + { + ["9fb74c11-ac48-4650-95bc-760665c5bd92"] = new + { + attributes = new + { + qualifiedName = "https://exampleaccount1.core.windows.net", + }, + typeName = "azure_storage_account", + classifications = new object[] + { +new +{ +typeName = "MICROSOFT.PERSONAL.EMAIL", +} + }, + }, + ["7fcc43ab-55ea-45d4-9971-ce0443cb10bb"] = new + { + attributes = new + { + qualifiedName = "https://exampleaccount2.core.windows.net", + }, + typeName = "azure_storage_account", + classifications = new object[] + { +new +{ +typeName = "MICROSOFT.PERSONAL.IPADDRESS", +} + }, + } + }, }); - Response response = await client.ImportBusinessMetadataAsync(content, "multipart/form-data"); + Response response = await client.BatchSetClassificationsAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Entity_ImportBusinessMetadata_ShortVersion_Convenience() + public void Example_Entity_BatchSetClassifications_EntityBulkSetClassifications_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - BusinessMetadataOptions body = new BusinessMetadataOptions(null); - Response response = client.ImportBusinessMetadata(body); + AtlasEntityHeaders body = new AtlasEntityHeaders + { + GuidHeaderMap = +{ +["9fb74c11-ac48-4650-95bc-760665c5bd92"] = new AtlasEntityHeader +{ +Attributes = +{ +["qualifiedName"] = BinaryData.FromObjectAsJson("https://exampleaccount1.core.windows.net") +}, +TypeName = "azure_storage_account", +Classifications = {new AtlasClassification +{ +TypeName = "MICROSOFT.PERSONAL.EMAIL", +}}, +}, +["7fcc43ab-55ea-45d4-9971-ce0443cb10bb"] = new AtlasEntityHeader +{ +Attributes = +{ +["qualifiedName"] = BinaryData.FromObjectAsJson("https://exampleaccount2.core.windows.net") +}, +TypeName = "azure_storage_account", +Classifications = {new AtlasClassification +{ +TypeName = "MICROSOFT.PERSONAL.IPADDRESS", +}}, +} +}, + }; + Response> response = client.BatchSetClassifications(body); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_ImportBusinessMetadata_ShortVersion_Convenience_Async() + public async Task Example_Entity_BatchSetClassifications_EntityBulkSetClassifications_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - BusinessMetadataOptions body = new BusinessMetadataOptions(null); - Response response = await client.ImportBusinessMetadataAsync(body); + AtlasEntityHeaders body = new AtlasEntityHeaders + { + GuidHeaderMap = +{ +["9fb74c11-ac48-4650-95bc-760665c5bd92"] = new AtlasEntityHeader +{ +Attributes = +{ +["qualifiedName"] = BinaryData.FromObjectAsJson("https://exampleaccount1.core.windows.net") +}, +TypeName = "azure_storage_account", +Classifications = {new AtlasClassification +{ +TypeName = "MICROSOFT.PERSONAL.EMAIL", +}}, +}, +["7fcc43ab-55ea-45d4-9971-ce0443cb10bb"] = new AtlasEntityHeader +{ +Attributes = +{ +["qualifiedName"] = BinaryData.FromObjectAsJson("https://exampleaccount2.core.windows.net") +}, +TypeName = "azure_storage_account", +Classifications = {new AtlasClassification +{ +TypeName = "MICROSOFT.PERSONAL.IPADDRESS", +}}, +} +}, + }; + Response> response = await client.BatchSetClassificationsAsync(body); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Entity_ImportBusinessMetadata_AllParameters() + public void Example_Entity_BatchGetByUniqueAttributes_EntityListByUniqueAttributes() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - using RequestContent content = RequestContent.Create(new - { - file = File.OpenRead(""), - }); - Response response = client.ImportBusinessMetadata(content, "multipart/form-data"); + Response response = client.BatchGetByUniqueAttributes("azure_storage_account", true, null, "adl://exampleaccount.azuredatalakestore.net/123/1/DP_TFS/CBT/Extensions/DTTP.targets#:xml/Project/PropertyGroup/ExampleName1", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("failedImportInfoList")[0].GetProperty("childObjectName").ToString()); - Console.WriteLine(result.GetProperty("failedImportInfoList")[0].GetProperty("importStatus").ToString()); - Console.WriteLine(result.GetProperty("failedImportInfoList")[0].GetProperty("parentObjectName").ToString()); - Console.WriteLine(result.GetProperty("failedImportInfoList")[0].GetProperty("remarks").ToString()); - Console.WriteLine(result.GetProperty("successImportInfoList")[0].GetProperty("childObjectName").ToString()); - Console.WriteLine(result.GetProperty("successImportInfoList")[0].GetProperty("importStatus").ToString()); - Console.WriteLine(result.GetProperty("successImportInfoList")[0].GetProperty("parentObjectName").ToString()); - Console.WriteLine(result.GetProperty("successImportInfoList")[0].GetProperty("remarks").ToString()); + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_ImportBusinessMetadata_AllParameters_Async() + public async Task Example_Entity_BatchGetByUniqueAttributes_EntityListByUniqueAttributes_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - using RequestContent content = RequestContent.Create(new - { - file = File.OpenRead(""), - }); - Response response = await client.ImportBusinessMetadataAsync(content, "multipart/form-data"); + Response response = await client.BatchGetByUniqueAttributesAsync("azure_storage_account", true, null, "adl://exampleaccount.azuredatalakestore.net/123/1/DP_TFS/CBT/Extensions/DTTP.targets#:xml/Project/PropertyGroup/ExampleName1", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("failedImportInfoList")[0].GetProperty("childObjectName").ToString()); - Console.WriteLine(result.GetProperty("failedImportInfoList")[0].GetProperty("importStatus").ToString()); - Console.WriteLine(result.GetProperty("failedImportInfoList")[0].GetProperty("parentObjectName").ToString()); - Console.WriteLine(result.GetProperty("failedImportInfoList")[0].GetProperty("remarks").ToString()); - Console.WriteLine(result.GetProperty("successImportInfoList")[0].GetProperty("childObjectName").ToString()); - Console.WriteLine(result.GetProperty("successImportInfoList")[0].GetProperty("importStatus").ToString()); - Console.WriteLine(result.GetProperty("successImportInfoList")[0].GetProperty("parentObjectName").ToString()); - Console.WriteLine(result.GetProperty("successImportInfoList")[0].GetProperty("remarks").ToString()); + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Entity_ImportBusinessMetadata_AllParameters_Convenience() + public void Example_Entity_BatchGetByUniqueAttributes_EntityListByUniqueAttributes_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - BusinessMetadataOptions body = new BusinessMetadataOptions(null); - Response response = client.ImportBusinessMetadata(body); + Response response = client.BatchGetByUniqueAttributes("azure_storage_account"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_ImportBusinessMetadata_AllParameters_Convenience_Async() + public async Task Example_Entity_BatchGetByUniqueAttributes_EntityListByUniqueAttributes_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - BusinessMetadataOptions body = new BusinessMetadataOptions(null); - Response response = await client.ImportBusinessMetadataAsync(body); + Response response = await client.BatchGetByUniqueAttributesAsync("azure_storage_account"); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Entity_RemoveLabels_ShortVersion() + public void Example_Entity_GetHeader_EntityGetHeader() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - using RequestContent content = null; - Response response = client.RemoveLabels("", content); + Response response = client.GetHeader("9fb74c11-ac48-4650-95bc-760665c5bd92", null); - Console.WriteLine(response.Status); + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_RemoveLabels_ShortVersion_Async() + public async Task Example_Entity_GetHeader_EntityGetHeader_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - using RequestContent content = null; - Response response = await client.RemoveLabelsAsync("", content); + Response response = await client.GetHeaderAsync("9fb74c11-ac48-4650-95bc-760665c5bd92", null); - Console.WriteLine(response.Status); + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Entity_RemoveLabels_ShortVersion_Convenience() + public void Example_Entity_GetHeader_EntityGetHeader_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - Response response = client.RemoveLabels(""); + Response response = client.GetHeader("9fb74c11-ac48-4650-95bc-760665c5bd92"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_RemoveLabels_ShortVersion_Convenience_Async() + public async Task Example_Entity_GetHeader_EntityGetHeader_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - Response response = await client.RemoveLabelsAsync(""); + Response response = await client.GetHeaderAsync("9fb74c11-ac48-4650-95bc-760665c5bd92"); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Entity_RemoveLabels_AllParameters() + public void Example_Entity_RemoveBusinessMetadata_EntityRemoveBusinessMetadata() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - using RequestContent content = RequestContent.Create(new object[] + using RequestContent content = RequestContent.Create(new { -"" + myBizMetadata1 = new + { + bizAttr1 = "myBizMetaData1.bizAttr1", + }, }); - Response response = client.RemoveLabels("", content); + Response response = client.RemoveBusinessMetadata("02c373fe-2823-4be3-97fa-55180a9faa06", content); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_RemoveLabels_AllParameters_Async() + public async Task Example_Entity_RemoveBusinessMetadata_EntityRemoveBusinessMetadata_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - using RequestContent content = RequestContent.Create(new object[] + using RequestContent content = RequestContent.Create(new { -"" + myBizMetadata1 = new + { + bizAttr1 = "myBizMetaData1.bizAttr1", + }, }); - Response response = await client.RemoveLabelsAsync("", content); + Response response = await client.RemoveBusinessMetadataAsync("02c373fe-2823-4be3-97fa-55180a9faa06", content); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Entity_RemoveLabels_AllParameters_Convenience() + public void Example_Entity_RemoveBusinessMetadata_EntityRemoveBusinessMetadata_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - Response response = client.RemoveLabels("", body: new string[] { "" }); + Response response = client.RemoveBusinessMetadata("02c373fe-2823-4be3-97fa-55180a9faa06", new Dictionary> + { + ["myBizMetadata1"] = new Dictionary + { + ["bizAttr1"] = BinaryData.FromObjectAsJson("myBizMetaData1.bizAttr1") + } + }); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_RemoveLabels_AllParameters_Convenience_Async() + public async Task Example_Entity_RemoveBusinessMetadata_EntityRemoveBusinessMetadata_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - Response response = await client.RemoveLabelsAsync("", body: new string[] { "" }); + Response response = await client.RemoveBusinessMetadataAsync("02c373fe-2823-4be3-97fa-55180a9faa06", new Dictionary> + { + ["myBizMetadata1"] = new Dictionary + { + ["bizAttr1"] = BinaryData.FromObjectAsJson("myBizMetaData1.bizAttr1") + } + }); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Entity_SetLabels_ShortVersion() + public void Example_Entity_AddOrUpdateBusinessMetadata_EntityAddOrUpdateBusinessMetadata() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - using RequestContent content = null; - Response response = client.SetLabels("", content); + using RequestContent content = RequestContent.Create(new + { + myBizMetadata1 = new + { + bizAttr1 = "myBizMetaData1.bizAttr1", + }, + }); + Response response = client.AddOrUpdateBusinessMetadata("02c373fe-2823-4be3-97fa-55180a9faa06", content); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_SetLabels_ShortVersion_Async() + public async Task Example_Entity_AddOrUpdateBusinessMetadata_EntityAddOrUpdateBusinessMetadata_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - using RequestContent content = null; - Response response = await client.SetLabelsAsync("", content); + using RequestContent content = RequestContent.Create(new + { + myBizMetadata1 = new + { + bizAttr1 = "myBizMetaData1.bizAttr1", + }, + }); + Response response = await client.AddOrUpdateBusinessMetadataAsync("02c373fe-2823-4be3-97fa-55180a9faa06", content); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Entity_SetLabels_ShortVersion_Convenience() + public void Example_Entity_AddOrUpdateBusinessMetadata_EntityAddOrUpdateBusinessMetadata_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - Response response = client.SetLabels(""); + Response response = client.AddOrUpdateBusinessMetadata("02c373fe-2823-4be3-97fa-55180a9faa06", new Dictionary> + { + ["myBizMetadata1"] = new Dictionary + { + ["bizAttr1"] = BinaryData.FromObjectAsJson("myBizMetaData1.bizAttr1") + } + }); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_SetLabels_ShortVersion_Convenience_Async() + public async Task Example_Entity_AddOrUpdateBusinessMetadata_EntityAddOrUpdateBusinessMetadata_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - Response response = await client.SetLabelsAsync(""); + Response response = await client.AddOrUpdateBusinessMetadataAsync("02c373fe-2823-4be3-97fa-55180a9faa06", new Dictionary> + { + ["myBizMetadata1"] = new Dictionary + { + ["bizAttr1"] = BinaryData.FromObjectAsJson("myBizMetaData1.bizAttr1") + } + }); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Entity_SetLabels_AllParameters() + public void Example_Entity_RemoveBusinessMetadataAttributes_EntityRemoveBusinessAttribute() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - using RequestContent content = RequestContent.Create(new object[] + using RequestContent content = RequestContent.Create(new { -"" + bizAttr1 = "bizAttr1", }); - Response response = client.SetLabels("", content); + Response response = client.RemoveBusinessMetadataAttributes("02c373fe-2823-4be3-97fa-55180a9faa06", "myBizMetaData1", content); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_SetLabels_AllParameters_Async() + public async Task Example_Entity_RemoveBusinessMetadataAttributes_EntityRemoveBusinessAttribute_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - using RequestContent content = RequestContent.Create(new object[] + using RequestContent content = RequestContent.Create(new { -"" + bizAttr1 = "bizAttr1", }); - Response response = await client.SetLabelsAsync("", content); + Response response = await client.RemoveBusinessMetadataAttributesAsync("02c373fe-2823-4be3-97fa-55180a9faa06", "myBizMetaData1", content); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Entity_SetLabels_AllParameters_Convenience() + public void Example_Entity_RemoveBusinessMetadataAttributes_EntityRemoveBusinessAttribute_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - Response response = client.SetLabels("", body: new string[] { "" }); + Response response = client.RemoveBusinessMetadataAttributes("02c373fe-2823-4be3-97fa-55180a9faa06", "myBizMetaData1", new Dictionary + { + ["bizAttr1"] = BinaryData.FromObjectAsJson("bizAttr1") + }); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_SetLabels_AllParameters_Convenience_Async() + public async Task Example_Entity_RemoveBusinessMetadataAttributes_EntityRemoveBusinessAttribute_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - Response response = await client.SetLabelsAsync("", body: new string[] { "" }); + Response response = await client.RemoveBusinessMetadataAttributesAsync("02c373fe-2823-4be3-97fa-55180a9faa06", "myBizMetaData1", new Dictionary + { + ["bizAttr1"] = BinaryData.FromObjectAsJson("bizAttr1") + }); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Entity_AddLabel_ShortVersion() + public void Example_Entity_AddOrUpdateBusinessMetadataAttributes_EntityAddOrUpdateBusinessAttribute() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - using RequestContent content = null; - Response response = client.AddLabel("", content); + using RequestContent content = RequestContent.Create(new + { + bizAttr1 = "bizAttr1", + }); + Response response = client.AddOrUpdateBusinessMetadataAttributes("02c373fe-2823-4be3-97fa-55180a9faa06", "myBizMetaData1", content); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_AddLabel_ShortVersion_Async() + public async Task Example_Entity_AddOrUpdateBusinessMetadataAttributes_EntityAddOrUpdateBusinessAttribute_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - using RequestContent content = null; - Response response = await client.AddLabelAsync("", content); + using RequestContent content = RequestContent.Create(new + { + bizAttr1 = "bizAttr1", + }); + Response response = await client.AddOrUpdateBusinessMetadataAttributesAsync("02c373fe-2823-4be3-97fa-55180a9faa06", "myBizMetaData1", content); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Entity_AddLabel_ShortVersion_Convenience() + public void Example_Entity_AddOrUpdateBusinessMetadataAttributes_EntityAddOrUpdateBusinessAttribute_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - Response response = client.AddLabel(""); + Response response = client.AddOrUpdateBusinessMetadataAttributes("02c373fe-2823-4be3-97fa-55180a9faa06", "myBizMetaData1", new Dictionary + { + ["bizAttr1"] = BinaryData.FromObjectAsJson("bizAttr1") + }); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_AddLabel_ShortVersion_Convenience_Async() + public async Task Example_Entity_AddOrUpdateBusinessMetadataAttributes_EntityAddOrUpdateBusinessAttribute_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - Response response = await client.AddLabelAsync(""); + Response response = await client.AddOrUpdateBusinessMetadataAttributesAsync("02c373fe-2823-4be3-97fa-55180a9faa06", "myBizMetaData1", new Dictionary + { + ["bizAttr1"] = BinaryData.FromObjectAsJson("bizAttr1") + }); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Entity_AddLabel_AllParameters() + public void Example_Entity_GetBusinessMetadataTemplate_EntityGetSampleBusinessMetadataTemplate() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - using RequestContent content = RequestContent.Create(new object[] - { -"" - }); - Response response = client.AddLabel("", content); + Response response = client.GetBusinessMetadataTemplate(null); - Console.WriteLine(response.Status); + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_AddLabel_AllParameters_Async() + public async Task Example_Entity_GetBusinessMetadataTemplate_EntityGetSampleBusinessMetadataTemplate_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - using RequestContent content = RequestContent.Create(new object[] - { -"" - }); - Response response = await client.AddLabelAsync("", content); + Response response = await client.GetBusinessMetadataTemplateAsync(null); - Console.WriteLine(response.Status); + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Entity_AddLabel_AllParameters_Convenience() + public void Example_Entity_GetBusinessMetadataTemplate_EntityGetSampleBusinessMetadataTemplate_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - Response response = client.AddLabel("", body: new string[] { "" }); + Response response = client.GetBusinessMetadataTemplate(); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_AddLabel_AllParameters_Convenience_Async() + public async Task Example_Entity_GetBusinessMetadataTemplate_EntityGetSampleBusinessMetadataTemplate_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - Response response = await client.AddLabelAsync("", body: new string[] { "" }); + Response response = await client.GetBusinessMetadataTemplateAsync(); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Entity_RemoveLabelsByUniqueAttribute_ShortVersion() + public void Example_Entity_ImportBusinessMetadata_EntityImportBusinessMetadata() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); using RequestContent content = null; - Response response = client.RemoveLabelsByUniqueAttribute("", content); + Response response = client.ImportBusinessMetadata(content, null); - Console.WriteLine(response.Status); + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_RemoveLabelsByUniqueAttribute_ShortVersion_Async() + public async Task Example_Entity_ImportBusinessMetadata_EntityImportBusinessMetadata_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); using RequestContent content = null; - Response response = await client.RemoveLabelsByUniqueAttributeAsync("", content); + Response response = await client.ImportBusinessMetadataAsync(content, null); - Console.WriteLine(response.Status); + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Entity_RemoveLabelsByUniqueAttribute_ShortVersion_Convenience() + public void Example_Entity_ImportBusinessMetadata_EntityImportBusinessMetadata_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - Response response = client.RemoveLabelsByUniqueAttribute(""); + BusinessMetadataOptions body = null; + Response response = client.ImportBusinessMetadata(body); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_RemoveLabelsByUniqueAttribute_ShortVersion_Convenience_Async() + public async Task Example_Entity_ImportBusinessMetadata_EntityImportBusinessMetadata_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - Response response = await client.RemoveLabelsByUniqueAttributeAsync(""); + BusinessMetadataOptions body = null; + Response response = await client.ImportBusinessMetadataAsync(body); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Entity_RemoveLabelsByUniqueAttribute_AllParameters() + public void Example_Entity_RemoveLabels_EntityRemoveLabels() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); using RequestContent content = RequestContent.Create(new object[] { -"" +"label1", +"label2" }); - Response response = client.RemoveLabelsByUniqueAttribute("", content, attribute: ""); + Response response = client.RemoveLabels("02c373fe-2823-4be3-97fa-55180a9faa06", content); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_RemoveLabelsByUniqueAttribute_AllParameters_Async() + public async Task Example_Entity_RemoveLabels_EntityRemoveLabels_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); using RequestContent content = RequestContent.Create(new object[] { -"" +"label1", +"label2" }); - Response response = await client.RemoveLabelsByUniqueAttributeAsync("", content, attribute: ""); + Response response = await client.RemoveLabelsAsync("02c373fe-2823-4be3-97fa-55180a9faa06", content); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Entity_RemoveLabelsByUniqueAttribute_AllParameters_Convenience() + public void Example_Entity_RemoveLabels_EntityRemoveLabels_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - Response response = client.RemoveLabelsByUniqueAttribute("", body: new string[] { "" }, attribute: ""); + Response response = client.RemoveLabels("02c373fe-2823-4be3-97fa-55180a9faa06"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_RemoveLabelsByUniqueAttribute_AllParameters_Convenience_Async() + public async Task Example_Entity_RemoveLabels_EntityRemoveLabels_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - Response response = await client.RemoveLabelsByUniqueAttributeAsync("", body: new string[] { "" }, attribute: ""); + Response response = await client.RemoveLabelsAsync("02c373fe-2823-4be3-97fa-55180a9faa06"); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Entity_SetLabelsByUniqueAttribute_ShortVersion() + public void Example_Entity_SetLabels_EntitySetLabels() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - using RequestContent content = null; - Response response = client.SetLabelsByUniqueAttribute("", content); + using RequestContent content = RequestContent.Create(new object[] + { +"label1", +"label2" + }); + Response response = client.SetLabels("02c373fe-2823-4be3-97fa-55180a9faa06", content); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_SetLabelsByUniqueAttribute_ShortVersion_Async() + public async Task Example_Entity_SetLabels_EntitySetLabels_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - using RequestContent content = null; - Response response = await client.SetLabelsByUniqueAttributeAsync("", content); + using RequestContent content = RequestContent.Create(new object[] + { +"label1", +"label2" + }); + Response response = await client.SetLabelsAsync("02c373fe-2823-4be3-97fa-55180a9faa06", content); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Entity_SetLabelsByUniqueAttribute_ShortVersion_Convenience() + public void Example_Entity_SetLabels_EntitySetLabels_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - Response response = client.SetLabelsByUniqueAttribute(""); + Response response = client.SetLabels("02c373fe-2823-4be3-97fa-55180a9faa06"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_SetLabelsByUniqueAttribute_ShortVersion_Convenience_Async() + public async Task Example_Entity_SetLabels_EntitySetLabels_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - Response response = await client.SetLabelsByUniqueAttributeAsync(""); + Response response = await client.SetLabelsAsync("02c373fe-2823-4be3-97fa-55180a9faa06"); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Entity_SetLabelsByUniqueAttribute_AllParameters() + public void Example_Entity_AddLabel_EntityAddLabel() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); using RequestContent content = RequestContent.Create(new object[] { -"" +"label1", +"label2" }); - Response response = client.SetLabelsByUniqueAttribute("", content, attribute: ""); + Response response = client.AddLabel("02c373fe-2823-4be3-97fa-55180a9faa06", content); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_SetLabelsByUniqueAttribute_AllParameters_Async() + public async Task Example_Entity_AddLabel_EntityAddLabel_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); using RequestContent content = RequestContent.Create(new object[] { -"" +"label1", +"label2" }); - Response response = await client.SetLabelsByUniqueAttributeAsync("", content, attribute: ""); + Response response = await client.AddLabelAsync("02c373fe-2823-4be3-97fa-55180a9faa06", content); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Entity_SetLabelsByUniqueAttribute_AllParameters_Convenience() + public void Example_Entity_AddLabel_EntityAddLabel_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - Response response = client.SetLabelsByUniqueAttribute("", body: new string[] { "" }, attribute: ""); + Response response = client.AddLabel("02c373fe-2823-4be3-97fa-55180a9faa06"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_SetLabelsByUniqueAttribute_AllParameters_Convenience_Async() + public async Task Example_Entity_AddLabel_EntityAddLabel_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - Response response = await client.SetLabelsByUniqueAttributeAsync("", body: new string[] { "" }, attribute: ""); + Response response = await client.AddLabelAsync("02c373fe-2823-4be3-97fa-55180a9faa06"); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Entity_AddLabelsByUniqueAttribute_ShortVersion() + public void Example_Entity_RemoveLabelsByUniqueAttribute_EntityRemoveLabelsByUniqueAttribute() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - using RequestContent content = null; - Response response = client.AddLabelsByUniqueAttribute("", content); + using RequestContent content = RequestContent.Create(new object[] + { +"label1" + }); + Response response = client.RemoveLabelsByUniqueAttribute("Asset", content); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_AddLabelsByUniqueAttribute_ShortVersion_Async() + public async Task Example_Entity_RemoveLabelsByUniqueAttribute_EntityRemoveLabelsByUniqueAttribute_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - using RequestContent content = null; - Response response = await client.AddLabelsByUniqueAttributeAsync("", content); + using RequestContent content = RequestContent.Create(new object[] + { +"label1" + }); + Response response = await client.RemoveLabelsByUniqueAttributeAsync("Asset", content); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Entity_AddLabelsByUniqueAttribute_ShortVersion_Convenience() + public void Example_Entity_RemoveLabelsByUniqueAttribute_EntityRemoveLabelsByUniqueAttribute_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - Response response = client.AddLabelsByUniqueAttribute(""); + Response response = client.RemoveLabelsByUniqueAttribute("Asset"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_AddLabelsByUniqueAttribute_ShortVersion_Convenience_Async() + public async Task Example_Entity_RemoveLabelsByUniqueAttribute_EntityRemoveLabelsByUniqueAttribute_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - Response response = await client.AddLabelsByUniqueAttributeAsync(""); + Response response = await client.RemoveLabelsByUniqueAttributeAsync("Asset"); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Entity_AddLabelsByUniqueAttribute_AllParameters() + public void Example_Entity_SetLabelsByUniqueAttribute_EntitySetLabelsByUniqueAttribute() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); using RequestContent content = RequestContent.Create(new object[] { -"" +"label1", +"label2" }); - Response response = client.AddLabelsByUniqueAttribute("", content, attribute: ""); + Response response = client.SetLabelsByUniqueAttribute("Asset", content); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_AddLabelsByUniqueAttribute_AllParameters_Async() + public async Task Example_Entity_SetLabelsByUniqueAttribute_EntitySetLabelsByUniqueAttribute_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); using RequestContent content = RequestContent.Create(new object[] { -"" +"label1", +"label2" }); - Response response = await client.AddLabelsByUniqueAttributeAsync("", content, attribute: ""); + Response response = await client.SetLabelsByUniqueAttributeAsync("Asset", content); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Entity_AddLabelsByUniqueAttribute_AllParameters_Convenience() + public void Example_Entity_SetLabelsByUniqueAttribute_EntitySetLabelsByUniqueAttribute_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - Response response = client.AddLabelsByUniqueAttribute("", body: new string[] { "" }, attribute: ""); + Response response = client.SetLabelsByUniqueAttribute("Asset"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_AddLabelsByUniqueAttribute_AllParameters_Convenience_Async() + public async Task Example_Entity_SetLabelsByUniqueAttribute_EntitySetLabelsByUniqueAttribute_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - Response response = await client.AddLabelsByUniqueAttributeAsync("", body: new string[] { "" }, attribute: ""); + Response response = await client.SetLabelsByUniqueAttributeAsync("Asset"); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Entity_MoveEntitiesToCollection_ShortVersion() + public void Example_Entity_AddLabelsByUniqueAttribute_EntityAddLabelsByUniqueAttribute() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - using RequestContent content = RequestContent.Create(new object()); - Response response = client.MoveEntitiesToCollection("", content); + using RequestContent content = RequestContent.Create(new object[] + { +"label3" + }); + Response response = client.AddLabelsByUniqueAttribute("Asset", content); - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_MoveEntitiesToCollection_ShortVersion_Async() + public async Task Example_Entity_AddLabelsByUniqueAttribute_EntityAddLabelsByUniqueAttribute_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - using RequestContent content = RequestContent.Create(new object()); - Response response = await client.MoveEntitiesToCollectionAsync("", content); + using RequestContent content = RequestContent.Create(new object[] + { +"label3" + }); + Response response = await client.AddLabelsByUniqueAttributeAsync("Asset", content); - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Entity_MoveEntitiesToCollection_ShortVersion_Convenience() + public void Example_Entity_AddLabelsByUniqueAttribute_EntityAddLabelsByUniqueAttribute_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - MoveEntitiesConfig body = new MoveEntitiesConfig(); - Response response = client.MoveEntitiesToCollection("", body); + Response response = client.AddLabelsByUniqueAttribute("Asset"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_MoveEntitiesToCollection_ShortVersion_Convenience_Async() + public async Task Example_Entity_AddLabelsByUniqueAttribute_EntityAddLabelsByUniqueAttribute_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); - Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - MoveEntitiesConfig body = new MoveEntitiesConfig(); - Response response = await client.MoveEntitiesToCollectionAsync("", body); + Response response = await client.AddLabelsByUniqueAttributeAsync("Asset"); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Entity_MoveEntitiesToCollection_AllParameters() + public void Example_Entity_MoveEntitiesToCollection_EntityMoveEntitiesToCollection() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); @@ -6866,76 +3193,21 @@ public void Example_Entity_MoveEntitiesToCollection_AllParameters() { entityGuids = new object[] { -"" +"321493e3-3fb7-4b3e-9df7-3b69154174c2", +"b2f9c306-cf65-4bb0-878e-cfaafde156b1" }, }); - Response response = client.MoveEntitiesToCollection("", content); + Response response = client.MoveEntitiesToCollection("ExampleNewCollection", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meaningNames")[0].ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_MoveEntitiesToCollection_AllParameters_Async() - { - Uri endpoint = new Uri(""); + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_MoveEntitiesToCollection_EntityMoveEntitiesToCollection_Async() + { + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); @@ -6943,99 +3215,44 @@ public async Task Example_Entity_MoveEntitiesToCollection_AllParameters_Async() { entityGuids = new object[] { -"" +"321493e3-3fb7-4b3e-9df7-3b69154174c2", +"b2f9c306-cf65-4bb0-878e-cfaafde156b1" }, }); - Response response = await client.MoveEntitiesToCollectionAsync("", content); + Response response = await client.MoveEntitiesToCollectionAsync("ExampleNewCollection", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meaningNames")[0].ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Entity_MoveEntitiesToCollection_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_MoveEntitiesToCollection_EntityMoveEntitiesToCollection_Convenience() + { + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); MoveEntitiesConfig body = new MoveEntitiesConfig { - EntityGuids = { "" }, + EntityGuids = { "321493e3-3fb7-4b3e-9df7-3b69154174c2", "b2f9c306-cf65-4bb0-878e-cfaafde156b1" }, }; - Response response = client.MoveEntitiesToCollection("", body); + Response response = client.MoveEntitiesToCollection("ExampleNewCollection", body); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_MoveEntitiesToCollection_AllParameters_Convenience_Async() + public async Task Example_Entity_MoveEntitiesToCollection_EntityMoveEntitiesToCollection_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); MoveEntitiesConfig body = new MoveEntitiesConfig { - EntityGuids = { "" }, + EntityGuids = { "321493e3-3fb7-4b3e-9df7-3b69154174c2", "b2f9c306-cf65-4bb0-878e-cfaafde156b1" }, }; - Response response = await client.MoveEntitiesToCollectionAsync("", body); + Response response = await client.MoveEntitiesToCollectionAsync("ExampleNewCollection", body); } } } diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/tests/Generated/Samples/Samples_Glossary.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/tests/Generated/Samples/Samples_Glossary.cs index 948999d47e96..865300ee2a1a 100644 --- a/sdk/purview/Azure.Analytics.Purview.DataMap/tests/Generated/Samples/Samples_Glossary.cs +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/tests/Generated/Samples/Samples_Glossary.cs @@ -19,13 +19,13 @@ public partial class Samples_Glossary { [Test] [Ignore("Only validating compilation of examples")] - public void Example_Glossary_BatchGet_ShortVersion() + public void Example_Glossary_BatchGet_GlossaryList() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - Response response = client.BatchGet(null, null, null, null, null); + Response response = client.BatchGet(null, null, "ASC", null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].ToString()); @@ -33,13 +33,13 @@ public void Example_Glossary_BatchGet_ShortVersion() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_BatchGet_ShortVersion_Async() + public async Task Example_Glossary_BatchGet_GlossaryList_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - Response response = await client.BatchGetAsync(null, null, null, null, null); + Response response = await client.BatchGetAsync(null, null, "ASC", null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].ToString()); @@ -47,9 +47,9 @@ public async Task Example_Glossary_BatchGet_ShortVersion_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Glossary_BatchGet_ShortVersion_Convenience() + public void Example_Glossary_BatchGet_GlossaryList_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); @@ -58,9 +58,9 @@ public void Example_Glossary_BatchGet_ShortVersion_Convenience() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_BatchGet_ShortVersion_Convenience_Async() + public async Task Example_Glossary_BatchGet_GlossaryList_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); @@ -69,7203 +69,1196 @@ public async Task Example_Glossary_BatchGet_ShortVersion_Convenience_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Glossary_BatchGet_AllParameters() + public void Example_Glossary_Create_GlossaryCreate() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - Response response = client.BatchGet(1234, 1234, "", true, null); + using RequestContent content = RequestContent.Create(new + { + name = "Glossary", + shortDescription = "Example Short Description", + longDescription = "Example Long Description", + language = "en", + usage = "Example Glossary", + }); + Response response = client.Create(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result[0].GetProperty("guid").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result[0].GetProperty("longDescription").ToString()); - Console.WriteLine(result[0].GetProperty("name").ToString()); - Console.WriteLine(result[0].GetProperty("qualifiedName").ToString()); - Console.WriteLine(result[0].GetProperty("shortDescription").ToString()); - Console.WriteLine(result[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result[0].GetProperty("createTime").ToString()); - Console.WriteLine(result[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result[0].GetProperty("updateTime").ToString()); - Console.WriteLine(result[0].GetProperty("updatedBy").ToString()); - Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); - Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("parentCategoryGuid").ToString()); - Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("language").ToString()); - Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result[0].GetProperty("usage").ToString()); + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_BatchGet_AllParameters_Async() + public async Task Example_Glossary_Create_GlossaryCreate_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - Response response = await client.BatchGetAsync(1234, 1234, "", true, null); + using RequestContent content = RequestContent.Create(new + { + name = "Glossary", + shortDescription = "Example Short Description", + longDescription = "Example Long Description", + language = "en", + usage = "Example Glossary", + }); + Response response = await client.CreateAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result[0].GetProperty("guid").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result[0].GetProperty("longDescription").ToString()); - Console.WriteLine(result[0].GetProperty("name").ToString()); - Console.WriteLine(result[0].GetProperty("qualifiedName").ToString()); - Console.WriteLine(result[0].GetProperty("shortDescription").ToString()); - Console.WriteLine(result[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result[0].GetProperty("createTime").ToString()); - Console.WriteLine(result[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result[0].GetProperty("updateTime").ToString()); - Console.WriteLine(result[0].GetProperty("updatedBy").ToString()); - Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); - Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("parentCategoryGuid").ToString()); - Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("language").ToString()); - Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result[0].GetProperty("usage").ToString()); + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Glossary_BatchGet_AllParameters_Convenience() + public void Example_Glossary_Create_GlossaryCreate_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - Response> response = client.BatchGet(limit: 1234, offset: 1234, sort: "", ignoreTermsAndCategories: true); + AtlasGlossary body = new AtlasGlossary + { + LongDescription = "Example Long Description", + Name = "Glossary", + ShortDescription = "Example Short Description", + Language = "en", + Usage = "Example Glossary", + }; + Response response = client.Create(body); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_BatchGet_AllParameters_Convenience_Async() + public async Task Example_Glossary_Create_GlossaryCreate_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - Response> response = await client.BatchGetAsync(limit: 1234, offset: 1234, sort: "", ignoreTermsAndCategories: true); + AtlasGlossary body = new AtlasGlossary + { + LongDescription = "Example Long Description", + Name = "Glossary", + ShortDescription = "Example Short Description", + Language = "en", + Usage = "Example Glossary", + }; + Response response = await client.CreateAsync(body); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Glossary_Create_ShortVersion() + public void Example_Glossary_CreateCategories_GlossaryCreateCategories() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - using RequestContent content = RequestContent.Create(new object()); - Response response = client.Create(content); + using RequestContent content = RequestContent.Create(new object[] + { +new +{ +name = "ExampleCategory2", +anchor = new +{ +glossaryGuid = "c018ddaf-7c21-4b37-a838-dae5f110c3d8", +}, +}, +new +{ +name = "ExampleCategory3", +anchor = new +{ +glossaryGuid = "c018ddaf-7c21-4b37-a838-dae5f110c3d8", +}, +} + }); + Response response = client.CreateCategories(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_Create_ShortVersion_Async() + public async Task Example_Glossary_CreateCategories_GlossaryCreateCategories_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - using RequestContent content = RequestContent.Create(new object()); - Response response = await client.CreateAsync(content); + using RequestContent content = RequestContent.Create(new object[] + { +new +{ +name = "ExampleCategory2", +anchor = new +{ +glossaryGuid = "c018ddaf-7c21-4b37-a838-dae5f110c3d8", +}, +}, +new +{ +name = "ExampleCategory3", +anchor = new +{ +glossaryGuid = "c018ddaf-7c21-4b37-a838-dae5f110c3d8", +}, +} + }); + Response response = await client.CreateCategoriesAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Glossary_Create_ShortVersion_Convenience() + public void Example_Glossary_CreateCategories_GlossaryCreateCategories_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - AtlasGlossary body = new AtlasGlossary(); - Response response = client.Create(body); + Response> response = client.CreateCategories(new AtlasGlossaryCategory[] + { +new AtlasGlossaryCategory +{ +Name = "ExampleCategory2", +Anchor = new AtlasGlossaryHeader +{ +GlossaryGuid = "c018ddaf-7c21-4b37-a838-dae5f110c3d8", +}, +}, +new AtlasGlossaryCategory +{ +Name = "ExampleCategory3", +Anchor = new AtlasGlossaryHeader +{ +GlossaryGuid = "c018ddaf-7c21-4b37-a838-dae5f110c3d8", +}, +} + }); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_Create_ShortVersion_Convenience_Async() + public async Task Example_Glossary_CreateCategories_GlossaryCreateCategories_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - AtlasGlossary body = new AtlasGlossary(); - Response response = await client.CreateAsync(body); + Response> response = await client.CreateCategoriesAsync(new AtlasGlossaryCategory[] + { +new AtlasGlossaryCategory +{ +Name = "ExampleCategory2", +Anchor = new AtlasGlossaryHeader +{ +GlossaryGuid = "c018ddaf-7c21-4b37-a838-dae5f110c3d8", +}, +}, +new AtlasGlossaryCategory +{ +Name = "ExampleCategory3", +Anchor = new AtlasGlossaryHeader +{ +GlossaryGuid = "c018ddaf-7c21-4b37-a838-dae5f110c3d8", +}, +} + }); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Glossary_Create_AllParameters() + public void Example_Glossary_CreateCategory_GlossaryCreateCategory() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); using RequestContent content = RequestContent.Create(new { - guid = "", - classifications = new object[] - { -new -{ -attributes = new -{ -key = new object(), -}, -typeName = "", -lastModifiedTS = "", -entityGuid = "", -entityStatus = "ACTIVE", -removePropagationsOnEntityDelete = true, -validityPeriods = new object[] -{ -new -{ -endTime = "", -startTime = "", -timeZone = "", -} -}, -} - }, - longDescription = "", - name = "", - qualifiedName = "", - shortDescription = "", - lastModifiedTS = "", - createTime = 1234L, - createdBy = "", - updateTime = 1234L, - updatedBy = "", - categories = new object[] - { -new -{ -categoryGuid = "", -description = "", -displayText = "", -parentCategoryGuid = "", -relationGuid = "", -} - }, - language = "", + anchor = new + { + glossaryGuid = "c018ddaf-7c21-4b37-a838-dae5f110c3d8", + }, + name = "ExampleCategory1", terms = new object[] { new { -description = "", -displayText = "", -expression = "", -relationGuid = "", -status = "DRAFT", -steward = "", -termGuid = "", +termGuid = "54688d39-b298-4104-9e80-f2a16f44aaea", } }, - usage = "", }); - Response response = client.Create(content); + Response response = client.CreateCategory(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("longDescription").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("qualifiedName").ToString()); - Console.WriteLine(result.GetProperty("shortDescription").ToString()); - Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("createTime").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("updateTime").ToString()); - Console.WriteLine(result.GetProperty("updatedBy").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("parentCategoryGuid").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("language").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("usage").ToString()); + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_Create_AllParameters_Async() + public async Task Example_Glossary_CreateCategory_GlossaryCreateCategory_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); using RequestContent content = RequestContent.Create(new { - guid = "", - classifications = new object[] - { -new -{ -attributes = new -{ -key = new object(), -}, -typeName = "", -lastModifiedTS = "", -entityGuid = "", -entityStatus = "ACTIVE", -removePropagationsOnEntityDelete = true, -validityPeriods = new object[] -{ -new -{ -endTime = "", -startTime = "", -timeZone = "", -} -}, -} - }, - longDescription = "", - name = "", - qualifiedName = "", - shortDescription = "", - lastModifiedTS = "", - createTime = 1234L, - createdBy = "", - updateTime = 1234L, - updatedBy = "", - categories = new object[] - { -new -{ -categoryGuid = "", -description = "", -displayText = "", -parentCategoryGuid = "", -relationGuid = "", -} - }, - language = "", + anchor = new + { + glossaryGuid = "c018ddaf-7c21-4b37-a838-dae5f110c3d8", + }, + name = "ExampleCategory1", terms = new object[] { new { -description = "", -displayText = "", -expression = "", -relationGuid = "", -status = "DRAFT", -steward = "", -termGuid = "", +termGuid = "54688d39-b298-4104-9e80-f2a16f44aaea", } }, - usage = "", }); - Response response = await client.CreateAsync(content); + Response response = await client.CreateCategoryAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("longDescription").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("qualifiedName").ToString()); - Console.WriteLine(result.GetProperty("shortDescription").ToString()); - Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("createTime").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("updateTime").ToString()); - Console.WriteLine(result.GetProperty("updatedBy").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("parentCategoryGuid").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("language").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("usage").ToString()); + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Glossary_Create_AllParameters_Convenience() + public void Example_Glossary_CreateCategory_GlossaryCreateCategory_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - AtlasGlossary body = new AtlasGlossary + AtlasGlossaryCategory body = new AtlasGlossaryCategory { - Guid = "", - Classifications = {new AtlasClassification -{ -Attributes = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -}, -TypeName = "", -LastModifiedTS = "", -EntityGuid = "", -EntityStatus = EntityStatus.Active, -RemovePropagationsOnEntityDelete = true, -ValidityPeriods = {new TimeBoundary -{ -EndTime = "", -StartTime = "", -TimeZone = "", -}}, -}}, - LongDescription = "", - Name = "", - QualifiedName = "", - ShortDescription = "", - LastModifiedTS = "", - CreateTime = 1234L, - CreatedBy = "", - UpdateTime = 1234L, - UpdatedBy = "", - Categories = {new AtlasRelatedCategoryHeader -{ -CategoryGuid = "", -Description = "", -DisplayText = "", -ParentCategoryGuid = "", -RelationGuid = "", -}}, - Language = "", + Name = "ExampleCategory1", + Anchor = new AtlasGlossaryHeader + { + GlossaryGuid = "c018ddaf-7c21-4b37-a838-dae5f110c3d8", + }, Terms = {new AtlasRelatedTermHeader { -Description = "", -DisplayText = "", -Expression = "", -RelationGuid = "", -Status = AtlasTermRelationshipStatus.Draft, -Steward = "", -TermGuid = "", +TermGuid = "54688d39-b298-4104-9e80-f2a16f44aaea", }}, - Usage = "", }; - Response response = client.Create(body); + Response response = client.CreateCategory(body); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_Create_AllParameters_Convenience_Async() + public async Task Example_Glossary_CreateCategory_GlossaryCreateCategory_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - AtlasGlossary body = new AtlasGlossary + AtlasGlossaryCategory body = new AtlasGlossaryCategory { - Guid = "", - Classifications = {new AtlasClassification -{ -Attributes = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -}, -TypeName = "", -LastModifiedTS = "", -EntityGuid = "", -EntityStatus = EntityStatus.Active, -RemovePropagationsOnEntityDelete = true, -ValidityPeriods = {new TimeBoundary -{ -EndTime = "", -StartTime = "", -TimeZone = "", -}}, -}}, - LongDescription = "", - Name = "", - QualifiedName = "", - ShortDescription = "", - LastModifiedTS = "", - CreateTime = 1234L, - CreatedBy = "", - UpdateTime = 1234L, - UpdatedBy = "", - Categories = {new AtlasRelatedCategoryHeader -{ -CategoryGuid = "", -Description = "", -DisplayText = "", -ParentCategoryGuid = "", -RelationGuid = "", -}}, - Language = "", + Name = "ExampleCategory1", + Anchor = new AtlasGlossaryHeader + { + GlossaryGuid = "c018ddaf-7c21-4b37-a838-dae5f110c3d8", + }, Terms = {new AtlasRelatedTermHeader { -Description = "", -DisplayText = "", -Expression = "", -RelationGuid = "", -Status = AtlasTermRelationshipStatus.Draft, -Steward = "", -TermGuid = "", +TermGuid = "54688d39-b298-4104-9e80-f2a16f44aaea", }}, - Usage = "", }; - Response response = await client.CreateAsync(body); + Response response = await client.CreateCategoryAsync(body); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Glossary_CreateCategories_ShortVersion() + public void Example_Glossary_GetCategory_GlossaryGetCategory() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - using RequestContent content = RequestContent.Create(new object[] - { -new object() - }); - Response response = client.CreateCategories(content); + Response response = client.GetCategory("ed7458f0-9463-48a5-b5c6-4f785fb34e12", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_CreateCategories_ShortVersion_Async() + public async Task Example_Glossary_GetCategory_GlossaryGetCategory_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - using RequestContent content = RequestContent.Create(new object[] - { -new object() - }); - Response response = await client.CreateCategoriesAsync(content); + Response response = await client.GetCategoryAsync("ed7458f0-9463-48a5-b5c6-4f785fb34e12", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Glossary_CreateCategories_ShortVersion_Convenience() + public void Example_Glossary_GetCategory_GlossaryGetCategory_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - Response> response = client.CreateCategories(new AtlasGlossaryCategory[] - { -new AtlasGlossaryCategory() - }); + Response response = client.GetCategory("ed7458f0-9463-48a5-b5c6-4f785fb34e12"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_CreateCategories_ShortVersion_Convenience_Async() + public async Task Example_Glossary_GetCategory_GlossaryGetCategory_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - Response> response = await client.CreateCategoriesAsync(new AtlasGlossaryCategory[] - { -new AtlasGlossaryCategory() - }); + Response response = await client.GetCategoryAsync("ed7458f0-9463-48a5-b5c6-4f785fb34e12"); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Glossary_CreateCategories_AllParameters() + public void Example_Glossary_UpdateCategory_GlossaryUpdateCategory() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - using RequestContent content = RequestContent.Create(new object[] + using RequestContent content = RequestContent.Create(new + { + guid = "ed7458f0-9463-48a5-b5c6-4f785fb34e12", + qualifiedName = "ExampleCategory1@Glossary", + name = "ExampleCategory1", + lastModifiedTS = "1", + anchor = new + { + glossaryGuid = "c018ddaf-7c21-4b37-a838-dae5f110c3d8", + relationGuid = "7bdcef93-a57a-4d1d-95ab-9d3036f394a0", + }, + terms = new object[] { new { -guid = "", -classifications = new object[] -{ -new -{ -attributes = new -{ -key = new object(), -}, -typeName = "", -lastModifiedTS = "", -entityGuid = "", -entityStatus = "ACTIVE", -removePropagationsOnEntityDelete = true, -validityPeriods = new object[] -{ -new -{ -endTime = "", -startTime = "", -timeZone = "", -} -}, -} -}, -longDescription = "", -name = "", -qualifiedName = "", -shortDescription = "", -lastModifiedTS = "", -createTime = 1234L, -createdBy = "", -updateTime = 1234L, -updatedBy = "", -anchor = new -{ -displayText = "", -glossaryGuid = "", -relationGuid = "", -}, -childrenCategories = new object[] -{ -new -{ -categoryGuid = "", -description = "", -displayText = "", -parentCategoryGuid = "", -relationGuid = "", +termGuid = "54688d39-b298-4104-9e80-f2a16f44aaea", +relationGuid = "6aebf5ac-0c83-40c0-98bf-958fe9c99007", } -}, -terms = new object[] -{ + }, + childrenCategories = new object[] + { new { -description = "", -displayText = "", -expression = "", -relationGuid = "", -status = "DRAFT", -steward = "", -termGuid = "", -} -}, +categoryGuid = "0d6766f6-f4b6-435b-bda2-d3edc358998e", } + }, + parentCategory = new + { + categoryGuid = "e47c4584-daca-4f9e-9092-194e04692c9a", + }, }); - Response response = client.CreateCategories(content); + Response response = client.UpdateCategory("ed7458f0-9463-48a5-b5c6-4f785fb34e12", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result[0].GetProperty("guid").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result[0].GetProperty("longDescription").ToString()); - Console.WriteLine(result[0].GetProperty("name").ToString()); - Console.WriteLine(result[0].GetProperty("qualifiedName").ToString()); - Console.WriteLine(result[0].GetProperty("shortDescription").ToString()); - Console.WriteLine(result[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result[0].GetProperty("createTime").ToString()); - Console.WriteLine(result[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result[0].GetProperty("updateTime").ToString()); - Console.WriteLine(result[0].GetProperty("updatedBy").ToString()); - Console.WriteLine(result[0].GetProperty("anchor").GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("anchor").GetProperty("glossaryGuid").ToString()); - Console.WriteLine(result[0].GetProperty("anchor").GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("childrenCategories")[0].GetProperty("categoryGuid").ToString()); - Console.WriteLine(result[0].GetProperty("childrenCategories")[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("childrenCategories")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("childrenCategories")[0].GetProperty("parentCategoryGuid").ToString()); - Console.WriteLine(result[0].GetProperty("childrenCategories")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("parentCategory").GetProperty("categoryGuid").ToString()); - Console.WriteLine(result[0].GetProperty("parentCategory").GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("parentCategory").GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("parentCategory").GetProperty("parentCategoryGuid").ToString()); - Console.WriteLine(result[0].GetProperty("parentCategory").GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_CreateCategories_AllParameters_Async() + public async Task Example_Glossary_UpdateCategory_GlossaryUpdateCategory_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - using RequestContent content = RequestContent.Create(new object[] + using RequestContent content = RequestContent.Create(new + { + guid = "ed7458f0-9463-48a5-b5c6-4f785fb34e12", + qualifiedName = "ExampleCategory1@Glossary", + name = "ExampleCategory1", + lastModifiedTS = "1", + anchor = new + { + glossaryGuid = "c018ddaf-7c21-4b37-a838-dae5f110c3d8", + relationGuid = "7bdcef93-a57a-4d1d-95ab-9d3036f394a0", + }, + terms = new object[] { new { -guid = "", -classifications = new object[] -{ -new -{ -attributes = new -{ -key = new object(), -}, -typeName = "", -lastModifiedTS = "", -entityGuid = "", -entityStatus = "ACTIVE", -removePropagationsOnEntityDelete = true, -validityPeriods = new object[] -{ -new -{ -endTime = "", -startTime = "", -timeZone = "", -} -}, +termGuid = "54688d39-b298-4104-9e80-f2a16f44aaea", +relationGuid = "6aebf5ac-0c83-40c0-98bf-958fe9c99007", } -}, -longDescription = "", -name = "", -qualifiedName = "", -shortDescription = "", -lastModifiedTS = "", -createTime = 1234L, -createdBy = "", -updateTime = 1234L, -updatedBy = "", -anchor = new -{ -displayText = "", -glossaryGuid = "", -relationGuid = "", -}, -childrenCategories = new object[] -{ + }, + childrenCategories = new object[] + { new { -categoryGuid = "", -description = "", -displayText = "", -parentCategoryGuid = "", -relationGuid = "", -} -}, -terms = new object[] -{ -new -{ -description = "", -displayText = "", -expression = "", -relationGuid = "", -status = "DRAFT", -steward = "", -termGuid = "", -} -}, +categoryGuid = "0d6766f6-f4b6-435b-bda2-d3edc358998e", } + }, + parentCategory = new + { + categoryGuid = "e47c4584-daca-4f9e-9092-194e04692c9a", + }, }); - Response response = await client.CreateCategoriesAsync(content); + Response response = await client.UpdateCategoryAsync("ed7458f0-9463-48a5-b5c6-4f785fb34e12", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result[0].GetProperty("guid").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result[0].GetProperty("longDescription").ToString()); - Console.WriteLine(result[0].GetProperty("name").ToString()); - Console.WriteLine(result[0].GetProperty("qualifiedName").ToString()); - Console.WriteLine(result[0].GetProperty("shortDescription").ToString()); - Console.WriteLine(result[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result[0].GetProperty("createTime").ToString()); - Console.WriteLine(result[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result[0].GetProperty("updateTime").ToString()); - Console.WriteLine(result[0].GetProperty("updatedBy").ToString()); - Console.WriteLine(result[0].GetProperty("anchor").GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("anchor").GetProperty("glossaryGuid").ToString()); - Console.WriteLine(result[0].GetProperty("anchor").GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("childrenCategories")[0].GetProperty("categoryGuid").ToString()); - Console.WriteLine(result[0].GetProperty("childrenCategories")[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("childrenCategories")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("childrenCategories")[0].GetProperty("parentCategoryGuid").ToString()); - Console.WriteLine(result[0].GetProperty("childrenCategories")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("parentCategory").GetProperty("categoryGuid").ToString()); - Console.WriteLine(result[0].GetProperty("parentCategory").GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("parentCategory").GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("parentCategory").GetProperty("parentCategoryGuid").ToString()); - Console.WriteLine(result[0].GetProperty("parentCategory").GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Glossary_CreateCategories_AllParameters_Convenience() + public void Example_Glossary_UpdateCategory_GlossaryUpdateCategory_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - Response> response = client.CreateCategories(new AtlasGlossaryCategory[] + AtlasGlossaryCategory body = new AtlasGlossaryCategory { -new AtlasGlossaryCategory -{ -Guid = "", -Classifications = {new AtlasClassification -{ -Attributes = + Guid = "ed7458f0-9463-48a5-b5c6-4f785fb34e12", + Name = "ExampleCategory1", + QualifiedName = "ExampleCategory1@Glossary", + LastModifiedTS = "1", + Anchor = new AtlasGlossaryHeader + { + GlossaryGuid = "c018ddaf-7c21-4b37-a838-dae5f110c3d8", + RelationGuid = "7bdcef93-a57a-4d1d-95ab-9d3036f394a0", + }, + ChildrenCategories = {new AtlasRelatedCategoryHeader { -["key"] = BinaryData.FromObjectAsJson(new object()) -}, -TypeName = "", -LastModifiedTS = "", -EntityGuid = "", -EntityStatus = EntityStatus.Active, -RemovePropagationsOnEntityDelete = true, -ValidityPeriods = {new TimeBoundary -{ -EndTime = "", -StartTime = "", -TimeZone = "", -}}, +CategoryGuid = "0d6766f6-f4b6-435b-bda2-d3edc358998e", }}, -LongDescription = "", -Name = "", -QualifiedName = "", -ShortDescription = "", -LastModifiedTS = "", -CreateTime = 1234L, -CreatedBy = "", -UpdateTime = 1234L, -UpdatedBy = "", -Anchor = new AtlasGlossaryHeader -{ -DisplayText = "", -GlossaryGuid = "", -RelationGuid = "", -}, -ChildrenCategories = {new AtlasRelatedCategoryHeader + ParentCategory = new AtlasRelatedCategoryHeader + { + CategoryGuid = "e47c4584-daca-4f9e-9092-194e04692c9a", + }, + Terms = {new AtlasRelatedTermHeader { -CategoryGuid = "", -Description = "", -DisplayText = "", -ParentCategoryGuid = "", -RelationGuid = "", +RelationGuid = "6aebf5ac-0c83-40c0-98bf-958fe9c99007", +TermGuid = "54688d39-b298-4104-9e80-f2a16f44aaea", }}, -ParentCategory = default, -Terms = {new AtlasRelatedTermHeader -{ -Description = "", -DisplayText = "", -Expression = "", -RelationGuid = "", -Status = AtlasTermRelationshipStatus.Draft, -Steward = "", -TermGuid = "", -}}, -} - }); + }; + Response response = client.UpdateCategory("ed7458f0-9463-48a5-b5c6-4f785fb34e12", body); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_CreateCategories_AllParameters_Convenience_Async() + public async Task Example_Glossary_UpdateCategory_GlossaryUpdateCategory_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - Response> response = await client.CreateCategoriesAsync(new AtlasGlossaryCategory[] + AtlasGlossaryCategory body = new AtlasGlossaryCategory { -new AtlasGlossaryCategory -{ -Guid = "", -Classifications = {new AtlasClassification -{ -Attributes = + Guid = "ed7458f0-9463-48a5-b5c6-4f785fb34e12", + Name = "ExampleCategory1", + QualifiedName = "ExampleCategory1@Glossary", + LastModifiedTS = "1", + Anchor = new AtlasGlossaryHeader + { + GlossaryGuid = "c018ddaf-7c21-4b37-a838-dae5f110c3d8", + RelationGuid = "7bdcef93-a57a-4d1d-95ab-9d3036f394a0", + }, + ChildrenCategories = {new AtlasRelatedCategoryHeader { -["key"] = BinaryData.FromObjectAsJson(new object()) -}, -TypeName = "", -LastModifiedTS = "", -EntityGuid = "", -EntityStatus = EntityStatus.Active, -RemovePropagationsOnEntityDelete = true, -ValidityPeriods = {new TimeBoundary -{ -EndTime = "", -StartTime = "", -TimeZone = "", -}}, +CategoryGuid = "0d6766f6-f4b6-435b-bda2-d3edc358998e", }}, -LongDescription = "", -Name = "", -QualifiedName = "", -ShortDescription = "", -LastModifiedTS = "", -CreateTime = 1234L, -CreatedBy = "", -UpdateTime = 1234L, -UpdatedBy = "", -Anchor = new AtlasGlossaryHeader -{ -DisplayText = "", -GlossaryGuid = "", -RelationGuid = "", -}, -ChildrenCategories = {new AtlasRelatedCategoryHeader + ParentCategory = new AtlasRelatedCategoryHeader + { + CategoryGuid = "e47c4584-daca-4f9e-9092-194e04692c9a", + }, + Terms = {new AtlasRelatedTermHeader { -CategoryGuid = "", -Description = "", -DisplayText = "", -ParentCategoryGuid = "", -RelationGuid = "", +RelationGuid = "6aebf5ac-0c83-40c0-98bf-958fe9c99007", +TermGuid = "54688d39-b298-4104-9e80-f2a16f44aaea", }}, -ParentCategory = default, -Terms = {new AtlasRelatedTermHeader -{ -Description = "", -DisplayText = "", -Expression = "", -RelationGuid = "", -Status = AtlasTermRelationshipStatus.Draft, -Steward = "", -TermGuid = "", -}}, -} - }); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Glossary_CreateCategory_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - using RequestContent content = RequestContent.Create(new object()); - Response response = client.CreateCategory(content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); + }; + Response response = await client.UpdateCategoryAsync("ed7458f0-9463-48a5-b5c6-4f785fb34e12", body); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_CreateCategory_ShortVersion_Async() + public void Example_Glossary_DeleteCategory_GlossaryDeleteCategory() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - using RequestContent content = RequestContent.Create(new object()); - Response response = await client.CreateCategoryAsync(content); + Response response = client.DeleteCategory("0e391355-252a-e5f3-ac18-5a3602df7616"); - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Glossary_CreateCategory_ShortVersion_Convenience() + public async Task Example_Glossary_DeleteCategory_GlossaryDeleteCategory_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - AtlasGlossaryCategory body = new AtlasGlossaryCategory(); - Response response = client.CreateCategory(body); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_CreateCategory_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + Response response = await client.DeleteCategoryAsync("0e391355-252a-e5f3-ac18-5a3602df7616"); - AtlasGlossaryCategory body = new AtlasGlossaryCategory(); - Response response = await client.CreateCategoryAsync(body); + Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Glossary_CreateCategory_AllParameters() + public void Example_Glossary_PartialUpdateCategory_GlossaryPartialUpdateCategory() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); using RequestContent content = RequestContent.Create(new { - guid = "", - classifications = new object[] - { -new -{ -attributes = new -{ -key = new object(), -}, -typeName = "", -lastModifiedTS = "", -entityGuid = "", -entityStatus = "ACTIVE", -removePropagationsOnEntityDelete = true, -validityPeriods = new object[] -{ -new -{ -endTime = "", -startTime = "", -timeZone = "", -} -}, -} - }, - longDescription = "", - name = "", - qualifiedName = "", - shortDescription = "", - lastModifiedTS = "", - createTime = 1234L, - createdBy = "", - updateTime = 1234L, - updatedBy = "", - anchor = new - { - displayText = "", - glossaryGuid = "", - relationGuid = "", - }, - childrenCategories = new object[] - { -new -{ -categoryGuid = "", -description = "", -displayText = "", -parentCategoryGuid = "", -relationGuid = "", -} - }, - terms = new object[] - { -new -{ -description = "", -displayText = "", -expression = "", -relationGuid = "", -status = "DRAFT", -steward = "", -termGuid = "", -} - }, + longDescription = "Example Long Description", }); - Response response = client.CreateCategory(content); + Response response = client.PartialUpdateCategory("3243ea0a-9492-47e1-392e-a84e64980af9", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("longDescription").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("qualifiedName").ToString()); - Console.WriteLine(result.GetProperty("shortDescription").ToString()); - Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("createTime").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("updateTime").ToString()); - Console.WriteLine(result.GetProperty("updatedBy").ToString()); - Console.WriteLine(result.GetProperty("anchor").GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("anchor").GetProperty("glossaryGuid").ToString()); - Console.WriteLine(result.GetProperty("anchor").GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("categoryGuid").ToString()); - Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("parentCategoryGuid").ToString()); - Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("parentCategory").GetProperty("categoryGuid").ToString()); - Console.WriteLine(result.GetProperty("parentCategory").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("parentCategory").GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("parentCategory").GetProperty("parentCategoryGuid").ToString()); - Console.WriteLine(result.GetProperty("parentCategory").GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_CreateCategory_AllParameters_Async() + public async Task Example_Glossary_PartialUpdateCategory_GlossaryPartialUpdateCategory_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); using RequestContent content = RequestContent.Create(new { - guid = "", - classifications = new object[] - { -new -{ -attributes = new -{ -key = new object(), -}, -typeName = "", -lastModifiedTS = "", -entityGuid = "", -entityStatus = "ACTIVE", -removePropagationsOnEntityDelete = true, -validityPeriods = new object[] -{ -new -{ -endTime = "", -startTime = "", -timeZone = "", -} -}, -} - }, - longDescription = "", - name = "", - qualifiedName = "", - shortDescription = "", - lastModifiedTS = "", - createTime = 1234L, - createdBy = "", - updateTime = 1234L, - updatedBy = "", - anchor = new - { - displayText = "", - glossaryGuid = "", - relationGuid = "", - }, - childrenCategories = new object[] - { -new -{ -categoryGuid = "", -description = "", -displayText = "", -parentCategoryGuid = "", -relationGuid = "", -} - }, - terms = new object[] - { -new -{ -description = "", -displayText = "", -expression = "", -relationGuid = "", -status = "DRAFT", -steward = "", -termGuid = "", -} - }, + longDescription = "Example Long Description", }); - Response response = await client.CreateCategoryAsync(content); + Response response = await client.PartialUpdateCategoryAsync("3243ea0a-9492-47e1-392e-a84e64980af9", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("longDescription").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("qualifiedName").ToString()); - Console.WriteLine(result.GetProperty("shortDescription").ToString()); - Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("createTime").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("updateTime").ToString()); - Console.WriteLine(result.GetProperty("updatedBy").ToString()); - Console.WriteLine(result.GetProperty("anchor").GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("anchor").GetProperty("glossaryGuid").ToString()); - Console.WriteLine(result.GetProperty("anchor").GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("categoryGuid").ToString()); - Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("parentCategoryGuid").ToString()); - Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("parentCategory").GetProperty("categoryGuid").ToString()); - Console.WriteLine(result.GetProperty("parentCategory").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("parentCategory").GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("parentCategory").GetProperty("parentCategoryGuid").ToString()); - Console.WriteLine(result.GetProperty("parentCategory").GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Glossary_CreateCategory_AllParameters_Convenience() + public void Example_Glossary_PartialUpdateCategory_GlossaryPartialUpdateCategory_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - AtlasGlossaryCategory body = new AtlasGlossaryCategory + Response response = client.PartialUpdateCategory("3243ea0a-9492-47e1-392e-a84e64980af9", new Dictionary { - Guid = "", - Classifications = {new AtlasClassification -{ -Attributes = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -}, -TypeName = "", -LastModifiedTS = "", -EntityGuid = "", -EntityStatus = EntityStatus.Active, -RemovePropagationsOnEntityDelete = true, -ValidityPeriods = {new TimeBoundary -{ -EndTime = "", -StartTime = "", -TimeZone = "", -}}, -}}, - LongDescription = "", - Name = "", - QualifiedName = "", - ShortDescription = "", - LastModifiedTS = "", - CreateTime = 1234L, - CreatedBy = "", - UpdateTime = 1234L, - UpdatedBy = "", - Anchor = new AtlasGlossaryHeader - { - DisplayText = "", - GlossaryGuid = "", - RelationGuid = "", - }, - ChildrenCategories = {new AtlasRelatedCategoryHeader -{ -CategoryGuid = "", -Description = "", -DisplayText = "", -ParentCategoryGuid = "", -RelationGuid = "", -}}, - ParentCategory = default, - Terms = {new AtlasRelatedTermHeader -{ -Description = "", -DisplayText = "", -Expression = "", -RelationGuid = "", -Status = AtlasTermRelationshipStatus.Draft, -Steward = "", -TermGuid = "", -}}, - }; - Response response = client.CreateCategory(body); + ["longDescription"] = "Example Long Description" + }); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_CreateCategory_AllParameters_Convenience_Async() + public async Task Example_Glossary_PartialUpdateCategory_GlossaryPartialUpdateCategory_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - AtlasGlossaryCategory body = new AtlasGlossaryCategory + Response response = await client.PartialUpdateCategoryAsync("3243ea0a-9492-47e1-392e-a84e64980af9", new Dictionary { - Guid = "", - Classifications = {new AtlasClassification -{ -Attributes = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -}, -TypeName = "", -LastModifiedTS = "", -EntityGuid = "", -EntityStatus = EntityStatus.Active, -RemovePropagationsOnEntityDelete = true, -ValidityPeriods = {new TimeBoundary -{ -EndTime = "", -StartTime = "", -TimeZone = "", -}}, -}}, - LongDescription = "", - Name = "", - QualifiedName = "", - ShortDescription = "", - LastModifiedTS = "", - CreateTime = 1234L, - CreatedBy = "", - UpdateTime = 1234L, - UpdatedBy = "", - Anchor = new AtlasGlossaryHeader - { - DisplayText = "", - GlossaryGuid = "", - RelationGuid = "", - }, - ChildrenCategories = {new AtlasRelatedCategoryHeader -{ -CategoryGuid = "", -Description = "", -DisplayText = "", -ParentCategoryGuid = "", -RelationGuid = "", -}}, - ParentCategory = default, - Terms = {new AtlasRelatedTermHeader -{ -Description = "", -DisplayText = "", -Expression = "", -RelationGuid = "", -Status = AtlasTermRelationshipStatus.Draft, -Steward = "", -TermGuid = "", -}}, - }; - Response response = await client.CreateCategoryAsync(body); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Glossary_GetCategory_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - Response response = client.GetCategory("", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_GetCategory_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - Response response = await client.GetCategoryAsync("", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Glossary_GetCategory_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - Response response = client.GetCategory(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_GetCategory_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - Response response = await client.GetCategoryAsync(""); + ["longDescription"] = "Example Long Description" + }); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Glossary_GetCategory_AllParameters() + public void Example_Glossary_GetRelatedCategories_GlossaryListRelatedCategories() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - Response response = client.GetCategory("", null); + Response response = client.GetRelatedCategories("ed7458f0-9463-48a5-b5c6-4f785fb34e12", null, null, "ASC", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("longDescription").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("qualifiedName").ToString()); - Console.WriteLine(result.GetProperty("shortDescription").ToString()); - Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("createTime").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("updateTime").ToString()); - Console.WriteLine(result.GetProperty("updatedBy").ToString()); - Console.WriteLine(result.GetProperty("anchor").GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("anchor").GetProperty("glossaryGuid").ToString()); - Console.WriteLine(result.GetProperty("anchor").GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("categoryGuid").ToString()); - Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("parentCategoryGuid").ToString()); - Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("parentCategory").GetProperty("categoryGuid").ToString()); - Console.WriteLine(result.GetProperty("parentCategory").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("parentCategory").GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("parentCategory").GetProperty("parentCategoryGuid").ToString()); - Console.WriteLine(result.GetProperty("parentCategory").GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("")[0].ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_GetCategory_AllParameters_Async() + public async Task Example_Glossary_GetRelatedCategories_GlossaryListRelatedCategories_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - Response response = await client.GetCategoryAsync("", null); + Response response = await client.GetRelatedCategoriesAsync("ed7458f0-9463-48a5-b5c6-4f785fb34e12", null, null, "ASC", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("longDescription").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("qualifiedName").ToString()); - Console.WriteLine(result.GetProperty("shortDescription").ToString()); - Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("createTime").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("updateTime").ToString()); - Console.WriteLine(result.GetProperty("updatedBy").ToString()); - Console.WriteLine(result.GetProperty("anchor").GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("anchor").GetProperty("glossaryGuid").ToString()); - Console.WriteLine(result.GetProperty("anchor").GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("categoryGuid").ToString()); - Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("parentCategoryGuid").ToString()); - Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("parentCategory").GetProperty("categoryGuid").ToString()); - Console.WriteLine(result.GetProperty("parentCategory").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("parentCategory").GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("parentCategory").GetProperty("parentCategoryGuid").ToString()); - Console.WriteLine(result.GetProperty("parentCategory").GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("")[0].ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Glossary_GetCategory_AllParameters_Convenience() + public void Example_Glossary_GetRelatedCategories_GlossaryListRelatedCategories_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - Response response = client.GetCategory(""); + Response>> response = client.GetRelatedCategories("ed7458f0-9463-48a5-b5c6-4f785fb34e12"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_GetCategory_AllParameters_Convenience_Async() + public async Task Example_Glossary_GetRelatedCategories_GlossaryListRelatedCategories_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - Response response = await client.GetCategoryAsync(""); + Response>> response = await client.GetRelatedCategoriesAsync("ed7458f0-9463-48a5-b5c6-4f785fb34e12"); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Glossary_UpdateCategory_ShortVersion() + public void Example_Glossary_GetCategoryTerms_GlossaryListCategoryTerms() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - using RequestContent content = RequestContent.Create(new object()); - Response response = client.UpdateCategory("", content); + Response response = client.GetCategoryTerms("ed7458f0-9463-48a5-b5c6-4f785fb34e12", null, null, "ASC", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_UpdateCategory_ShortVersion_Async() + public async Task Example_Glossary_GetCategoryTerms_GlossaryListCategoryTerms_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - using RequestContent content = RequestContent.Create(new object()); - Response response = await client.UpdateCategoryAsync("", content); + Response response = await client.GetCategoryTermsAsync("ed7458f0-9463-48a5-b5c6-4f785fb34e12", null, null, "ASC", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Glossary_UpdateCategory_ShortVersion_Convenience() + public void Example_Glossary_GetCategoryTerms_GlossaryListCategoryTerms_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - AtlasGlossaryCategory body = new AtlasGlossaryCategory(); - Response response = client.UpdateCategory("", body); + Response> response = client.GetCategoryTerms("ed7458f0-9463-48a5-b5c6-4f785fb34e12"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_UpdateCategory_ShortVersion_Convenience_Async() + public async Task Example_Glossary_GetCategoryTerms_GlossaryListCategoryTerms_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - AtlasGlossaryCategory body = new AtlasGlossaryCategory(); - Response response = await client.UpdateCategoryAsync("", body); + Response> response = await client.GetCategoryTermsAsync("ed7458f0-9463-48a5-b5c6-4f785fb34e12"); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Glossary_UpdateCategory_AllParameters() + public void Example_Glossary_CreateTerm_GlossaryCreateTerm() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); using RequestContent content = RequestContent.Create(new { - guid = "", - classifications = new object[] + name = "ExampleTerm1", + shortDescription = "Example Short Description", + longDescription = "Example Long Description", + abbreviation = "T1", + status = "Approved", + anchor = new + { + glossaryGuid = "c018ddaf-7c21-4b37-a838-dae5f110c3d8", + }, + resources = new object[] { new { -attributes = new -{ -key = new object(), -}, -typeName = "", -lastModifiedTS = "", -entityGuid = "", -entityStatus = "ACTIVE", -removePropagationsOnEntityDelete = true, -validityPeriods = new object[] -{ -new -{ -endTime = "", -startTime = "", -timeZone = "", -} -}, +displayName = "Example Display Name", +url = "Example Url", } }, - longDescription = "", - name = "", - qualifiedName = "", - shortDescription = "", - lastModifiedTS = "", - createTime = 1234L, - createdBy = "", - updateTime = 1234L, - updatedBy = "", - anchor = new + contacts = new { - displayText = "", - glossaryGuid = "", - relationGuid = "", - }, - childrenCategories = new object[] + Expert = new object[] { new { -categoryGuid = "", -description = "", -displayText = "", -parentCategoryGuid = "", -relationGuid = "", +id = "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", +info = "Example Expert Info", } }, - terms = new object[] + Steward = new object[] { new { -description = "", -displayText = "", -expression = "", -relationGuid = "", -status = "DRAFT", -steward = "", -termGuid = "", +id = "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", +info = "Example Steward info", } }, + }, }); - Response response = client.UpdateCategory("", content); + Response response = client.CreateTerm(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("longDescription").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("qualifiedName").ToString()); - Console.WriteLine(result.GetProperty("shortDescription").ToString()); - Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("createTime").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("updateTime").ToString()); - Console.WriteLine(result.GetProperty("updatedBy").ToString()); - Console.WriteLine(result.GetProperty("anchor").GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("anchor").GetProperty("glossaryGuid").ToString()); - Console.WriteLine(result.GetProperty("anchor").GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("categoryGuid").ToString()); - Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("parentCategoryGuid").ToString()); - Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("parentCategory").GetProperty("categoryGuid").ToString()); - Console.WriteLine(result.GetProperty("parentCategory").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("parentCategory").GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("parentCategory").GetProperty("parentCategoryGuid").ToString()); - Console.WriteLine(result.GetProperty("parentCategory").GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_UpdateCategory_AllParameters_Async() + public async Task Example_Glossary_CreateTerm_GlossaryCreateTerm_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); using RequestContent content = RequestContent.Create(new { - guid = "", - classifications = new object[] + name = "ExampleTerm1", + shortDescription = "Example Short Description", + longDescription = "Example Long Description", + abbreviation = "T1", + status = "Approved", + anchor = new + { + glossaryGuid = "c018ddaf-7c21-4b37-a838-dae5f110c3d8", + }, + resources = new object[] { new { -attributes = new -{ -key = new object(), -}, -typeName = "", -lastModifiedTS = "", -entityGuid = "", -entityStatus = "ACTIVE", -removePropagationsOnEntityDelete = true, -validityPeriods = new object[] -{ -new -{ -endTime = "", -startTime = "", -timeZone = "", -} -}, +displayName = "Example Display Name", +url = "Example Url", } }, - longDescription = "", - name = "", - qualifiedName = "", - shortDescription = "", - lastModifiedTS = "", - createTime = 1234L, - createdBy = "", - updateTime = 1234L, - updatedBy = "", - anchor = new + contacts = new { - displayText = "", - glossaryGuid = "", - relationGuid = "", - }, - childrenCategories = new object[] + Expert = new object[] { new { -categoryGuid = "", -description = "", -displayText = "", -parentCategoryGuid = "", -relationGuid = "", +id = "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", +info = "Example Expert Info", } }, - terms = new object[] + Steward = new object[] { new { -description = "", -displayText = "", -expression = "", -relationGuid = "", -status = "DRAFT", -steward = "", -termGuid = "", +id = "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", +info = "Example Steward info", } }, + }, }); - Response response = await client.UpdateCategoryAsync("", content); + Response response = await client.CreateTermAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("longDescription").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("qualifiedName").ToString()); - Console.WriteLine(result.GetProperty("shortDescription").ToString()); - Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("createTime").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("updateTime").ToString()); - Console.WriteLine(result.GetProperty("updatedBy").ToString()); - Console.WriteLine(result.GetProperty("anchor").GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("anchor").GetProperty("glossaryGuid").ToString()); - Console.WriteLine(result.GetProperty("anchor").GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("categoryGuid").ToString()); - Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("parentCategoryGuid").ToString()); - Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("parentCategory").GetProperty("categoryGuid").ToString()); - Console.WriteLine(result.GetProperty("parentCategory").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("parentCategory").GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("parentCategory").GetProperty("parentCategoryGuid").ToString()); - Console.WriteLine(result.GetProperty("parentCategory").GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Glossary_UpdateCategory_AllParameters_Convenience() + public void Example_Glossary_CreateTerm_GlossaryCreateTerm_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - AtlasGlossaryCategory body = new AtlasGlossaryCategory + AtlasGlossaryTerm body = new AtlasGlossaryTerm { - Guid = "", - Classifications = {new AtlasClassification -{ -Attributes = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -}, -TypeName = "", -LastModifiedTS = "", -EntityGuid = "", -EntityStatus = EntityStatus.Active, -RemovePropagationsOnEntityDelete = true, -ValidityPeriods = {new TimeBoundary -{ -EndTime = "", -StartTime = "", -TimeZone = "", -}}, -}}, - LongDescription = "", - Name = "", - QualifiedName = "", - ShortDescription = "", - LastModifiedTS = "", - CreateTime = 1234L, - CreatedBy = "", - UpdateTime = 1234L, - UpdatedBy = "", + LongDescription = "Example Long Description", + Name = "ExampleTerm1", + ShortDescription = "Example Short Description", + Abbreviation = "T1", Anchor = new AtlasGlossaryHeader { - DisplayText = "", - GlossaryGuid = "", - RelationGuid = "", + GlossaryGuid = "c018ddaf-7c21-4b37-a838-dae5f110c3d8", }, - ChildrenCategories = {new AtlasRelatedCategoryHeader + Status = TermStatus.Approved, + Resources = {new ResourceLink { -CategoryGuid = "", -Description = "", -DisplayText = "", -ParentCategoryGuid = "", -RelationGuid = "", +DisplayName = "Example Display Name", +Url = "Example Url", }}, - ParentCategory = default, - Terms = {new AtlasRelatedTermHeader + Contacts = { -Description = "", -DisplayText = "", -Expression = "", -RelationGuid = "", -Status = AtlasTermRelationshipStatus.Draft, -Steward = "", -TermGuid = "", +["Expert"] = {new ContactInfo +{ +Id = "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", +Info = "Example Expert Info", }}, +["Steward"] = {new ContactInfo +{ +Id = "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", +Info = "Example Steward info", +}} +}, }; - Response response = client.UpdateCategory("", body); + Response response = client.CreateTerm(body); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_UpdateCategory_AllParameters_Convenience_Async() + public async Task Example_Glossary_CreateTerm_GlossaryCreateTerm_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - AtlasGlossaryCategory body = new AtlasGlossaryCategory + AtlasGlossaryTerm body = new AtlasGlossaryTerm { - Guid = "", - Classifications = {new AtlasClassification -{ -Attributes = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -}, -TypeName = "", -LastModifiedTS = "", -EntityGuid = "", -EntityStatus = EntityStatus.Active, -RemovePropagationsOnEntityDelete = true, -ValidityPeriods = {new TimeBoundary -{ -EndTime = "", -StartTime = "", -TimeZone = "", -}}, -}}, - LongDescription = "", - Name = "", - QualifiedName = "", - ShortDescription = "", - LastModifiedTS = "", - CreateTime = 1234L, - CreatedBy = "", - UpdateTime = 1234L, - UpdatedBy = "", + LongDescription = "Example Long Description", + Name = "ExampleTerm1", + ShortDescription = "Example Short Description", + Abbreviation = "T1", Anchor = new AtlasGlossaryHeader { - DisplayText = "", - GlossaryGuid = "", - RelationGuid = "", + GlossaryGuid = "c018ddaf-7c21-4b37-a838-dae5f110c3d8", }, - ChildrenCategories = {new AtlasRelatedCategoryHeader + Status = TermStatus.Approved, + Resources = {new ResourceLink { -CategoryGuid = "", -Description = "", -DisplayText = "", -ParentCategoryGuid = "", -RelationGuid = "", +DisplayName = "Example Display Name", +Url = "Example Url", }}, - ParentCategory = default, - Terms = {new AtlasRelatedTermHeader + Contacts = +{ +["Expert"] = {new ContactInfo { -Description = "", -DisplayText = "", -Expression = "", -RelationGuid = "", -Status = AtlasTermRelationshipStatus.Draft, -Steward = "", -TermGuid = "", +Id = "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", +Info = "Example Expert Info", }}, +["Steward"] = {new ContactInfo +{ +Id = "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", +Info = "Example Steward info", +}} +}, }; - Response response = await client.UpdateCategoryAsync("", body); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Glossary_DeleteCategory_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - Response response = client.DeleteCategory(""); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_DeleteCategory_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - Response response = await client.DeleteCategoryAsync(""); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Glossary_DeleteCategory_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - Response response = client.DeleteCategory(""); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_DeleteCategory_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - Response response = await client.DeleteCategoryAsync(""); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Glossary_PartialUpdateCategory_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - using RequestContent content = RequestContent.Create(new - { - key = "", - }); - Response response = client.PartialUpdateCategory("", content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); + Response response = await client.CreateTermAsync(body); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_PartialUpdateCategory_ShortVersion_Async() + public void Example_Glossary_CreateTerm_GlossaryCreateTermWithTemplate() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); using RequestContent content = RequestContent.Create(new { - key = "", + name = "ExampleTerm", + anchor = new + { + glossaryGuid = "c018ddaf-7c21-4b37-a838-dae5f110c3d8", + }, + attributes = new + { + ExampleTermTemplateAttribute = new Dictionary + { + ["plain string"] = "Example String", + ["date"] = 1606233600000L, + ["single choice"] = "Example Single Choice A", + ["multi choice"] = new object[] + { +"Example Multi Choice A", +"Example Multi Choice B" + } + }, + }, }); - Response response = await client.PartialUpdateCategoryAsync("", content); + Response response = client.CreateTerm(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); } - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Glossary_PartialUpdateCategory_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - Response response = client.PartialUpdateCategory("", new Dictionary - { - ["key"] = "" - }); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_PartialUpdateCategory_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - Response response = await client.PartialUpdateCategoryAsync("", new Dictionary - { - ["key"] = "" - }); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Glossary_PartialUpdateCategory_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - using RequestContent content = RequestContent.Create(new - { - key = "", - }); - Response response = client.PartialUpdateCategory("", content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("longDescription").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("qualifiedName").ToString()); - Console.WriteLine(result.GetProperty("shortDescription").ToString()); - Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("createTime").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("updateTime").ToString()); - Console.WriteLine(result.GetProperty("updatedBy").ToString()); - Console.WriteLine(result.GetProperty("anchor").GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("anchor").GetProperty("glossaryGuid").ToString()); - Console.WriteLine(result.GetProperty("anchor").GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("categoryGuid").ToString()); - Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("parentCategoryGuid").ToString()); - Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("parentCategory").GetProperty("categoryGuid").ToString()); - Console.WriteLine(result.GetProperty("parentCategory").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("parentCategory").GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("parentCategory").GetProperty("parentCategoryGuid").ToString()); - Console.WriteLine(result.GetProperty("parentCategory").GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("termGuid").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_PartialUpdateCategory_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - using RequestContent content = RequestContent.Create(new - { - key = "", - }); - Response response = await client.PartialUpdateCategoryAsync("", content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("longDescription").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("qualifiedName").ToString()); - Console.WriteLine(result.GetProperty("shortDescription").ToString()); - Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("createTime").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("updateTime").ToString()); - Console.WriteLine(result.GetProperty("updatedBy").ToString()); - Console.WriteLine(result.GetProperty("anchor").GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("anchor").GetProperty("glossaryGuid").ToString()); - Console.WriteLine(result.GetProperty("anchor").GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("categoryGuid").ToString()); - Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("parentCategoryGuid").ToString()); - Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("parentCategory").GetProperty("categoryGuid").ToString()); - Console.WriteLine(result.GetProperty("parentCategory").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("parentCategory").GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("parentCategory").GetProperty("parentCategoryGuid").ToString()); - Console.WriteLine(result.GetProperty("parentCategory").GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("termGuid").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Glossary_PartialUpdateCategory_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - Response response = client.PartialUpdateCategory("", new Dictionary - { - ["key"] = "" - }); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_PartialUpdateCategory_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - Response response = await client.PartialUpdateCategoryAsync("", new Dictionary - { - ["key"] = "" - }); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Glossary_GetRelatedCategories_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - Response response = client.GetRelatedCategories("", null, null, null, null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("")[0].ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_GetRelatedCategories_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - Response response = await client.GetRelatedCategoriesAsync("", null, null, null, null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("")[0].ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Glossary_GetRelatedCategories_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - Response>> response = client.GetRelatedCategories(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_GetRelatedCategories_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - Response>> response = await client.GetRelatedCategoriesAsync(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Glossary_GetRelatedCategories_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - Response response = client.GetRelatedCategories("", 1234, 1234, "", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("")[0].GetProperty("categoryGuid").ToString()); - Console.WriteLine(result.GetProperty("")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("")[0].GetProperty("parentCategoryGuid").ToString()); - Console.WriteLine(result.GetProperty("")[0].GetProperty("relationGuid").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_GetRelatedCategories_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - Response response = await client.GetRelatedCategoriesAsync("", 1234, 1234, "", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("")[0].GetProperty("categoryGuid").ToString()); - Console.WriteLine(result.GetProperty("")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("")[0].GetProperty("parentCategoryGuid").ToString()); - Console.WriteLine(result.GetProperty("")[0].GetProperty("relationGuid").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Glossary_GetRelatedCategories_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - Response>> response = client.GetRelatedCategories("", limit: 1234, offset: 1234, sort: ""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_GetRelatedCategories_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - Response>> response = await client.GetRelatedCategoriesAsync("", limit: 1234, offset: 1234, sort: ""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Glossary_GetCategoryTerms_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - Response response = client.GetCategoryTerms("", null, null, null, null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result[0].ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_GetCategoryTerms_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - Response response = await client.GetCategoryTermsAsync("", null, null, null, null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result[0].ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Glossary_GetCategoryTerms_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - Response> response = client.GetCategoryTerms(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_GetCategoryTerms_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - Response> response = await client.GetCategoryTermsAsync(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Glossary_GetCategoryTerms_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - Response response = client.GetCategoryTerms("", 1234, 1234, "", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("expression").ToString()); - Console.WriteLine(result[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("steward").ToString()); - Console.WriteLine(result[0].GetProperty("termGuid").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_GetCategoryTerms_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - Response response = await client.GetCategoryTermsAsync("", 1234, 1234, "", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("expression").ToString()); - Console.WriteLine(result[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("steward").ToString()); - Console.WriteLine(result[0].GetProperty("termGuid").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Glossary_GetCategoryTerms_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - Response> response = client.GetCategoryTerms("", limit: 1234, offset: 1234, sort: ""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_GetCategoryTerms_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - Response> response = await client.GetCategoryTermsAsync("", limit: 1234, offset: 1234, sort: ""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Glossary_CreateTerm_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - using RequestContent content = RequestContent.Create(new object()); - Response response = client.CreateTerm(content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_CreateTerm_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - using RequestContent content = RequestContent.Create(new object()); - Response response = await client.CreateTermAsync(content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Glossary_CreateTerm_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - AtlasGlossaryTerm body = new AtlasGlossaryTerm(); - Response response = client.CreateTerm(body); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_CreateTerm_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - AtlasGlossaryTerm body = new AtlasGlossaryTerm(); - Response response = await client.CreateTermAsync(body); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Glossary_CreateTerm_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - using RequestContent content = RequestContent.Create(new - { - guid = "", - classifications = new object[] - { -new -{ -attributes = new -{ -key = new object(), -}, -typeName = "", -lastModifiedTS = "", -entityGuid = "", -entityStatus = "ACTIVE", -removePropagationsOnEntityDelete = true, -validityPeriods = new object[] -{ -new -{ -endTime = "", -startTime = "", -timeZone = "", -} -}, -} - }, - longDescription = "", - name = "", - qualifiedName = "", - shortDescription = "", - lastModifiedTS = "", - createTime = 1234L, - createdBy = "", - updateTime = 1234L, - updatedBy = "", - abbreviation = "", - templateName = new object[] - { -new object() - }, - anchor = new - { - displayText = "", - glossaryGuid = "", - relationGuid = "", - }, - antonyms = new object[] - { -new -{ -description = "", -displayText = "", -expression = "", -relationGuid = "", -status = "DRAFT", -steward = "", -termGuid = "", -} - }, - status = "Draft", - nickName = "", - hierarchyInfo = new object[] - { -new -{ -guid = "", -typeName = "", -uniqueAttributes = new -{ -key = new object(), -}, -name = "", -displayText = "", -itemPath = "", -resourceId = "", -properties = new -{ -key = new object(), -}, -} - }, - resources = new object[] - { -new -{ -displayName = "", -url = "", -} - }, - contacts = new - { - key = new object[] - { -new -{ -id = "", -info = "", -} - }, - }, - attributes = new - { - key = new - { - key = new object(), - }, - }, - assignedEntities = new object[] - { -new -{ -guid = "", -typeName = "", -uniqueAttributes = new -{ -key = new object(), -}, -displayText = "", -entityStatus = "ACTIVE", -relationshipType = "", -relationshipAttributes = new -{ -attributes = new -{ -key = new object(), -}, -typeName = "", -lastModifiedTS = "", -}, -relationshipGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", -relationshipStatus = "ACTIVE", -} - }, - categories = new object[] - { -new -{ -categoryGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", -description = "", -displayText = "", -relationGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", -status = "DRAFT", -} - }, - classifies = new object[] - { -null - }, - examples = new object[] - { -"" - }, - isA = new object[] - { -null - }, - preferredTerms = new object[] - { -null - }, - preferredToTerms = new object[] - { -null - }, - replacedBy = new object[] - { -null - }, - replacementTerms = new object[] - { -null - }, - seeAlso = new object[] - { -null - }, - synonyms = new object[] - { -null - }, - translatedTerms = new object[] - { -null - }, - translationTerms = new object[] - { -null - }, - usage = "", - validValues = new object[] - { -null - }, - validValuesFor = new object[] - { -null - }, - }); - Response response = client.CreateTerm(content, includeTermHierarchy: true); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("longDescription").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("qualifiedName").ToString()); - Console.WriteLine(result.GetProperty("shortDescription").ToString()); - Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("createTime").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("updateTime").ToString()); - Console.WriteLine(result.GetProperty("updatedBy").ToString()); - Console.WriteLine(result.GetProperty("abbreviation").ToString()); - Console.WriteLine(result.GetProperty("templateName")[0].ToString()); - Console.WriteLine(result.GetProperty("anchor").GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("anchor").GetProperty("glossaryGuid").ToString()); - Console.WriteLine(result.GetProperty("anchor").GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("nickName").ToString()); - Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("itemPath").ToString()); - Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("properties").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("resources")[0].GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("resources")[0].GetProperty("url").ToString()); - Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); - Console.WriteLine(result.GetProperty("attributes").GetProperty("").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("examples")[0].ToString()); - Console.WriteLine(result.GetProperty("isA")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("isA")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("isA")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("isA")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("isA")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("isA")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("isA")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("usage").ToString()); - Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("termGuid").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_CreateTerm_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - using RequestContent content = RequestContent.Create(new - { - guid = "", - classifications = new object[] - { -new -{ -attributes = new -{ -key = new object(), -}, -typeName = "", -lastModifiedTS = "", -entityGuid = "", -entityStatus = "ACTIVE", -removePropagationsOnEntityDelete = true, -validityPeriods = new object[] -{ -new -{ -endTime = "", -startTime = "", -timeZone = "", -} -}, -} - }, - longDescription = "", - name = "", - qualifiedName = "", - shortDescription = "", - lastModifiedTS = "", - createTime = 1234L, - createdBy = "", - updateTime = 1234L, - updatedBy = "", - abbreviation = "", - templateName = new object[] - { -new object() - }, - anchor = new - { - displayText = "", - glossaryGuid = "", - relationGuid = "", - }, - antonyms = new object[] - { -new -{ -description = "", -displayText = "", -expression = "", -relationGuid = "", -status = "DRAFT", -steward = "", -termGuid = "", -} - }, - status = "Draft", - nickName = "", - hierarchyInfo = new object[] - { -new -{ -guid = "", -typeName = "", -uniqueAttributes = new -{ -key = new object(), -}, -name = "", -displayText = "", -itemPath = "", -resourceId = "", -properties = new -{ -key = new object(), -}, -} - }, - resources = new object[] - { -new -{ -displayName = "", -url = "", -} - }, - contacts = new - { - key = new object[] - { -new -{ -id = "", -info = "", -} - }, - }, - attributes = new - { - key = new - { - key = new object(), - }, - }, - assignedEntities = new object[] - { -new -{ -guid = "", -typeName = "", -uniqueAttributes = new -{ -key = new object(), -}, -displayText = "", -entityStatus = "ACTIVE", -relationshipType = "", -relationshipAttributes = new -{ -attributes = new -{ -key = new object(), -}, -typeName = "", -lastModifiedTS = "", -}, -relationshipGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", -relationshipStatus = "ACTIVE", -} - }, - categories = new object[] - { -new -{ -categoryGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", -description = "", -displayText = "", -relationGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", -status = "DRAFT", -} - }, - classifies = new object[] - { -null - }, - examples = new object[] - { -"" - }, - isA = new object[] - { -null - }, - preferredTerms = new object[] - { -null - }, - preferredToTerms = new object[] - { -null - }, - replacedBy = new object[] - { -null - }, - replacementTerms = new object[] - { -null - }, - seeAlso = new object[] - { -null - }, - synonyms = new object[] - { -null - }, - translatedTerms = new object[] - { -null - }, - translationTerms = new object[] - { -null - }, - usage = "", - validValues = new object[] - { -null - }, - validValuesFor = new object[] - { -null - }, - }); - Response response = await client.CreateTermAsync(content, includeTermHierarchy: true); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("longDescription").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("qualifiedName").ToString()); - Console.WriteLine(result.GetProperty("shortDescription").ToString()); - Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("createTime").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("updateTime").ToString()); - Console.WriteLine(result.GetProperty("updatedBy").ToString()); - Console.WriteLine(result.GetProperty("abbreviation").ToString()); - Console.WriteLine(result.GetProperty("templateName")[0].ToString()); - Console.WriteLine(result.GetProperty("anchor").GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("anchor").GetProperty("glossaryGuid").ToString()); - Console.WriteLine(result.GetProperty("anchor").GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("nickName").ToString()); - Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("itemPath").ToString()); - Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("properties").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("resources")[0].GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("resources")[0].GetProperty("url").ToString()); - Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); - Console.WriteLine(result.GetProperty("attributes").GetProperty("").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("examples")[0].ToString()); - Console.WriteLine(result.GetProperty("isA")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("isA")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("isA")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("isA")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("isA")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("isA")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("isA")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("usage").ToString()); - Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("termGuid").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Glossary_CreateTerm_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - AtlasGlossaryTerm body = new AtlasGlossaryTerm - { - Guid = "", - Classifications = {new AtlasClassification -{ -Attributes = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -}, -TypeName = "", -LastModifiedTS = "", -EntityGuid = "", -EntityStatus = EntityStatus.Active, -RemovePropagationsOnEntityDelete = true, -ValidityPeriods = {new TimeBoundary -{ -EndTime = "", -StartTime = "", -TimeZone = "", -}}, -}}, - LongDescription = "", - Name = "", - QualifiedName = "", - ShortDescription = "", - LastModifiedTS = "", - CreateTime = 1234L, - CreatedBy = "", - UpdateTime = 1234L, - UpdatedBy = "", - Abbreviation = "", - TemplateName = { BinaryData.FromObjectAsJson(new object()) }, - Anchor = new AtlasGlossaryHeader - { - DisplayText = "", - GlossaryGuid = "", - RelationGuid = "", - }, - Antonyms = {new AtlasRelatedTermHeader -{ -Description = "", -DisplayText = "", -Expression = "", -RelationGuid = "", -Status = AtlasTermRelationshipStatus.Draft, -Steward = "", -TermGuid = "", -}}, - Status = TermStatus.Draft, - NickName = "", - HierarchyInfo = {new PurviewObjectId -{ -Guid = "", -TypeName = "", -UniqueAttributes = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -}, -Name = "", -DisplayText = "", -ItemPath = "", -ResourceId = "", -Properties = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -}, -}}, - Resources = {new ResourceLink -{ -DisplayName = "", -Url = "", -}}, - Contacts = -{ -["key"] = {new ContactInfo -{ -Id = "", -Info = "", -}} -}, - Attributes = -{ -["key"] = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -} -}, - AssignedEntities = {new AtlasRelatedObjectId -{ -Guid = "", -TypeName = "", -UniqueAttributes = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -}, -DisplayText = "", -EntityStatus = EntityStatus.Active, -RelationshipType = "", -RelationshipAttributes = new AtlasStruct -{ -Attributes = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -}, -TypeName = "", -LastModifiedTS = "", -}, -RelationshipGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), -RelationshipStatus = StatusAtlasRelationship.Active, -}}, - Categories = {new AtlasTermCategorizationHeader -{ -CategoryGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), -Description = "", -DisplayText = "", -RelationGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), -Status = AtlasTermRelationshipStatus.Draft, -}}, - Classifies = { default }, - Examples = { "" }, - IsA = { default }, - PreferredTerms = { default }, - PreferredToTerms = { default }, - ReplacedBy = { default }, - ReplacementTerms = { default }, - SeeAlso = { default }, - Synonyms = { default }, - TranslatedTerms = { default }, - TranslationTerms = { default }, - Usage = "", - ValidValues = { default }, - ValidValuesFor = { default }, - }; - Response response = client.CreateTerm(body, includeTermHierarchy: true); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_CreateTerm_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - AtlasGlossaryTerm body = new AtlasGlossaryTerm - { - Guid = "", - Classifications = {new AtlasClassification -{ -Attributes = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -}, -TypeName = "", -LastModifiedTS = "", -EntityGuid = "", -EntityStatus = EntityStatus.Active, -RemovePropagationsOnEntityDelete = true, -ValidityPeriods = {new TimeBoundary -{ -EndTime = "", -StartTime = "", -TimeZone = "", -}}, -}}, - LongDescription = "", - Name = "", - QualifiedName = "", - ShortDescription = "", - LastModifiedTS = "", - CreateTime = 1234L, - CreatedBy = "", - UpdateTime = 1234L, - UpdatedBy = "", - Abbreviation = "", - TemplateName = { BinaryData.FromObjectAsJson(new object()) }, - Anchor = new AtlasGlossaryHeader - { - DisplayText = "", - GlossaryGuid = "", - RelationGuid = "", - }, - Antonyms = {new AtlasRelatedTermHeader -{ -Description = "", -DisplayText = "", -Expression = "", -RelationGuid = "", -Status = AtlasTermRelationshipStatus.Draft, -Steward = "", -TermGuid = "", -}}, - Status = TermStatus.Draft, - NickName = "", - HierarchyInfo = {new PurviewObjectId -{ -Guid = "", -TypeName = "", -UniqueAttributes = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -}, -Name = "", -DisplayText = "", -ItemPath = "", -ResourceId = "", -Properties = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -}, -}}, - Resources = {new ResourceLink -{ -DisplayName = "", -Url = "", -}}, - Contacts = -{ -["key"] = {new ContactInfo -{ -Id = "", -Info = "", -}} -}, - Attributes = -{ -["key"] = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -} -}, - AssignedEntities = {new AtlasRelatedObjectId -{ -Guid = "", -TypeName = "", -UniqueAttributes = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -}, -DisplayText = "", -EntityStatus = EntityStatus.Active, -RelationshipType = "", -RelationshipAttributes = new AtlasStruct -{ -Attributes = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -}, -TypeName = "", -LastModifiedTS = "", -}, -RelationshipGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), -RelationshipStatus = StatusAtlasRelationship.Active, -}}, - Categories = {new AtlasTermCategorizationHeader -{ -CategoryGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), -Description = "", -DisplayText = "", -RelationGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), -Status = AtlasTermRelationshipStatus.Draft, -}}, - Classifies = { default }, - Examples = { "" }, - IsA = { default }, - PreferredTerms = { default }, - PreferredToTerms = { default }, - ReplacedBy = { default }, - ReplacementTerms = { default }, - SeeAlso = { default }, - Synonyms = { default }, - TranslatedTerms = { default }, - TranslationTerms = { default }, - Usage = "", - ValidValues = { default }, - ValidValuesFor = { default }, - }; - Response response = await client.CreateTermAsync(body, includeTermHierarchy: true); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Glossary_GetTerm_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - Response response = client.GetTerm("", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_GetTerm_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - Response response = await client.GetTermAsync("", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Glossary_GetTerm_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - Response response = client.GetTerm(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_GetTerm_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - Response response = await client.GetTermAsync(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Glossary_GetTerm_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); - - Response response = client.GetTerm("", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("longDescription").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("qualifiedName").ToString()); - Console.WriteLine(result.GetProperty("shortDescription").ToString()); - Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("createTime").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("updateTime").ToString()); - Console.WriteLine(result.GetProperty("updatedBy").ToString()); - Console.WriteLine(result.GetProperty("abbreviation").ToString()); - Console.WriteLine(result.GetProperty("templateName")[0].ToString()); - Console.WriteLine(result.GetProperty("anchor").GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("anchor").GetProperty("glossaryGuid").ToString()); - Console.WriteLine(result.GetProperty("anchor").GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("nickName").ToString()); - Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("itemPath").ToString()); - Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("properties").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("resources")[0].GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("resources")[0].GetProperty("url").ToString()); - Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); - Console.WriteLine(result.GetProperty("attributes").GetProperty("").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("examples")[0].ToString()); - Console.WriteLine(result.GetProperty("isA")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("isA")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("isA")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("isA")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("isA")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("isA")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("isA")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("usage").ToString()); - Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("termGuid").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_GetTerm_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); - - Response response = await client.GetTermAsync("", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("longDescription").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("qualifiedName").ToString()); - Console.WriteLine(result.GetProperty("shortDescription").ToString()); - Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("createTime").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("updateTime").ToString()); - Console.WriteLine(result.GetProperty("updatedBy").ToString()); - Console.WriteLine(result.GetProperty("abbreviation").ToString()); - Console.WriteLine(result.GetProperty("templateName")[0].ToString()); - Console.WriteLine(result.GetProperty("anchor").GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("anchor").GetProperty("glossaryGuid").ToString()); - Console.WriteLine(result.GetProperty("anchor").GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("nickName").ToString()); - Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("itemPath").ToString()); - Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("properties").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("resources")[0].GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("resources")[0].GetProperty("url").ToString()); - Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); - Console.WriteLine(result.GetProperty("attributes").GetProperty("").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("examples")[0].ToString()); - Console.WriteLine(result.GetProperty("isA")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("isA")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("isA")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("isA")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("isA")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("isA")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("isA")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("usage").ToString()); - Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("termGuid").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Glossary_GetTerm_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); - - Response response = client.GetTerm(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_GetTerm_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); - - Response response = await client.GetTermAsync(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Glossary_UpdateTerm_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - using RequestContent content = RequestContent.Create(new object()); - Response response = client.UpdateTerm("", content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_UpdateTerm_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - using RequestContent content = RequestContent.Create(new object()); - Response response = await client.UpdateTermAsync("", content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Glossary_UpdateTerm_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - AtlasGlossaryTerm body = new AtlasGlossaryTerm(); - Response response = client.UpdateTerm("", body); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_UpdateTerm_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - AtlasGlossaryTerm body = new AtlasGlossaryTerm(); - Response response = await client.UpdateTermAsync("", body); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Glossary_UpdateTerm_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); - - using RequestContent content = RequestContent.Create(new - { - guid = "", - classifications = new object[] - { -new -{ -attributes = new -{ -key = new object(), -}, -typeName = "", -lastModifiedTS = "", -entityGuid = "", -entityStatus = "ACTIVE", -removePropagationsOnEntityDelete = true, -validityPeriods = new object[] -{ -new -{ -endTime = "", -startTime = "", -timeZone = "", -} -}, -} - }, - longDescription = "", - name = "", - qualifiedName = "", - shortDescription = "", - lastModifiedTS = "", - createTime = 1234L, - createdBy = "", - updateTime = 1234L, - updatedBy = "", - abbreviation = "", - templateName = new object[] - { -new object() - }, - anchor = new - { - displayText = "", - glossaryGuid = "", - relationGuid = "", - }, - antonyms = new object[] - { -new -{ -description = "", -displayText = "", -expression = "", -relationGuid = "", -status = "DRAFT", -steward = "", -termGuid = "", -} - }, - status = "Draft", - nickName = "", - hierarchyInfo = new object[] - { -new -{ -guid = "", -typeName = "", -uniqueAttributes = new -{ -key = new object(), -}, -name = "", -displayText = "", -itemPath = "", -resourceId = "", -properties = new -{ -key = new object(), -}, -} - }, - resources = new object[] - { -new -{ -displayName = "", -url = "", -} - }, - contacts = new - { - key = new object[] - { -new -{ -id = "", -info = "", -} - }, - }, - attributes = new - { - key = new - { - key = new object(), - }, - }, - assignedEntities = new object[] - { -new -{ -guid = "", -typeName = "", -uniqueAttributes = new -{ -key = new object(), -}, -displayText = "", -entityStatus = "ACTIVE", -relationshipType = "", -relationshipAttributes = new -{ -attributes = new -{ -key = new object(), -}, -typeName = "", -lastModifiedTS = "", -}, -relationshipGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", -relationshipStatus = "ACTIVE", -} - }, - categories = new object[] - { -new -{ -categoryGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", -description = "", -displayText = "", -relationGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", -status = "DRAFT", -} - }, - classifies = new object[] - { -null - }, - examples = new object[] - { -"" - }, - isA = new object[] - { -null - }, - preferredTerms = new object[] - { -null - }, - preferredToTerms = new object[] - { -null - }, - replacedBy = new object[] - { -null - }, - replacementTerms = new object[] - { -null - }, - seeAlso = new object[] - { -null - }, - synonyms = new object[] - { -null - }, - translatedTerms = new object[] - { -null - }, - translationTerms = new object[] - { -null - }, - usage = "", - validValues = new object[] - { -null - }, - validValuesFor = new object[] - { -null - }, - }); - Response response = client.UpdateTerm("", content, includeTermHierarchy: true); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("longDescription").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("qualifiedName").ToString()); - Console.WriteLine(result.GetProperty("shortDescription").ToString()); - Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("createTime").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("updateTime").ToString()); - Console.WriteLine(result.GetProperty("updatedBy").ToString()); - Console.WriteLine(result.GetProperty("abbreviation").ToString()); - Console.WriteLine(result.GetProperty("templateName")[0].ToString()); - Console.WriteLine(result.GetProperty("anchor").GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("anchor").GetProperty("glossaryGuid").ToString()); - Console.WriteLine(result.GetProperty("anchor").GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("nickName").ToString()); - Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("itemPath").ToString()); - Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("properties").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("resources")[0].GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("resources")[0].GetProperty("url").ToString()); - Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); - Console.WriteLine(result.GetProperty("attributes").GetProperty("").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("examples")[0].ToString()); - Console.WriteLine(result.GetProperty("isA")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("isA")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("isA")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("isA")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("isA")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("isA")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("isA")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("usage").ToString()); - Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("termGuid").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_UpdateTerm_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); - - using RequestContent content = RequestContent.Create(new - { - guid = "", - classifications = new object[] - { -new -{ -attributes = new -{ -key = new object(), -}, -typeName = "", -lastModifiedTS = "", -entityGuid = "", -entityStatus = "ACTIVE", -removePropagationsOnEntityDelete = true, -validityPeriods = new object[] -{ -new -{ -endTime = "", -startTime = "", -timeZone = "", -} -}, -} - }, - longDescription = "", - name = "", - qualifiedName = "", - shortDescription = "", - lastModifiedTS = "", - createTime = 1234L, - createdBy = "", - updateTime = 1234L, - updatedBy = "", - abbreviation = "", - templateName = new object[] - { -new object() - }, - anchor = new - { - displayText = "", - glossaryGuid = "", - relationGuid = "", - }, - antonyms = new object[] - { -new -{ -description = "", -displayText = "", -expression = "", -relationGuid = "", -status = "DRAFT", -steward = "", -termGuid = "", -} - }, - status = "Draft", - nickName = "", - hierarchyInfo = new object[] - { -new -{ -guid = "", -typeName = "", -uniqueAttributes = new -{ -key = new object(), -}, -name = "", -displayText = "", -itemPath = "", -resourceId = "", -properties = new -{ -key = new object(), -}, -} - }, - resources = new object[] - { -new -{ -displayName = "", -url = "", -} - }, - contacts = new - { - key = new object[] - { -new -{ -id = "", -info = "", -} - }, - }, - attributes = new - { - key = new - { - key = new object(), - }, - }, - assignedEntities = new object[] - { -new -{ -guid = "", -typeName = "", -uniqueAttributes = new -{ -key = new object(), -}, -displayText = "", -entityStatus = "ACTIVE", -relationshipType = "", -relationshipAttributes = new -{ -attributes = new -{ -key = new object(), -}, -typeName = "", -lastModifiedTS = "", -}, -relationshipGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", -relationshipStatus = "ACTIVE", -} - }, - categories = new object[] - { -new -{ -categoryGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", -description = "", -displayText = "", -relationGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", -status = "DRAFT", -} - }, - classifies = new object[] - { -null - }, - examples = new object[] - { -"" - }, - isA = new object[] - { -null - }, - preferredTerms = new object[] - { -null - }, - preferredToTerms = new object[] - { -null - }, - replacedBy = new object[] - { -null - }, - replacementTerms = new object[] - { -null - }, - seeAlso = new object[] - { -null - }, - synonyms = new object[] - { -null - }, - translatedTerms = new object[] - { -null - }, - translationTerms = new object[] - { -null - }, - usage = "", - validValues = new object[] - { -null - }, - validValuesFor = new object[] - { -null - }, - }); - Response response = await client.UpdateTermAsync("", content, includeTermHierarchy: true); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("longDescription").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("qualifiedName").ToString()); - Console.WriteLine(result.GetProperty("shortDescription").ToString()); - Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("createTime").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("updateTime").ToString()); - Console.WriteLine(result.GetProperty("updatedBy").ToString()); - Console.WriteLine(result.GetProperty("abbreviation").ToString()); - Console.WriteLine(result.GetProperty("templateName")[0].ToString()); - Console.WriteLine(result.GetProperty("anchor").GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("anchor").GetProperty("glossaryGuid").ToString()); - Console.WriteLine(result.GetProperty("anchor").GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("nickName").ToString()); - Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("itemPath").ToString()); - Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("properties").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("resources")[0].GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("resources")[0].GetProperty("url").ToString()); - Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); - Console.WriteLine(result.GetProperty("attributes").GetProperty("").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("examples")[0].ToString()); - Console.WriteLine(result.GetProperty("isA")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("isA")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("isA")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("isA")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("isA")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("isA")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("isA")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("usage").ToString()); - Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("termGuid").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Glossary_UpdateTerm_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); - - AtlasGlossaryTerm body = new AtlasGlossaryTerm - { - Guid = "", - Classifications = {new AtlasClassification -{ -Attributes = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -}, -TypeName = "", -LastModifiedTS = "", -EntityGuid = "", -EntityStatus = EntityStatus.Active, -RemovePropagationsOnEntityDelete = true, -ValidityPeriods = {new TimeBoundary -{ -EndTime = "", -StartTime = "", -TimeZone = "", -}}, -}}, - LongDescription = "", - Name = "", - QualifiedName = "", - ShortDescription = "", - LastModifiedTS = "", - CreateTime = 1234L, - CreatedBy = "", - UpdateTime = 1234L, - UpdatedBy = "", - Abbreviation = "", - TemplateName = { BinaryData.FromObjectAsJson(new object()) }, - Anchor = new AtlasGlossaryHeader - { - DisplayText = "", - GlossaryGuid = "", - RelationGuid = "", - }, - Antonyms = {new AtlasRelatedTermHeader -{ -Description = "", -DisplayText = "", -Expression = "", -RelationGuid = "", -Status = AtlasTermRelationshipStatus.Draft, -Steward = "", -TermGuid = "", -}}, - Status = TermStatus.Draft, - NickName = "", - HierarchyInfo = {new PurviewObjectId -{ -Guid = "", -TypeName = "", -UniqueAttributes = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -}, -Name = "", -DisplayText = "", -ItemPath = "", -ResourceId = "", -Properties = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -}, -}}, - Resources = {new ResourceLink -{ -DisplayName = "", -Url = "", -}}, - Contacts = -{ -["key"] = {new ContactInfo -{ -Id = "", -Info = "", -}} -}, - Attributes = -{ -["key"] = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -} -}, - AssignedEntities = {new AtlasRelatedObjectId -{ -Guid = "", -TypeName = "", -UniqueAttributes = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -}, -DisplayText = "", -EntityStatus = EntityStatus.Active, -RelationshipType = "", -RelationshipAttributes = new AtlasStruct -{ -Attributes = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -}, -TypeName = "", -LastModifiedTS = "", -}, -RelationshipGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), -RelationshipStatus = StatusAtlasRelationship.Active, -}}, - Categories = {new AtlasTermCategorizationHeader -{ -CategoryGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), -Description = "", -DisplayText = "", -RelationGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), -Status = AtlasTermRelationshipStatus.Draft, -}}, - Classifies = { default }, - Examples = { "" }, - IsA = { default }, - PreferredTerms = { default }, - PreferredToTerms = { default }, - ReplacedBy = { default }, - ReplacementTerms = { default }, - SeeAlso = { default }, - Synonyms = { default }, - TranslatedTerms = { default }, - TranslationTerms = { default }, - Usage = "", - ValidValues = { default }, - ValidValuesFor = { default }, - }; - Response response = client.UpdateTerm("", body, includeTermHierarchy: true); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_UpdateTerm_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); - - AtlasGlossaryTerm body = new AtlasGlossaryTerm - { - Guid = "", - Classifications = {new AtlasClassification -{ -Attributes = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -}, -TypeName = "", -LastModifiedTS = "", -EntityGuid = "", -EntityStatus = EntityStatus.Active, -RemovePropagationsOnEntityDelete = true, -ValidityPeriods = {new TimeBoundary -{ -EndTime = "", -StartTime = "", -TimeZone = "", -}}, -}}, - LongDescription = "", - Name = "", - QualifiedName = "", - ShortDescription = "", - LastModifiedTS = "", - CreateTime = 1234L, - CreatedBy = "", - UpdateTime = 1234L, - UpdatedBy = "", - Abbreviation = "", - TemplateName = { BinaryData.FromObjectAsJson(new object()) }, - Anchor = new AtlasGlossaryHeader - { - DisplayText = "", - GlossaryGuid = "", - RelationGuid = "", - }, - Antonyms = {new AtlasRelatedTermHeader -{ -Description = "", -DisplayText = "", -Expression = "", -RelationGuid = "", -Status = AtlasTermRelationshipStatus.Draft, -Steward = "", -TermGuid = "", -}}, - Status = TermStatus.Draft, - NickName = "", - HierarchyInfo = {new PurviewObjectId -{ -Guid = "", -TypeName = "", -UniqueAttributes = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -}, -Name = "", -DisplayText = "", -ItemPath = "", -ResourceId = "", -Properties = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -}, -}}, - Resources = {new ResourceLink -{ -DisplayName = "", -Url = "", -}}, - Contacts = -{ -["key"] = {new ContactInfo -{ -Id = "", -Info = "", -}} -}, - Attributes = -{ -["key"] = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -} -}, - AssignedEntities = {new AtlasRelatedObjectId -{ -Guid = "", -TypeName = "", -UniqueAttributes = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -}, -DisplayText = "", -EntityStatus = EntityStatus.Active, -RelationshipType = "", -RelationshipAttributes = new AtlasStruct -{ -Attributes = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -}, -TypeName = "", -LastModifiedTS = "", -}, -RelationshipGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), -RelationshipStatus = StatusAtlasRelationship.Active, -}}, - Categories = {new AtlasTermCategorizationHeader -{ -CategoryGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), -Description = "", -DisplayText = "", -RelationGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), -Status = AtlasTermRelationshipStatus.Draft, -}}, - Classifies = { default }, - Examples = { "" }, - IsA = { default }, - PreferredTerms = { default }, - PreferredToTerms = { default }, - ReplacedBy = { default }, - ReplacementTerms = { default }, - SeeAlso = { default }, - Synonyms = { default }, - TranslatedTerms = { default }, - TranslationTerms = { default }, - Usage = "", - ValidValues = { default }, - ValidValuesFor = { default }, - }; - Response response = await client.UpdateTermAsync("", body, includeTermHierarchy: true); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Glossary_DeleteTerm_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - Response response = client.DeleteTerm(""); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_DeleteTerm_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - Response response = await client.DeleteTermAsync(""); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Glossary_DeleteTerm_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - Response response = client.DeleteTerm(""); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_DeleteTerm_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - Response response = await client.DeleteTermAsync(""); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Glossary_PartialUpdateTerm_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - using RequestContent content = RequestContent.Create(new - { - key = "", - }); - Response response = client.PartialUpdateTerm("", content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_PartialUpdateTerm_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - using RequestContent content = RequestContent.Create(new - { - key = "", - }); - Response response = await client.PartialUpdateTermAsync("", content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Glossary_PartialUpdateTerm_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - Response response = client.PartialUpdateTerm("", new Dictionary - { - ["key"] = "" - }); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_PartialUpdateTerm_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - Response response = await client.PartialUpdateTermAsync("", new Dictionary - { - ["key"] = "" - }); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Glossary_PartialUpdateTerm_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); - - using RequestContent content = RequestContent.Create(new - { - key = "", - }); - Response response = client.PartialUpdateTerm("", content, includeTermHierarchy: true); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("longDescription").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("qualifiedName").ToString()); - Console.WriteLine(result.GetProperty("shortDescription").ToString()); - Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("createTime").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("updateTime").ToString()); - Console.WriteLine(result.GetProperty("updatedBy").ToString()); - Console.WriteLine(result.GetProperty("abbreviation").ToString()); - Console.WriteLine(result.GetProperty("templateName")[0].ToString()); - Console.WriteLine(result.GetProperty("anchor").GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("anchor").GetProperty("glossaryGuid").ToString()); - Console.WriteLine(result.GetProperty("anchor").GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("nickName").ToString()); - Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("itemPath").ToString()); - Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("properties").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("resources")[0].GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("resources")[0].GetProperty("url").ToString()); - Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); - Console.WriteLine(result.GetProperty("attributes").GetProperty("").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("examples")[0].ToString()); - Console.WriteLine(result.GetProperty("isA")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("isA")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("isA")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("isA")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("isA")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("isA")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("isA")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("usage").ToString()); - Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("termGuid").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_PartialUpdateTerm_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); - - using RequestContent content = RequestContent.Create(new - { - key = "", - }); - Response response = await client.PartialUpdateTermAsync("", content, includeTermHierarchy: true); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("longDescription").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("qualifiedName").ToString()); - Console.WriteLine(result.GetProperty("shortDescription").ToString()); - Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("createTime").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("updateTime").ToString()); - Console.WriteLine(result.GetProperty("updatedBy").ToString()); - Console.WriteLine(result.GetProperty("abbreviation").ToString()); - Console.WriteLine(result.GetProperty("templateName")[0].ToString()); - Console.WriteLine(result.GetProperty("anchor").GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("anchor").GetProperty("glossaryGuid").ToString()); - Console.WriteLine(result.GetProperty("anchor").GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("nickName").ToString()); - Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("itemPath").ToString()); - Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("properties").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("resources")[0].GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("resources")[0].GetProperty("url").ToString()); - Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); - Console.WriteLine(result.GetProperty("attributes").GetProperty("").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("examples")[0].ToString()); - Console.WriteLine(result.GetProperty("isA")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("isA")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("isA")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("isA")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("isA")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("isA")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("isA")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("usage").ToString()); - Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("termGuid").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Glossary_PartialUpdateTerm_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); - - Response response = client.PartialUpdateTerm("", new Dictionary - { - ["key"] = "" - }, includeTermHierarchy: true); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_PartialUpdateTerm_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); - - Response response = await client.PartialUpdateTermAsync("", new Dictionary - { - ["key"] = "" - }, includeTermHierarchy: true); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Glossary_CreateTerms_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - using RequestContent content = RequestContent.Create(new object[] - { -new object() - }); - Response response = client.CreateTerms(content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result[0].ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_CreateTerms_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - using RequestContent content = RequestContent.Create(new object[] - { -new object() - }); - Response response = await client.CreateTermsAsync(content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result[0].ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Glossary_CreateTerms_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - Response> response = client.CreateTerms(new AtlasGlossaryTerm[] - { -new AtlasGlossaryTerm() - }); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_CreateTerms_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - Response> response = await client.CreateTermsAsync(new AtlasGlossaryTerm[] - { -new AtlasGlossaryTerm() - }); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Glossary_CreateTerms_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); - - using RequestContent content = RequestContent.Create(new object[] - { -new -{ -guid = "", -classifications = new object[] -{ -new -{ -attributes = new -{ -key = new object(), -}, -typeName = "", -lastModifiedTS = "", -entityGuid = "", -entityStatus = "ACTIVE", -removePropagationsOnEntityDelete = true, -validityPeriods = new object[] -{ -new -{ -endTime = "", -startTime = "", -timeZone = "", -} -}, -} -}, -longDescription = "", -name = "", -qualifiedName = "", -shortDescription = "", -lastModifiedTS = "", -createTime = 1234L, -createdBy = "", -updateTime = 1234L, -updatedBy = "", -abbreviation = "", -templateName = new object[] -{ -new object() -}, -anchor = new -{ -displayText = "", -glossaryGuid = "", -relationGuid = "", -}, -antonyms = new object[] -{ -new -{ -description = "", -displayText = "", -expression = "", -relationGuid = "", -status = "DRAFT", -steward = "", -termGuid = "", -} -}, -status = "Draft", -nickName = "", -hierarchyInfo = new object[] -{ -new -{ -guid = "", -typeName = "", -uniqueAttributes = new -{ -key = new object(), -}, -name = "", -displayText = "", -itemPath = "", -resourceId = "", -properties = new -{ -key = new object(), -}, -} -}, -resources = new object[] -{ -new -{ -displayName = "", -url = "", -} -}, -contacts = new -{ -key = new object[] -{ -new -{ -id = "", -info = "", -} -}, -}, -attributes = new -{ -key = new -{ -key = new object(), -}, -}, -assignedEntities = new object[] -{ -new -{ -guid = "", -typeName = "", -uniqueAttributes = new -{ -key = new object(), -}, -displayText = "", -entityStatus = "ACTIVE", -relationshipType = "", -relationshipAttributes = new -{ -attributes = new -{ -key = new object(), -}, -typeName = "", -lastModifiedTS = "", -}, -relationshipGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", -relationshipStatus = "ACTIVE", -} -}, -categories = new object[] -{ -new -{ -categoryGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", -description = "", -displayText = "", -relationGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", -status = "DRAFT", -} -}, -classifies = new object[] -{ -null -}, -examples = new object[] -{ -"" -}, -isA = new object[] -{ -null -}, -preferredTerms = new object[] -{ -null -}, -preferredToTerms = new object[] -{ -null -}, -replacedBy = new object[] -{ -null -}, -replacementTerms = new object[] -{ -null -}, -seeAlso = new object[] -{ -null -}, -synonyms = new object[] -{ -null -}, -translatedTerms = new object[] -{ -null -}, -translationTerms = new object[] -{ -null -}, -usage = "", -validValues = new object[] -{ -null -}, -validValuesFor = new object[] -{ -null -}, -} - }); - Response response = client.CreateTerms(content, includeTermHierarchy: true); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result[0].GetProperty("guid").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result[0].GetProperty("longDescription").ToString()); - Console.WriteLine(result[0].GetProperty("name").ToString()); - Console.WriteLine(result[0].GetProperty("qualifiedName").ToString()); - Console.WriteLine(result[0].GetProperty("shortDescription").ToString()); - Console.WriteLine(result[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result[0].GetProperty("createTime").ToString()); - Console.WriteLine(result[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result[0].GetProperty("updateTime").ToString()); - Console.WriteLine(result[0].GetProperty("updatedBy").ToString()); - Console.WriteLine(result[0].GetProperty("abbreviation").ToString()); - Console.WriteLine(result[0].GetProperty("templateName")[0].ToString()); - Console.WriteLine(result[0].GetProperty("anchor").GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("anchor").GetProperty("glossaryGuid").ToString()); - Console.WriteLine(result[0].GetProperty("anchor").GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("nickName").ToString()); - Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("guid").ToString()); - Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); - Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("name").ToString()); - Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("itemPath").ToString()); - Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("resourceId").ToString()); - Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("properties").GetProperty("").ToString()); - Console.WriteLine(result[0].GetProperty("resources")[0].GetProperty("displayName").ToString()); - Console.WriteLine(result[0].GetProperty("resources")[0].GetProperty("url").ToString()); - Console.WriteLine(result[0].GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); - Console.WriteLine(result[0].GetProperty("attributes").GetProperty("").GetProperty("").ToString()); - Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); - Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); - Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); - Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); - Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); - Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); - Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); - Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("expression").ToString()); - Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("steward").ToString()); - Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result[0].GetProperty("examples")[0].ToString()); - Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("expression").ToString()); - Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("steward").ToString()); - Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("expression").ToString()); - Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("steward").ToString()); - Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("expression").ToString()); - Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("steward").ToString()); - Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result[0].GetProperty("usage").ToString()); - Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("expression").ToString()); - Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("steward").ToString()); - Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("expression").ToString()); - Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("steward").ToString()); - Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("termGuid").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_CreateTerms_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); - - using RequestContent content = RequestContent.Create(new object[] - { -new -{ -guid = "", -classifications = new object[] -{ -new -{ -attributes = new -{ -key = new object(), -}, -typeName = "", -lastModifiedTS = "", -entityGuid = "", -entityStatus = "ACTIVE", -removePropagationsOnEntityDelete = true, -validityPeriods = new object[] -{ -new -{ -endTime = "", -startTime = "", -timeZone = "", -} -}, -} -}, -longDescription = "", -name = "", -qualifiedName = "", -shortDescription = "", -lastModifiedTS = "", -createTime = 1234L, -createdBy = "", -updateTime = 1234L, -updatedBy = "", -abbreviation = "", -templateName = new object[] -{ -new object() -}, -anchor = new -{ -displayText = "", -glossaryGuid = "", -relationGuid = "", -}, -antonyms = new object[] -{ -new -{ -description = "", -displayText = "", -expression = "", -relationGuid = "", -status = "DRAFT", -steward = "", -termGuid = "", -} -}, -status = "Draft", -nickName = "", -hierarchyInfo = new object[] -{ -new -{ -guid = "", -typeName = "", -uniqueAttributes = new -{ -key = new object(), -}, -name = "", -displayText = "", -itemPath = "", -resourceId = "", -properties = new -{ -key = new object(), -}, -} -}, -resources = new object[] -{ -new -{ -displayName = "", -url = "", -} -}, -contacts = new -{ -key = new object[] -{ -new -{ -id = "", -info = "", -} -}, -}, -attributes = new -{ -key = new -{ -key = new object(), -}, -}, -assignedEntities = new object[] -{ -new -{ -guid = "", -typeName = "", -uniqueAttributes = new -{ -key = new object(), -}, -displayText = "", -entityStatus = "ACTIVE", -relationshipType = "", -relationshipAttributes = new -{ -attributes = new -{ -key = new object(), -}, -typeName = "", -lastModifiedTS = "", -}, -relationshipGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", -relationshipStatus = "ACTIVE", -} -}, -categories = new object[] -{ -new -{ -categoryGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", -description = "", -displayText = "", -relationGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", -status = "DRAFT", -} -}, -classifies = new object[] -{ -null -}, -examples = new object[] -{ -"" -}, -isA = new object[] -{ -null -}, -preferredTerms = new object[] -{ -null -}, -preferredToTerms = new object[] -{ -null -}, -replacedBy = new object[] -{ -null -}, -replacementTerms = new object[] -{ -null -}, -seeAlso = new object[] -{ -null -}, -synonyms = new object[] -{ -null -}, -translatedTerms = new object[] -{ -null -}, -translationTerms = new object[] -{ -null -}, -usage = "", -validValues = new object[] -{ -null -}, -validValuesFor = new object[] -{ -null -}, -} - }); - Response response = await client.CreateTermsAsync(content, includeTermHierarchy: true); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result[0].GetProperty("guid").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result[0].GetProperty("longDescription").ToString()); - Console.WriteLine(result[0].GetProperty("name").ToString()); - Console.WriteLine(result[0].GetProperty("qualifiedName").ToString()); - Console.WriteLine(result[0].GetProperty("shortDescription").ToString()); - Console.WriteLine(result[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result[0].GetProperty("createTime").ToString()); - Console.WriteLine(result[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result[0].GetProperty("updateTime").ToString()); - Console.WriteLine(result[0].GetProperty("updatedBy").ToString()); - Console.WriteLine(result[0].GetProperty("abbreviation").ToString()); - Console.WriteLine(result[0].GetProperty("templateName")[0].ToString()); - Console.WriteLine(result[0].GetProperty("anchor").GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("anchor").GetProperty("glossaryGuid").ToString()); - Console.WriteLine(result[0].GetProperty("anchor").GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("nickName").ToString()); - Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("guid").ToString()); - Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); - Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("name").ToString()); - Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("itemPath").ToString()); - Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("resourceId").ToString()); - Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("properties").GetProperty("").ToString()); - Console.WriteLine(result[0].GetProperty("resources")[0].GetProperty("displayName").ToString()); - Console.WriteLine(result[0].GetProperty("resources")[0].GetProperty("url").ToString()); - Console.WriteLine(result[0].GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); - Console.WriteLine(result[0].GetProperty("attributes").GetProperty("").GetProperty("").ToString()); - Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); - Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); - Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); - Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); - Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); - Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); - Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); - Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("expression").ToString()); - Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("steward").ToString()); - Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result[0].GetProperty("examples")[0].ToString()); - Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("expression").ToString()); - Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("steward").ToString()); - Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("expression").ToString()); - Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("steward").ToString()); - Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("expression").ToString()); - Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("steward").ToString()); - Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result[0].GetProperty("usage").ToString()); - Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("expression").ToString()); - Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("steward").ToString()); - Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("expression").ToString()); - Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("steward").ToString()); - Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("termGuid").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Glossary_CreateTerms_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); - - Response> response = client.CreateTerms(new AtlasGlossaryTerm[] - { -new AtlasGlossaryTerm -{ -Guid = "", -Classifications = {new AtlasClassification -{ -Attributes = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -}, -TypeName = "", -LastModifiedTS = "", -EntityGuid = "", -EntityStatus = EntityStatus.Active, -RemovePropagationsOnEntityDelete = true, -ValidityPeriods = {new TimeBoundary -{ -EndTime = "", -StartTime = "", -TimeZone = "", -}}, -}}, -LongDescription = "", -Name = "", -QualifiedName = "", -ShortDescription = "", -LastModifiedTS = "", -CreateTime = 1234L, -CreatedBy = "", -UpdateTime = 1234L, -UpdatedBy = "", -Abbreviation = "", -TemplateName = {BinaryData.FromObjectAsJson(new object())}, -Anchor = new AtlasGlossaryHeader -{ -DisplayText = "", -GlossaryGuid = "", -RelationGuid = "", -}, -Antonyms = {new AtlasRelatedTermHeader -{ -Description = "", -DisplayText = "", -Expression = "", -RelationGuid = "", -Status = AtlasTermRelationshipStatus.Draft, -Steward = "", -TermGuid = "", -}}, -Status = TermStatus.Draft, -NickName = "", -HierarchyInfo = {new PurviewObjectId -{ -Guid = "", -TypeName = "", -UniqueAttributes = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -}, -Name = "", -DisplayText = "", -ItemPath = "", -ResourceId = "", -Properties = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -}, -}}, -Resources = {new ResourceLink -{ -DisplayName = "", -Url = "", -}}, -Contacts = -{ -["key"] = {new ContactInfo -{ -Id = "", -Info = "", -}} -}, -Attributes = -{ -["key"] = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -} -}, -AssignedEntities = {new AtlasRelatedObjectId -{ -Guid = "", -TypeName = "", -UniqueAttributes = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -}, -DisplayText = "", -EntityStatus = EntityStatus.Active, -RelationshipType = "", -RelationshipAttributes = new AtlasStruct -{ -Attributes = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -}, -TypeName = "", -LastModifiedTS = "", -}, -RelationshipGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), -RelationshipStatus = StatusAtlasRelationship.Active, -}}, -Categories = {new AtlasTermCategorizationHeader -{ -CategoryGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), -Description = "", -DisplayText = "", -RelationGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), -Status = AtlasTermRelationshipStatus.Draft, -}}, -Classifies = {default}, -Examples = {""}, -IsA = {default}, -PreferredTerms = {default}, -PreferredToTerms = {default}, -ReplacedBy = {default}, -ReplacementTerms = {default}, -SeeAlso = {default}, -Synonyms = {default}, -TranslatedTerms = {default}, -TranslationTerms = {default}, -Usage = "", -ValidValues = {default}, -ValidValuesFor = {default}, -} - }, includeTermHierarchy: true); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_CreateTerms_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); - - Response> response = await client.CreateTermsAsync(new AtlasGlossaryTerm[] - { -new AtlasGlossaryTerm -{ -Guid = "", -Classifications = {new AtlasClassification -{ -Attributes = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -}, -TypeName = "", -LastModifiedTS = "", -EntityGuid = "", -EntityStatus = EntityStatus.Active, -RemovePropagationsOnEntityDelete = true, -ValidityPeriods = {new TimeBoundary -{ -EndTime = "", -StartTime = "", -TimeZone = "", -}}, -}}, -LongDescription = "", -Name = "", -QualifiedName = "", -ShortDescription = "", -LastModifiedTS = "", -CreateTime = 1234L, -CreatedBy = "", -UpdateTime = 1234L, -UpdatedBy = "", -Abbreviation = "", -TemplateName = {BinaryData.FromObjectAsJson(new object())}, -Anchor = new AtlasGlossaryHeader -{ -DisplayText = "", -GlossaryGuid = "", -RelationGuid = "", -}, -Antonyms = {new AtlasRelatedTermHeader -{ -Description = "", -DisplayText = "", -Expression = "", -RelationGuid = "", -Status = AtlasTermRelationshipStatus.Draft, -Steward = "", -TermGuid = "", -}}, -Status = TermStatus.Draft, -NickName = "", -HierarchyInfo = {new PurviewObjectId -{ -Guid = "", -TypeName = "", -UniqueAttributes = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -}, -Name = "", -DisplayText = "", -ItemPath = "", -ResourceId = "", -Properties = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -}, -}}, -Resources = {new ResourceLink -{ -DisplayName = "", -Url = "", -}}, -Contacts = -{ -["key"] = {new ContactInfo -{ -Id = "", -Info = "", -}} -}, -Attributes = -{ -["key"] = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -} -}, -AssignedEntities = {new AtlasRelatedObjectId -{ -Guid = "", -TypeName = "", -UniqueAttributes = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -}, -DisplayText = "", -EntityStatus = EntityStatus.Active, -RelationshipType = "", -RelationshipAttributes = new AtlasStruct -{ -Attributes = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -}, -TypeName = "", -LastModifiedTS = "", -}, -RelationshipGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), -RelationshipStatus = StatusAtlasRelationship.Active, -}}, -Categories = {new AtlasTermCategorizationHeader -{ -CategoryGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), -Description = "", -DisplayText = "", -RelationGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), -Status = AtlasTermRelationshipStatus.Draft, -}}, -Classifies = {default}, -Examples = {""}, -IsA = {default}, -PreferredTerms = {default}, -PreferredToTerms = {default}, -ReplacedBy = {default}, -ReplacementTerms = {default}, -SeeAlso = {default}, -Synonyms = {default}, -TranslatedTerms = {default}, -TranslationTerms = {default}, -Usage = "", -ValidValues = {default}, -ValidValuesFor = {default}, -} - }, includeTermHierarchy: true); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Glossary_GetEntitiesAssignedWithTerm_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - Response response = client.GetEntitiesAssignedWithTerm("", null, null, null, null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result[0].ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_GetEntitiesAssignedWithTerm_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - Response response = await client.GetEntitiesAssignedWithTermAsync("", null, null, null, null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result[0].ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Glossary_GetEntitiesAssignedWithTerm_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - Response> response = client.GetEntitiesAssignedWithTerm(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_GetEntitiesAssignedWithTerm_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - Response> response = await client.GetEntitiesAssignedWithTermAsync(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Glossary_GetEntitiesAssignedWithTerm_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - Response response = client.GetEntitiesAssignedWithTerm("", 1234, 1234, "", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result[0].GetProperty("guid").ToString()); - Console.WriteLine(result[0].GetProperty("typeName").ToString()); - Console.WriteLine(result[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); - Console.WriteLine(result[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result[0].GetProperty("relationshipType").ToString()); - Console.WriteLine(result[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); - Console.WriteLine(result[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result[0].GetProperty("relationshipGuid").ToString()); - Console.WriteLine(result[0].GetProperty("relationshipStatus").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_GetEntitiesAssignedWithTerm_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - Response response = await client.GetEntitiesAssignedWithTermAsync("", 1234, 1234, "", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result[0].GetProperty("guid").ToString()); - Console.WriteLine(result[0].GetProperty("typeName").ToString()); - Console.WriteLine(result[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); - Console.WriteLine(result[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result[0].GetProperty("relationshipType").ToString()); - Console.WriteLine(result[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); - Console.WriteLine(result[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result[0].GetProperty("relationshipGuid").ToString()); - Console.WriteLine(result[0].GetProperty("relationshipStatus").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Glossary_GetEntitiesAssignedWithTerm_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - Response> response = client.GetEntitiesAssignedWithTerm("", limit: 1234, offset: 1234, sort: ""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_GetEntitiesAssignedWithTerm_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - Response> response = await client.GetEntitiesAssignedWithTermAsync("", limit: 1234, offset: 1234, sort: ""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Glossary_AssignTermToEntities_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - using RequestContent content = RequestContent.Create(new object[] - { -new object() - }); - Response response = client.AssignTermToEntities("", content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_AssignTermToEntities_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - using RequestContent content = RequestContent.Create(new object[] - { -new object() - }); - Response response = await client.AssignTermToEntitiesAsync("", content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Glossary_AssignTermToEntities_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - Response response = client.AssignTermToEntities("", new AtlasRelatedObjectId[] - { -new AtlasRelatedObjectId() - }); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_AssignTermToEntities_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - Response response = await client.AssignTermToEntitiesAsync("", new AtlasRelatedObjectId[] - { -new AtlasRelatedObjectId() - }); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Glossary_AssignTermToEntities_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - using RequestContent content = RequestContent.Create(new object[] - { -new -{ -guid = "", -typeName = "", -uniqueAttributes = new -{ -key = new object(), -}, -displayText = "", -entityStatus = "ACTIVE", -relationshipType = "", -relationshipAttributes = new -{ -attributes = new -{ -key = new object(), -}, -typeName = "", -lastModifiedTS = "", -}, -relationshipGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", -relationshipStatus = "ACTIVE", -} - }); - Response response = client.AssignTermToEntities("", content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_AssignTermToEntities_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - using RequestContent content = RequestContent.Create(new object[] - { -new -{ -guid = "", -typeName = "", -uniqueAttributes = new -{ -key = new object(), -}, -displayText = "", -entityStatus = "ACTIVE", -relationshipType = "", -relationshipAttributes = new -{ -attributes = new -{ -key = new object(), -}, -typeName = "", -lastModifiedTS = "", -}, -relationshipGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", -relationshipStatus = "ACTIVE", -} - }); - Response response = await client.AssignTermToEntitiesAsync("", content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Glossary_AssignTermToEntities_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - Response response = client.AssignTermToEntities("", new AtlasRelatedObjectId[] - { -new AtlasRelatedObjectId -{ -Guid = "", -TypeName = "", -UniqueAttributes = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -}, -DisplayText = "", -EntityStatus = EntityStatus.Active, -RelationshipType = "", -RelationshipAttributes = new AtlasStruct -{ -Attributes = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -}, -TypeName = "", -LastModifiedTS = "", -}, -RelationshipGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), -RelationshipStatus = StatusAtlasRelationship.Active, -} - }); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_AssignTermToEntities_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - Response response = await client.AssignTermToEntitiesAsync("", new AtlasRelatedObjectId[] - { -new AtlasRelatedObjectId -{ -Guid = "", -TypeName = "", -UniqueAttributes = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -}, -DisplayText = "", -EntityStatus = EntityStatus.Active, -RelationshipType = "", -RelationshipAttributes = new AtlasStruct -{ -Attributes = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -}, -TypeName = "", -LastModifiedTS = "", -}, -RelationshipGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), -RelationshipStatus = StatusAtlasRelationship.Active, -} - }); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Glossary_DeleteTermAssignmentFromEntities_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - using RequestContent content = RequestContent.Create(new object[] - { -new object() - }); - Response response = client.DeleteTermAssignmentFromEntities("", content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_DeleteTermAssignmentFromEntities_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - using RequestContent content = RequestContent.Create(new object[] - { -new object() - }); - Response response = await client.DeleteTermAssignmentFromEntitiesAsync("", content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Glossary_DeleteTermAssignmentFromEntities_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - Response response = client.DeleteTermAssignmentFromEntities("", new AtlasRelatedObjectId[] - { -new AtlasRelatedObjectId() - }); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_DeleteTermAssignmentFromEntities_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - Response response = await client.DeleteTermAssignmentFromEntitiesAsync("", new AtlasRelatedObjectId[] - { -new AtlasRelatedObjectId() - }); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Glossary_DeleteTermAssignmentFromEntities_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - using RequestContent content = RequestContent.Create(new object[] - { -new -{ -guid = "", -typeName = "", -uniqueAttributes = new -{ -key = new object(), -}, -displayText = "", -entityStatus = "ACTIVE", -relationshipType = "", -relationshipAttributes = new -{ -attributes = new -{ -key = new object(), -}, -typeName = "", -lastModifiedTS = "", -}, -relationshipGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", -relationshipStatus = "ACTIVE", -} - }); - Response response = client.DeleteTermAssignmentFromEntities("", content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_DeleteTermAssignmentFromEntities_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - using RequestContent content = RequestContent.Create(new object[] - { -new -{ -guid = "", -typeName = "", -uniqueAttributes = new -{ -key = new object(), -}, -displayText = "", -entityStatus = "ACTIVE", -relationshipType = "", -relationshipAttributes = new -{ -attributes = new -{ -key = new object(), -}, -typeName = "", -lastModifiedTS = "", -}, -relationshipGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", -relationshipStatus = "ACTIVE", -} + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_CreateTerm_GlossaryCreateTermWithTemplate_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + using RequestContent content = RequestContent.Create(new + { + name = "ExampleTerm", + anchor = new + { + glossaryGuid = "c018ddaf-7c21-4b37-a838-dae5f110c3d8", + }, + attributes = new + { + ExampleTermTemplateAttribute = new Dictionary + { + ["plain string"] = "Example String", + ["date"] = 1606233600000L, + ["single choice"] = "Example Single Choice A", + ["multi choice"] = new object[] + { +"Example Multi Choice A", +"Example Multi Choice B" + } + }, + }, }); - Response response = await client.DeleteTermAssignmentFromEntitiesAsync("", content); + Response response = await client.CreateTermAsync(content); - Console.WriteLine(response.Status); + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Glossary_DeleteTermAssignmentFromEntities_AllParameters_Convenience() + public void Example_Glossary_CreateTerm_GlossaryCreateTermWithTemplate_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - Response response = client.DeleteTermAssignmentFromEntities("", new AtlasRelatedObjectId[] + AtlasGlossaryTerm body = new AtlasGlossaryTerm { -new AtlasRelatedObjectId -{ -Guid = "", -TypeName = "", -UniqueAttributes = + Name = "ExampleTerm", + Anchor = new AtlasGlossaryHeader + { + GlossaryGuid = "c018ddaf-7c21-4b37-a838-dae5f110c3d8", + }, + Attributes = { -["key"] = BinaryData.FromObjectAsJson(new object()) -}, -DisplayText = "", -EntityStatus = EntityStatus.Active, -RelationshipType = "", -RelationshipAttributes = new AtlasStruct +["ExampleTermTemplateAttribute"] = { -Attributes = +["plain string"] = BinaryData.FromObjectAsJson("Example String"), +["date"] = BinaryData.FromObjectAsJson(1606233600000L), +["single choice"] = BinaryData.FromObjectAsJson("Example Single Choice A"), +["multi choice"] = BinaryData.FromObjectAsJson(new object[] { -["key"] = BinaryData.FromObjectAsJson(new object()) -}, -TypeName = "", -LastModifiedTS = "", -}, -RelationshipGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), -RelationshipStatus = StatusAtlasRelationship.Active, +"Example Multi Choice A", +"Example Multi Choice B" +}) } - }); +}, + }; + Response response = client.CreateTerm(body); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_DeleteTermAssignmentFromEntities_AllParameters_Convenience_Async() + public async Task Example_Glossary_CreateTerm_GlossaryCreateTermWithTemplate_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - Response response = await client.DeleteTermAssignmentFromEntitiesAsync("", new AtlasRelatedObjectId[] + AtlasGlossaryTerm body = new AtlasGlossaryTerm { -new AtlasRelatedObjectId -{ -Guid = "", -TypeName = "", -UniqueAttributes = + Name = "ExampleTerm", + Anchor = new AtlasGlossaryHeader + { + GlossaryGuid = "c018ddaf-7c21-4b37-a838-dae5f110c3d8", + }, + Attributes = { -["key"] = BinaryData.FromObjectAsJson(new object()) -}, -DisplayText = "", -EntityStatus = EntityStatus.Active, -RelationshipType = "", -RelationshipAttributes = new AtlasStruct +["ExampleTermTemplateAttribute"] = { -Attributes = +["plain string"] = BinaryData.FromObjectAsJson("Example String"), +["date"] = BinaryData.FromObjectAsJson(1606233600000L), +["single choice"] = BinaryData.FromObjectAsJson("Example Single Choice A"), +["multi choice"] = BinaryData.FromObjectAsJson(new object[] { -["key"] = BinaryData.FromObjectAsJson(new object()) -}, -TypeName = "", -LastModifiedTS = "", -}, -RelationshipGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), -RelationshipStatus = StatusAtlasRelationship.Active, +"Example Multi Choice A", +"Example Multi Choice B" +}) } - }); +}, + }; + Response response = await client.CreateTermAsync(body); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Glossary_GetRelatedTerms_ShortVersion() + public void Example_Glossary_GetTerm_GlossaryGetTerm() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - Response response = client.GetRelatedTerms("", null, null, null, null); + Response response = client.GetTerm("54688d39-b298-4104-9e80-f2a16f44aaea", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("")[0].ToString()); + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_GetRelatedTerms_ShortVersion_Async() + public async Task Example_Glossary_GetTerm_GlossaryGetTerm_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - Response response = await client.GetRelatedTermsAsync("", null, null, null, null); + Response response = await client.GetTermAsync("54688d39-b298-4104-9e80-f2a16f44aaea", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("")[0].ToString()); + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Glossary_GetRelatedTerms_ShortVersion_Convenience() + public void Example_Glossary_GetTerm_GlossaryGetTerm_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - Response>> response = client.GetRelatedTerms(""); + Response response = client.GetTerm("54688d39-b298-4104-9e80-f2a16f44aaea"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_GetRelatedTerms_ShortVersion_Convenience_Async() + public async Task Example_Glossary_GetTerm_GlossaryGetTerm_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - Response>> response = await client.GetRelatedTermsAsync(""); + Response response = await client.GetTermAsync("54688d39-b298-4104-9e80-f2a16f44aaea"); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Glossary_GetRelatedTerms_AllParameters() + public void Example_Glossary_GetTerm_GlossaryGetTermWithoutAssets() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - Response response = client.GetRelatedTerms("", 1234, 1234, "", null); + Response response = client.GetTerm("54688d39-b298-4104-9e80-f2a16f44aaea", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_GetRelatedTerms_AllParameters_Async() + public async Task Example_Glossary_GetTerm_GlossaryGetTermWithoutAssets_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - Response response = await client.GetRelatedTermsAsync("", 1234, 1234, "", null); + Response response = await client.GetTermAsync("54688d39-b298-4104-9e80-f2a16f44aaea", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Glossary_GetRelatedTerms_AllParameters_Convenience() + public void Example_Glossary_GetTerm_GlossaryGetTermWithoutAssets_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - Response>> response = client.GetRelatedTerms("", limit: 1234, offset: 1234, sort: ""); + Response response = client.GetTerm("54688d39-b298-4104-9e80-f2a16f44aaea"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_GetRelatedTerms_AllParameters_Convenience_Async() + public async Task Example_Glossary_GetTerm_GlossaryGetTermWithoutAssets_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - Response>> response = await client.GetRelatedTermsAsync("", limit: 1234, offset: 1234, sort: ""); + Response response = await client.GetTermAsync("54688d39-b298-4104-9e80-f2a16f44aaea"); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Glossary_GetGlossary_ShortVersion() + public void Example_Glossary_UpdateTerm_GlossaryUpdateTerm() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - Response response = client.GetGlossary("", null); + using RequestContent content = RequestContent.Create(new + { + guid = "54688d39-b298-4104-9e80-f2a16f44aaea", + qualifiedName = "ExampleTerm1@Glossary", + name = "ExampleTerm1", + shortDescription = "Example Short Description", + lastModifiedTS = "1", + abbreviation = "T1", + status = "Approved", + anchor = new + { + glossaryGuid = "c018ddaf-7c21-4b37-a838-dae5f110c3d8", + relationGuid = "7b6a8149-a928-476a-a068-dce58653cfa0", + }, + resources = new object[] + { +new +{ +displayName = "Example Display Name", +url = "Example Url", +} + }, + seeAlso = new object[] + { +new +{ +termGuid = "952c7ba4-4c89-42d8-a05a-7d2161be7008", +}, +new +{ +termGuid = "821beef0-ced9-47ba-8f7f-c4f3459f4d18", +} + }, + synonyms = new object[] + { +new +{ +termGuid = "952c7ba4-4c89-42d8-a05a-7d2161be7008", +}, +new +{ +termGuid = "821beef0-ced9-47ba-8f7f-c4f3459f4d18", +} + }, + }); + Response response = client.UpdateTerm("54688d39-b298-4104-9e80-f2a16f44aaea", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -7273,13 +1266,58 @@ public void Example_Glossary_GetGlossary_ShortVersion() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_GetGlossary_ShortVersion_Async() + public async Task Example_Glossary_UpdateTerm_GlossaryUpdateTerm_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - Response response = await client.GetGlossaryAsync("", null); + using RequestContent content = RequestContent.Create(new + { + guid = "54688d39-b298-4104-9e80-f2a16f44aaea", + qualifiedName = "ExampleTerm1@Glossary", + name = "ExampleTerm1", + shortDescription = "Example Short Description", + lastModifiedTS = "1", + abbreviation = "T1", + status = "Approved", + anchor = new + { + glossaryGuid = "c018ddaf-7c21-4b37-a838-dae5f110c3d8", + relationGuid = "7b6a8149-a928-476a-a068-dce58653cfa0", + }, + resources = new object[] + { +new +{ +displayName = "Example Display Name", +url = "Example Url", +} + }, + seeAlso = new object[] + { +new +{ +termGuid = "952c7ba4-4c89-42d8-a05a-7d2161be7008", +}, +new +{ +termGuid = "821beef0-ced9-47ba-8f7f-c4f3459f4d18", +} + }, + synonyms = new object[] + { +new +{ +termGuid = "952c7ba4-4c89-42d8-a05a-7d2161be7008", +}, +new +{ +termGuid = "821beef0-ced9-47ba-8f7f-c4f3459f4d18", +} + }, + }); + Response response = await client.UpdateTermAsync("54688d39-b298-4104-9e80-f2a16f44aaea", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -7287,150 +1325,133 @@ public async Task Example_Glossary_GetGlossary_ShortVersion_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Glossary_GetGlossary_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - - Response response = client.GetGlossary(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_GetGlossary_ShortVersion_Convenience_Async() + public void Example_Glossary_UpdateTerm_GlossaryUpdateTerm_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - Response response = await client.GetGlossaryAsync(""); + AtlasGlossaryTerm body = new AtlasGlossaryTerm + { + Guid = "54688d39-b298-4104-9e80-f2a16f44aaea", + Name = "ExampleTerm1", + QualifiedName = "ExampleTerm1@Glossary", + ShortDescription = "Example Short Description", + LastModifiedTS = "1", + Abbreviation = "T1", + Anchor = new AtlasGlossaryHeader + { + GlossaryGuid = "c018ddaf-7c21-4b37-a838-dae5f110c3d8", + RelationGuid = "7b6a8149-a928-476a-a068-dce58653cfa0", + }, + Status = TermStatus.Approved, + Resources = {new ResourceLink +{ +DisplayName = "Example Display Name", +Url = "Example Url", +}}, + SeeAlso = {new AtlasRelatedTermHeader +{ +TermGuid = "952c7ba4-4c89-42d8-a05a-7d2161be7008", +}, new AtlasRelatedTermHeader +{ +TermGuid = "821beef0-ced9-47ba-8f7f-c4f3459f4d18", +}}, + Synonyms = {new AtlasRelatedTermHeader +{ +TermGuid = "952c7ba4-4c89-42d8-a05a-7d2161be7008", +}, new AtlasRelatedTermHeader +{ +TermGuid = "821beef0-ced9-47ba-8f7f-c4f3459f4d18", +}}, + }; + Response response = client.UpdateTerm("54688d39-b298-4104-9e80-f2a16f44aaea", body); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Glossary_GetGlossary_AllParameters() + public async Task Example_Glossary_UpdateTerm_GlossaryUpdateTerm_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - Response response = client.GetGlossary("", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("longDescription").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("qualifiedName").ToString()); - Console.WriteLine(result.GetProperty("shortDescription").ToString()); - Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("createTime").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("updateTime").ToString()); - Console.WriteLine(result.GetProperty("updatedBy").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("parentCategoryGuid").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("language").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("usage").ToString()); + AtlasGlossaryTerm body = new AtlasGlossaryTerm + { + Guid = "54688d39-b298-4104-9e80-f2a16f44aaea", + Name = "ExampleTerm1", + QualifiedName = "ExampleTerm1@Glossary", + ShortDescription = "Example Short Description", + LastModifiedTS = "1", + Abbreviation = "T1", + Anchor = new AtlasGlossaryHeader + { + GlossaryGuid = "c018ddaf-7c21-4b37-a838-dae5f110c3d8", + RelationGuid = "7b6a8149-a928-476a-a068-dce58653cfa0", + }, + Status = TermStatus.Approved, + Resources = {new ResourceLink +{ +DisplayName = "Example Display Name", +Url = "Example Url", +}}, + SeeAlso = {new AtlasRelatedTermHeader +{ +TermGuid = "952c7ba4-4c89-42d8-a05a-7d2161be7008", +}, new AtlasRelatedTermHeader +{ +TermGuid = "821beef0-ced9-47ba-8f7f-c4f3459f4d18", +}}, + Synonyms = {new AtlasRelatedTermHeader +{ +TermGuid = "952c7ba4-4c89-42d8-a05a-7d2161be7008", +}, new AtlasRelatedTermHeader +{ +TermGuid = "821beef0-ced9-47ba-8f7f-c4f3459f4d18", +}}, + }; + Response response = await client.UpdateTermAsync("54688d39-b298-4104-9e80-f2a16f44aaea", body); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_GetGlossary_AllParameters_Async() + public void Example_Glossary_DeleteTerm_GlossaryDeleteTerm() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - Response response = await client.GetGlossaryAsync("", null); + Response response = client.DeleteTerm("b0942506-2d7d-1f45-d286-c29ca9e7f2ef"); - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("longDescription").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("qualifiedName").ToString()); - Console.WriteLine(result.GetProperty("shortDescription").ToString()); - Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("createTime").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("updateTime").ToString()); - Console.WriteLine(result.GetProperty("updatedBy").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("parentCategoryGuid").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("language").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("usage").ToString()); + Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Glossary_GetGlossary_AllParameters_Convenience() + public async Task Example_Glossary_DeleteTerm_GlossaryDeleteTerm_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - Response response = client.GetGlossary(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_GetGlossary_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + Response response = await client.DeleteTermAsync("b0942506-2d7d-1f45-d286-c29ca9e7f2ef"); - Response response = await client.GetGlossaryAsync(""); + Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Glossary_Update_ShortVersion() + public void Example_Glossary_PartialUpdateTerm_GlossaryPartialUpdateTerm() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - using RequestContent content = RequestContent.Create(new object()); - Response response = client.Update("", content); + using RequestContent content = RequestContent.Create(new + { + longDescription = "Example Long Description", + }); + Response response = client.PartialUpdateTerm("54688d39-b298-4104-9e80-f2a16f44aaea", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -7438,14 +1459,17 @@ public void Example_Glossary_Update_ShortVersion() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_Update_ShortVersion_Async() + public async Task Example_Glossary_PartialUpdateTerm_GlossaryPartialUpdateTerm_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - using RequestContent content = RequestContent.Create(new object()); - Response response = await client.UpdateAsync("", content); + using RequestContent content = RequestContent.Create(new + { + longDescription = "Example Long Description", + }); + Response response = await client.PartialUpdateTermAsync("54688d39-b298-4104-9e80-f2a16f44aaea", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -7453,715 +1477,640 @@ public async Task Example_Glossary_Update_ShortVersion_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Glossary_Update_ShortVersion_Convenience() + public void Example_Glossary_PartialUpdateTerm_GlossaryPartialUpdateTerm_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - AtlasGlossary body = new AtlasGlossary(); - Response response = client.Update("", body); + Response response = client.PartialUpdateTerm("54688d39-b298-4104-9e80-f2a16f44aaea", new Dictionary + { + ["longDescription"] = "Example Long Description" + }); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_Update_ShortVersion_Convenience_Async() + public async Task Example_Glossary_PartialUpdateTerm_GlossaryPartialUpdateTerm_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - AtlasGlossary body = new AtlasGlossary(); - Response response = await client.UpdateAsync("", body); + Response response = await client.PartialUpdateTermAsync("54688d39-b298-4104-9e80-f2a16f44aaea", new Dictionary + { + ["longDescription"] = "Example Long Description" + }); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Glossary_Update_AllParameters() + public void Example_Glossary_CreateTerms_GlossaryCreateTerms() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - using RequestContent content = RequestContent.Create(new - { - guid = "", - classifications = new object[] + using RequestContent content = RequestContent.Create(new object[] { new { -attributes = new +anchor = new { -key = new object(), +glossaryGuid = "c018ddaf-7c21-4b37-a838-dae5f110c3d8", }, -typeName = "", -lastModifiedTS = "", -entityGuid = "", -entityStatus = "ACTIVE", -removePropagationsOnEntityDelete = true, -validityPeriods = new object[] +name = "ExampleTerm2", +status = "Approved", +shortDescription = "Example Short Description", +longDescription = "Example Long Description", +abbreviation = "T2", +resources = new object[] { new { -endTime = "", -startTime = "", -timeZone = "", +displayName = "Example Display Name", +url = "Example Url", } }, -} - }, - longDescription = "", - name = "", - qualifiedName = "", - shortDescription = "", - lastModifiedTS = "", - createTime = 1234L, - createdBy = "", - updateTime = 1234L, - updatedBy = "", - categories = new object[] - { +}, new { -categoryGuid = "", -description = "", -displayText = "", -parentCategoryGuid = "", -relationGuid = "", -} - }, - language = "", - terms = new object[] - { +anchor = new +{ +glossaryGuid = "c018ddaf-7c21-4b37-a838-dae5f110c3d8", +}, +name = "ExampleTerm3", +status = "Approved", +shortDescription = "Example Short Description", +longDescription = "Example Long Description", +abbreviation = "T3", +resources = new object[] +{ new { -description = "", -displayText = "", -expression = "", -relationGuid = "", -status = "DRAFT", -steward = "", -termGuid = "", +displayName = "Example Display Name", +url = "Example Url", +} +}, } - }, - usage = "", }); - Response response = client.Update("", content, ignoreTermsAndCategories: true); + Response response = client.CreateTerms(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("longDescription").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("qualifiedName").ToString()); - Console.WriteLine(result.GetProperty("shortDescription").ToString()); - Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("createTime").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("updateTime").ToString()); - Console.WriteLine(result.GetProperty("updatedBy").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("parentCategoryGuid").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("language").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("usage").ToString()); + Console.WriteLine(result[0].ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_Update_AllParameters_Async() + public async Task Example_Glossary_CreateTerms_GlossaryCreateTerms_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - using RequestContent content = RequestContent.Create(new - { - guid = "", - classifications = new object[] + using RequestContent content = RequestContent.Create(new object[] { new { -attributes = new +anchor = new { -key = new object(), +glossaryGuid = "c018ddaf-7c21-4b37-a838-dae5f110c3d8", }, -typeName = "", -lastModifiedTS = "", -entityGuid = "", -entityStatus = "ACTIVE", -removePropagationsOnEntityDelete = true, -validityPeriods = new object[] +name = "ExampleTerm2", +status = "Approved", +shortDescription = "Example Short Description", +longDescription = "Example Long Description", +abbreviation = "T2", +resources = new object[] { new { -endTime = "", -startTime = "", -timeZone = "", +displayName = "Example Display Name", +url = "Example Url", } }, -} - }, - longDescription = "", - name = "", - qualifiedName = "", - shortDescription = "", - lastModifiedTS = "", - createTime = 1234L, - createdBy = "", - updateTime = 1234L, - updatedBy = "", - categories = new object[] - { +}, new { -categoryGuid = "", -description = "", -displayText = "", -parentCategoryGuid = "", -relationGuid = "", -} - }, - language = "", - terms = new object[] - { +anchor = new +{ +glossaryGuid = "c018ddaf-7c21-4b37-a838-dae5f110c3d8", +}, +name = "ExampleTerm3", +status = "Approved", +shortDescription = "Example Short Description", +longDescription = "Example Long Description", +abbreviation = "T3", +resources = new object[] +{ new { -description = "", -displayText = "", -expression = "", -relationGuid = "", -status = "DRAFT", -steward = "", -termGuid = "", +displayName = "Example Display Name", +url = "Example Url", +} +}, } - }, - usage = "", }); - Response response = await client.UpdateAsync("", content, ignoreTermsAndCategories: true); + Response response = await client.CreateTermsAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("longDescription").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("qualifiedName").ToString()); - Console.WriteLine(result.GetProperty("shortDescription").ToString()); - Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("createTime").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("updateTime").ToString()); - Console.WriteLine(result.GetProperty("updatedBy").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("parentCategoryGuid").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("language").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("usage").ToString()); + Console.WriteLine(result[0].ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Glossary_Update_AllParameters_Convenience() + public void Example_Glossary_CreateTerms_GlossaryCreateTerms_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - AtlasGlossary body = new AtlasGlossary + Response> response = client.CreateTerms(new AtlasGlossaryTerm[] { - Guid = "", - Classifications = {new AtlasClassification +new AtlasGlossaryTerm { -Attributes = +LongDescription = "Example Long Description", +Name = "ExampleTerm2", +ShortDescription = "Example Short Description", +Abbreviation = "T2", +Anchor = new AtlasGlossaryHeader { -["key"] = BinaryData.FromObjectAsJson(new object()) +GlossaryGuid = "c018ddaf-7c21-4b37-a838-dae5f110c3d8", }, -TypeName = "", -LastModifiedTS = "", -EntityGuid = "", -EntityStatus = EntityStatus.Active, -RemovePropagationsOnEntityDelete = true, -ValidityPeriods = {new TimeBoundary -{ -EndTime = "", -StartTime = "", -TimeZone = "", -}}, -}}, - LongDescription = "", - Name = "", - QualifiedName = "", - ShortDescription = "", - LastModifiedTS = "", - CreateTime = 1234L, - CreatedBy = "", - UpdateTime = 1234L, - UpdatedBy = "", - Categories = {new AtlasRelatedCategoryHeader +Status = TermStatus.Approved, +Resources = {new ResourceLink { -CategoryGuid = "", -Description = "", -DisplayText = "", -ParentCategoryGuid = "", -RelationGuid = "", +DisplayName = "Example Display Name", +Url = "Example Url", }}, - Language = "", - Terms = {new AtlasRelatedTermHeader +}, +new AtlasGlossaryTerm +{ +LongDescription = "Example Long Description", +Name = "ExampleTerm3", +ShortDescription = "Example Short Description", +Abbreviation = "T3", +Anchor = new AtlasGlossaryHeader +{ +GlossaryGuid = "c018ddaf-7c21-4b37-a838-dae5f110c3d8", +}, +Status = TermStatus.Approved, +Resources = {new ResourceLink { -Description = "", -DisplayText = "", -Expression = "", -RelationGuid = "", -Status = AtlasTermRelationshipStatus.Draft, -Steward = "", -TermGuid = "", +DisplayName = "Example Display Name", +Url = "Example Url", }}, - Usage = "", - }; - Response response = client.Update("", body, ignoreTermsAndCategories: true); +} + }); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_Update_AllParameters_Convenience_Async() + public async Task Example_Glossary_CreateTerms_GlossaryCreateTerms_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - AtlasGlossary body = new AtlasGlossary + Response> response = await client.CreateTermsAsync(new AtlasGlossaryTerm[] { - Guid = "", - Classifications = {new AtlasClassification +new AtlasGlossaryTerm { -Attributes = +LongDescription = "Example Long Description", +Name = "ExampleTerm2", +ShortDescription = "Example Short Description", +Abbreviation = "T2", +Anchor = new AtlasGlossaryHeader { -["key"] = BinaryData.FromObjectAsJson(new object()) +GlossaryGuid = "c018ddaf-7c21-4b37-a838-dae5f110c3d8", }, -TypeName = "", -LastModifiedTS = "", -EntityGuid = "", -EntityStatus = EntityStatus.Active, -RemovePropagationsOnEntityDelete = true, -ValidityPeriods = {new TimeBoundary -{ -EndTime = "", -StartTime = "", -TimeZone = "", -}}, -}}, - LongDescription = "", - Name = "", - QualifiedName = "", - ShortDescription = "", - LastModifiedTS = "", - CreateTime = 1234L, - CreatedBy = "", - UpdateTime = 1234L, - UpdatedBy = "", - Categories = {new AtlasRelatedCategoryHeader +Status = TermStatus.Approved, +Resources = {new ResourceLink { -CategoryGuid = "", -Description = "", -DisplayText = "", -ParentCategoryGuid = "", -RelationGuid = "", +DisplayName = "Example Display Name", +Url = "Example Url", }}, - Language = "", - Terms = {new AtlasRelatedTermHeader +}, +new AtlasGlossaryTerm +{ +LongDescription = "Example Long Description", +Name = "ExampleTerm3", +ShortDescription = "Example Short Description", +Abbreviation = "T3", +Anchor = new AtlasGlossaryHeader +{ +GlossaryGuid = "c018ddaf-7c21-4b37-a838-dae5f110c3d8", +}, +Status = TermStatus.Approved, +Resources = {new ResourceLink { -Description = "", -DisplayText = "", -Expression = "", -RelationGuid = "", -Status = AtlasTermRelationshipStatus.Draft, -Steward = "", -TermGuid = "", +DisplayName = "Example Display Name", +Url = "Example Url", }}, - Usage = "", - }; - Response response = await client.UpdateAsync("", body, ignoreTermsAndCategories: true); +} + }); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Glossary_Delete_ShortVersion() + public void Example_Glossary_GetEntitiesAssignedWithTerm_GlossaryListEntitiesAssignedWithTerm() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - Response response = client.Delete(""); + Response response = client.GetEntitiesAssignedWithTerm("daf0ba4d-bc9a-4536-8a88-4b58e39dd3d4", null, null, "ASC", null); - Console.WriteLine(response.Status); + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result[0].ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_Delete_ShortVersion_Async() + public async Task Example_Glossary_GetEntitiesAssignedWithTerm_GlossaryListEntitiesAssignedWithTerm_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - Response response = await client.DeleteAsync(""); + Response response = await client.GetEntitiesAssignedWithTermAsync("daf0ba4d-bc9a-4536-8a88-4b58e39dd3d4", null, null, "ASC", null); - Console.WriteLine(response.Status); + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result[0].ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Glossary_Delete_AllParameters() + public void Example_Glossary_GetEntitiesAssignedWithTerm_GlossaryListEntitiesAssignedWithTerm_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - Response response = client.Delete(""); - - Console.WriteLine(response.Status); + Response> response = client.GetEntitiesAssignedWithTerm("daf0ba4d-bc9a-4536-8a88-4b58e39dd3d4"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_Delete_AllParameters_Async() + public async Task Example_Glossary_GetEntitiesAssignedWithTerm_GlossaryListEntitiesAssignedWithTerm_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - Response response = await client.DeleteAsync(""); - - Console.WriteLine(response.Status); + Response> response = await client.GetEntitiesAssignedWithTermAsync("daf0ba4d-bc9a-4536-8a88-4b58e39dd3d4"); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Glossary_GetCategories_ShortVersion() + public void Example_Glossary_AssignTermToEntities_GlossaryAssignTermToEntities() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - Response response = client.GetCategories("", null, null, null, null); + using RequestContent content = RequestContent.Create(new object[] + { +new +{ +guid = "ab9f1920-0b94-436d-aeb4-11a32c270fc0", +relationshipAttributes = new +{ +attributes = new +{ +expression = "Example Expression", +confidence = 100, +description = "Example Description", +source = "ExampleSource", +}, +}, +} + }); + Response response = client.AssignTermToEntities("8a7f65ec-6429-0b9b-3734-ec57bf1e34c2", content); - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_GetCategories_ShortVersion_Async() + public async Task Example_Glossary_AssignTermToEntities_GlossaryAssignTermToEntities_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - Response response = await client.GetCategoriesAsync("", null, null, null, null); + using RequestContent content = RequestContent.Create(new object[] + { +new +{ +guid = "ab9f1920-0b94-436d-aeb4-11a32c270fc0", +relationshipAttributes = new +{ +attributes = new +{ +expression = "Example Expression", +confidence = 100, +description = "Example Description", +source = "ExampleSource", +}, +}, +} + }); + Response response = await client.AssignTermToEntitiesAsync("8a7f65ec-6429-0b9b-3734-ec57bf1e34c2", content); - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Glossary_GetCategories_ShortVersion_Convenience() + public void Example_Glossary_AssignTermToEntities_GlossaryAssignTermToEntities_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - Response> response = client.GetCategories(""); + Response response = client.AssignTermToEntities("8a7f65ec-6429-0b9b-3734-ec57bf1e34c2", new AtlasRelatedObjectId[] + { +new AtlasRelatedObjectId +{ +Guid = "ab9f1920-0b94-436d-aeb4-11a32c270fc0", +RelationshipAttributes = new AtlasStruct +{ +Attributes = +{ +["expression"] = BinaryData.FromObjectAsJson("Example Expression"), +["confidence"] = BinaryData.FromObjectAsJson(100), +["description"] = BinaryData.FromObjectAsJson("Example Description"), +["source"] = BinaryData.FromObjectAsJson("ExampleSource") +}, +}, +} + }); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_GetCategories_ShortVersion_Convenience_Async() + public async Task Example_Glossary_AssignTermToEntities_GlossaryAssignTermToEntities_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - Response> response = await client.GetCategoriesAsync(""); + Response response = await client.AssignTermToEntitiesAsync("8a7f65ec-6429-0b9b-3734-ec57bf1e34c2", new AtlasRelatedObjectId[] + { +new AtlasRelatedObjectId +{ +Guid = "ab9f1920-0b94-436d-aeb4-11a32c270fc0", +RelationshipAttributes = new AtlasStruct +{ +Attributes = +{ +["expression"] = BinaryData.FromObjectAsJson("Example Expression"), +["confidence"] = BinaryData.FromObjectAsJson(100), +["description"] = BinaryData.FromObjectAsJson("Example Description"), +["source"] = BinaryData.FromObjectAsJson("ExampleSource") +}, +}, +} + }); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Glossary_GetCategories_AllParameters() + public void Example_Glossary_DeleteTermAssignmentFromEntities_GlossaryRemoveTermAssignmentFromEntities() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - Response response = client.GetCategories("", 1234, 1234, "", null); + using RequestContent content = RequestContent.Create(new object[] + { +new +{ +guid = "16feb2a1-2c79-ade1-338d-fb24fcb8b8bd", +relationshipGuid = "624f08bb-3c93-4f03-9ce1-ed2ce2c7c8d5", +} + }); + Response response = client.DeleteTermAssignmentFromEntities("8a7f65ec-6429-0b9b-3734-ec57bf1e34c2", content); - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result[0].GetProperty("guid").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result[0].GetProperty("longDescription").ToString()); - Console.WriteLine(result[0].GetProperty("name").ToString()); - Console.WriteLine(result[0].GetProperty("qualifiedName").ToString()); - Console.WriteLine(result[0].GetProperty("shortDescription").ToString()); - Console.WriteLine(result[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result[0].GetProperty("createTime").ToString()); - Console.WriteLine(result[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result[0].GetProperty("updateTime").ToString()); - Console.WriteLine(result[0].GetProperty("updatedBy").ToString()); - Console.WriteLine(result[0].GetProperty("anchor").GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("anchor").GetProperty("glossaryGuid").ToString()); - Console.WriteLine(result[0].GetProperty("anchor").GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("childrenCategories")[0].GetProperty("categoryGuid").ToString()); - Console.WriteLine(result[0].GetProperty("childrenCategories")[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("childrenCategories")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("childrenCategories")[0].GetProperty("parentCategoryGuid").ToString()); - Console.WriteLine(result[0].GetProperty("childrenCategories")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("parentCategory").GetProperty("categoryGuid").ToString()); - Console.WriteLine(result[0].GetProperty("parentCategory").GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("parentCategory").GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("parentCategory").GetProperty("parentCategoryGuid").ToString()); - Console.WriteLine(result[0].GetProperty("parentCategory").GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_GetCategories_AllParameters_Async() + public async Task Example_Glossary_DeleteTermAssignmentFromEntities_GlossaryRemoveTermAssignmentFromEntities_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - Response response = await client.GetCategoriesAsync("", 1234, 1234, "", null); + using RequestContent content = RequestContent.Create(new object[] + { +new +{ +guid = "16feb2a1-2c79-ade1-338d-fb24fcb8b8bd", +relationshipGuid = "624f08bb-3c93-4f03-9ce1-ed2ce2c7c8d5", +} + }); + Response response = await client.DeleteTermAssignmentFromEntitiesAsync("8a7f65ec-6429-0b9b-3734-ec57bf1e34c2", content); - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result[0].GetProperty("guid").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result[0].GetProperty("longDescription").ToString()); - Console.WriteLine(result[0].GetProperty("name").ToString()); - Console.WriteLine(result[0].GetProperty("qualifiedName").ToString()); - Console.WriteLine(result[0].GetProperty("shortDescription").ToString()); - Console.WriteLine(result[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result[0].GetProperty("createTime").ToString()); - Console.WriteLine(result[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result[0].GetProperty("updateTime").ToString()); - Console.WriteLine(result[0].GetProperty("updatedBy").ToString()); - Console.WriteLine(result[0].GetProperty("anchor").GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("anchor").GetProperty("glossaryGuid").ToString()); - Console.WriteLine(result[0].GetProperty("anchor").GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("childrenCategories")[0].GetProperty("categoryGuid").ToString()); - Console.WriteLine(result[0].GetProperty("childrenCategories")[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("childrenCategories")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("childrenCategories")[0].GetProperty("parentCategoryGuid").ToString()); - Console.WriteLine(result[0].GetProperty("childrenCategories")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("parentCategory").GetProperty("categoryGuid").ToString()); - Console.WriteLine(result[0].GetProperty("parentCategory").GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("parentCategory").GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("parentCategory").GetProperty("parentCategoryGuid").ToString()); - Console.WriteLine(result[0].GetProperty("parentCategory").GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Glossary_GetCategories_AllParameters_Convenience() + public void Example_Glossary_DeleteTermAssignmentFromEntities_GlossaryRemoveTermAssignmentFromEntities_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - Response> response = client.GetCategories("", limit: 1234, offset: 1234, sort: ""); + Response response = client.DeleteTermAssignmentFromEntities("8a7f65ec-6429-0b9b-3734-ec57bf1e34c2", new AtlasRelatedObjectId[] + { +new AtlasRelatedObjectId +{ +Guid = "16feb2a1-2c79-ade1-338d-fb24fcb8b8bd", +RelationshipGuid = Guid.Parse("624f08bb-3c93-4f03-9ce1-ed2ce2c7c8d5"), +} + }); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_GetCategories_AllParameters_Convenience_Async() + public async Task Example_Glossary_DeleteTermAssignmentFromEntities_GlossaryRemoveTermAssignmentFromEntities_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - Response> response = await client.GetCategoriesAsync("", limit: 1234, offset: 1234, sort: ""); + Response response = await client.DeleteTermAssignmentFromEntitiesAsync("8a7f65ec-6429-0b9b-3734-ec57bf1e34c2", new AtlasRelatedObjectId[] + { +new AtlasRelatedObjectId +{ +Guid = "16feb2a1-2c79-ade1-338d-fb24fcb8b8bd", +RelationshipGuid = Guid.Parse("624f08bb-3c93-4f03-9ce1-ed2ce2c7c8d5"), +} + }); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Glossary_GetCategoriesHeaders_ShortVersion() + public void Example_Glossary_GetRelatedTerms_GlossaryListRelatedTerms() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - Response response = client.GetCategoriesHeaders("", null, null, null, null); + Response response = client.GetRelatedTerms("54688d39-b298-4104-9e80-f2a16f44aaea", null, null, "ASC", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.GetProperty("")[0].ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_GetCategoriesHeaders_ShortVersion_Async() + public async Task Example_Glossary_GetRelatedTerms_GlossaryListRelatedTerms_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - Response response = await client.GetCategoriesHeadersAsync("", null, null, null, null); + Response response = await client.GetRelatedTermsAsync("54688d39-b298-4104-9e80-f2a16f44aaea", null, null, "ASC", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.GetProperty("")[0].ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Glossary_GetCategoriesHeaders_ShortVersion_Convenience() + public void Example_Glossary_GetRelatedTerms_GlossaryListRelatedTerms_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - Response> response = client.GetCategoriesHeaders(""); + Response>> response = client.GetRelatedTerms("54688d39-b298-4104-9e80-f2a16f44aaea"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_GetCategoriesHeaders_ShortVersion_Convenience_Async() + public async Task Example_Glossary_GetRelatedTerms_GlossaryListRelatedTerms_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - Response> response = await client.GetCategoriesHeadersAsync(""); + Response>> response = await client.GetRelatedTermsAsync("54688d39-b298-4104-9e80-f2a16f44aaea"); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Glossary_GetCategoriesHeaders_AllParameters() + public void Example_Glossary_GetGlossary_GlossaryGet() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - Response response = client.GetCategoriesHeaders("", 1234, 1234, "", null); + Response response = client.GetGlossary("47029611-67a1-42d5-8766-90eb904f7f22", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result[0].GetProperty("categoryGuid").ToString()); - Console.WriteLine(result[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("parentCategoryGuid").ToString()); - Console.WriteLine(result[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_GetCategoriesHeaders_AllParameters_Async() + public async Task Example_Glossary_GetGlossary_GlossaryGet_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - Response response = await client.GetCategoriesHeadersAsync("", 1234, 1234, "", null); + Response response = await client.GetGlossaryAsync("47029611-67a1-42d5-8766-90eb904f7f22", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result[0].GetProperty("categoryGuid").ToString()); - Console.WriteLine(result[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("parentCategoryGuid").ToString()); - Console.WriteLine(result[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Glossary_GetCategoriesHeaders_AllParameters_Convenience() + public void Example_Glossary_GetGlossary_GlossaryGet_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - Response> response = client.GetCategoriesHeaders("", limit: 1234, offset: 1234, sort: ""); + Response response = client.GetGlossary("47029611-67a1-42d5-8766-90eb904f7f22"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_GetCategoriesHeaders_AllParameters_Convenience_Async() + public async Task Example_Glossary_GetGlossary_GlossaryGet_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - Response> response = await client.GetCategoriesHeadersAsync("", limit: 1234, offset: 1234, sort: ""); + Response response = await client.GetGlossaryAsync("47029611-67a1-42d5-8766-90eb904f7f22"); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Glossary_GetDetailed_ShortVersion() + public void Example_Glossary_Update_GlossaryUpdate() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - Response response = client.GetDetailed("", null); + using RequestContent content = RequestContent.Create(new + { + guid = "c018ddaf-7c21-4b37-a838-dae5f110c3d8", + qualifiedName = "Glossary", + name = "Glossary", + shortDescription = "Example Short Description", + longDescription = "Example Long Description", + lastModifiedTS = "1", + language = "en", + usage = "Example Glossary", + terms = new object[] + { +new +{ +termGuid = "54688d39-b298-4104-9e80-f2a16f44aaea", +relationGuid = "7b6a8149-a928-476a-a068-dce58653cfa0", +displayText = "ExampleTerm1", +}, +new +{ +termGuid = "952c7ba4-4c89-42d8-a05a-7d2161be7008", +relationGuid = "9385640b-e6be-437d-a6b9-62d11c14a189", +displayText = "ExampleTerm2", +} + }, + categories = new object[] + { +new +{ +categoryGuid = "0d6766f6-f4b6-435b-bda2-d3edc358998e", +parentCategoryGuid = "ed7458f0-9463-48a5-b5c6-4f785fb34e12", +relationGuid = "26a486a4-a8e2-483c-8a84-3b88e909f8d2", +displayText = "ExampleCategory3", +}, +new +{ +categoryGuid = "ed7458f0-9463-48a5-b5c6-4f785fb34e12", +parentCategoryGuid = "e47c4584-daca-4f9e-9092-194e04692c9a", +relationGuid = "7bdcef93-a57a-4d1d-95ab-9d3036f394a0", +displayText = "ExampleCategory1", +}, +new +{ +categoryGuid = "e47c4584-daca-4f9e-9092-194e04692c9a", +relationGuid = "94071e56-fd3e-4441-93ff-1834f818482d", +displayText = "ExampleCategory2", +} + }, + }); + Response response = client.Update("c018ddaf-7c21-4b37-a838-dae5f110c3d8", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -8169,13 +2118,62 @@ public void Example_Glossary_GetDetailed_ShortVersion() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_GetDetailed_ShortVersion_Async() + public async Task Example_Glossary_Update_GlossaryUpdate_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - Response response = await client.GetDetailedAsync("", null); + using RequestContent content = RequestContent.Create(new + { + guid = "c018ddaf-7c21-4b37-a838-dae5f110c3d8", + qualifiedName = "Glossary", + name = "Glossary", + shortDescription = "Example Short Description", + longDescription = "Example Long Description", + lastModifiedTS = "1", + language = "en", + usage = "Example Glossary", + terms = new object[] + { +new +{ +termGuid = "54688d39-b298-4104-9e80-f2a16f44aaea", +relationGuid = "7b6a8149-a928-476a-a068-dce58653cfa0", +displayText = "ExampleTerm1", +}, +new +{ +termGuid = "952c7ba4-4c89-42d8-a05a-7d2161be7008", +relationGuid = "9385640b-e6be-437d-a6b9-62d11c14a189", +displayText = "ExampleTerm2", +} + }, + categories = new object[] + { +new +{ +categoryGuid = "0d6766f6-f4b6-435b-bda2-d3edc358998e", +parentCategoryGuid = "ed7458f0-9463-48a5-b5c6-4f785fb34e12", +relationGuid = "26a486a4-a8e2-483c-8a84-3b88e909f8d2", +displayText = "ExampleCategory3", +}, +new +{ +categoryGuid = "ed7458f0-9463-48a5-b5c6-4f785fb34e12", +parentCategoryGuid = "e47c4584-daca-4f9e-9092-194e04692c9a", +relationGuid = "7bdcef93-a57a-4d1d-95ab-9d3036f394a0", +displayText = "ExampleCategory1", +}, +new +{ +categoryGuid = "e47c4584-daca-4f9e-9092-194e04692c9a", +relationGuid = "94071e56-fd3e-4441-93ff-1834f818482d", +displayText = "ExampleCategory2", +} + }, + }); + Response response = await client.UpdateAsync("c018ddaf-7c21-4b37-a838-dae5f110c3d8", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -8183,1109 +2181,355 @@ public async Task Example_Glossary_GetDetailed_ShortVersion_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Glossary_GetDetailed_ShortVersion_Convenience() + public void Example_Glossary_Update_GlossaryUpdate_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - Response response = client.GetDetailed(""); + AtlasGlossary body = new AtlasGlossary + { + Guid = "c018ddaf-7c21-4b37-a838-dae5f110c3d8", + LongDescription = "Example Long Description", + Name = "Glossary", + QualifiedName = "Glossary", + ShortDescription = "Example Short Description", + LastModifiedTS = "1", + Categories = {new AtlasRelatedCategoryHeader +{ +CategoryGuid = "0d6766f6-f4b6-435b-bda2-d3edc358998e", +DisplayText = "ExampleCategory3", +ParentCategoryGuid = "ed7458f0-9463-48a5-b5c6-4f785fb34e12", +RelationGuid = "26a486a4-a8e2-483c-8a84-3b88e909f8d2", +}, new AtlasRelatedCategoryHeader +{ +CategoryGuid = "ed7458f0-9463-48a5-b5c6-4f785fb34e12", +DisplayText = "ExampleCategory1", +ParentCategoryGuid = "e47c4584-daca-4f9e-9092-194e04692c9a", +RelationGuid = "7bdcef93-a57a-4d1d-95ab-9d3036f394a0", +}, new AtlasRelatedCategoryHeader +{ +CategoryGuid = "e47c4584-daca-4f9e-9092-194e04692c9a", +DisplayText = "ExampleCategory2", +RelationGuid = "94071e56-fd3e-4441-93ff-1834f818482d", +}}, + Language = "en", + Terms = {new AtlasRelatedTermHeader +{ +DisplayText = "ExampleTerm1", +RelationGuid = "7b6a8149-a928-476a-a068-dce58653cfa0", +TermGuid = "54688d39-b298-4104-9e80-f2a16f44aaea", +}, new AtlasRelatedTermHeader +{ +DisplayText = "ExampleTerm2", +RelationGuid = "9385640b-e6be-437d-a6b9-62d11c14a189", +TermGuid = "952c7ba4-4c89-42d8-a05a-7d2161be7008", +}}, + Usage = "Example Glossary", + }; + Response response = client.Update("c018ddaf-7c21-4b37-a838-dae5f110c3d8", body); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_GetDetailed_ShortVersion_Convenience_Async() + public async Task Example_Glossary_Update_GlossaryUpdate_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - Response response = await client.GetDetailedAsync(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Glossary_GetDetailed_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); - - Response response = client.GetDetailed("", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("longDescription").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("qualifiedName").ToString()); - Console.WriteLine(result.GetProperty("shortDescription").ToString()); - Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("createTime").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("updateTime").ToString()); - Console.WriteLine(result.GetProperty("updatedBy").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("parentCategoryGuid").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("language").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("usage").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("longDescription").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("qualifiedName").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("shortDescription").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("createTime").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("updateTime").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("updatedBy").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("anchor").GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("anchor").GetProperty("glossaryGuid").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("anchor").GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("childrenCategories")[0].GetProperty("categoryGuid").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("childrenCategories")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("childrenCategories")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("childrenCategories")[0].GetProperty("parentCategoryGuid").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("childrenCategories")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("parentCategory").GetProperty("categoryGuid").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("parentCategory").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("parentCategory").GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("parentCategory").GetProperty("parentCategoryGuid").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("parentCategory").GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("longDescription").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("qualifiedName").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("shortDescription").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("createTime").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("updateTime").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("updatedBy").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("abbreviation").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("templateName")[0].ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("anchor").GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("anchor").GetProperty("glossaryGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("anchor").GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("nickName").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("hierarchyInfo")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("hierarchyInfo")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("hierarchyInfo")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("hierarchyInfo")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("hierarchyInfo")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("hierarchyInfo")[0].GetProperty("itemPath").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("hierarchyInfo")[0].GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("hierarchyInfo")[0].GetProperty("properties").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("resources")[0].GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("resources")[0].GetProperty("url").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("attributes").GetProperty("").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("categories")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("categories")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("categories")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("categories")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("examples")[0].ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("usage").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("termGuid").ToString()); + AtlasGlossary body = new AtlasGlossary + { + Guid = "c018ddaf-7c21-4b37-a838-dae5f110c3d8", + LongDescription = "Example Long Description", + Name = "Glossary", + QualifiedName = "Glossary", + ShortDescription = "Example Short Description", + LastModifiedTS = "1", + Categories = {new AtlasRelatedCategoryHeader +{ +CategoryGuid = "0d6766f6-f4b6-435b-bda2-d3edc358998e", +DisplayText = "ExampleCategory3", +ParentCategoryGuid = "ed7458f0-9463-48a5-b5c6-4f785fb34e12", +RelationGuid = "26a486a4-a8e2-483c-8a84-3b88e909f8d2", +}, new AtlasRelatedCategoryHeader +{ +CategoryGuid = "ed7458f0-9463-48a5-b5c6-4f785fb34e12", +DisplayText = "ExampleCategory1", +ParentCategoryGuid = "e47c4584-daca-4f9e-9092-194e04692c9a", +RelationGuid = "7bdcef93-a57a-4d1d-95ab-9d3036f394a0", +}, new AtlasRelatedCategoryHeader +{ +CategoryGuid = "e47c4584-daca-4f9e-9092-194e04692c9a", +DisplayText = "ExampleCategory2", +RelationGuid = "94071e56-fd3e-4441-93ff-1834f818482d", +}}, + Language = "en", + Terms = {new AtlasRelatedTermHeader +{ +DisplayText = "ExampleTerm1", +RelationGuid = "7b6a8149-a928-476a-a068-dce58653cfa0", +TermGuid = "54688d39-b298-4104-9e80-f2a16f44aaea", +}, new AtlasRelatedTermHeader +{ +DisplayText = "ExampleTerm2", +RelationGuid = "9385640b-e6be-437d-a6b9-62d11c14a189", +TermGuid = "952c7ba4-4c89-42d8-a05a-7d2161be7008", +}}, + Usage = "Example Glossary", + }; + Response response = await client.UpdateAsync("c018ddaf-7c21-4b37-a838-dae5f110c3d8", body); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_GetDetailed_AllParameters_Async() + public void Example_Glossary_Delete_GlossaryDelete() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - Response response = await client.GetDetailedAsync("", null); + Response response = client.Delete("c0c54153-13d1-1608-13af-43457cdffe75"); - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("longDescription").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("qualifiedName").ToString()); - Console.WriteLine(result.GetProperty("shortDescription").ToString()); - Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("createTime").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("updateTime").ToString()); - Console.WriteLine(result.GetProperty("updatedBy").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("parentCategoryGuid").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("language").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("usage").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("longDescription").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("qualifiedName").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("shortDescription").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("createTime").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("updateTime").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("updatedBy").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("anchor").GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("anchor").GetProperty("glossaryGuid").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("anchor").GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("childrenCategories")[0].GetProperty("categoryGuid").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("childrenCategories")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("childrenCategories")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("childrenCategories")[0].GetProperty("parentCategoryGuid").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("childrenCategories")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("parentCategory").GetProperty("categoryGuid").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("parentCategory").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("parentCategory").GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("parentCategory").GetProperty("parentCategoryGuid").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("parentCategory").GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("longDescription").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("qualifiedName").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("shortDescription").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("createTime").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("updateTime").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("updatedBy").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("abbreviation").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("templateName")[0].ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("anchor").GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("anchor").GetProperty("glossaryGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("anchor").GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("nickName").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("hierarchyInfo")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("hierarchyInfo")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("hierarchyInfo")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("hierarchyInfo")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("hierarchyInfo")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("hierarchyInfo")[0].GetProperty("itemPath").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("hierarchyInfo")[0].GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("hierarchyInfo")[0].GetProperty("properties").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("resources")[0].GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("resources")[0].GetProperty("url").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("attributes").GetProperty("").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("categories")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("categories")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("categories")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("categories")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("examples")[0].ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("usage").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Glossary_GetDetailed_AllParameters_Convenience() + public async Task Example_Glossary_Delete_GlossaryDelete_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); - - Response response = client.GetDetailed(""); - } + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_GetDetailed_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + Response response = await client.DeleteAsync("c0c54153-13d1-1608-13af-43457cdffe75"); - Response response = await client.GetDetailedAsync(""); + Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Glossary_PartialUpdate_ShortVersion() + public void Example_Glossary_GetCategories_GlossaryListCategories() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - using RequestContent content = RequestContent.Create(new - { - key = "", - }); - Response response = client.PartialUpdate("", content); + Response response = client.GetCategories("c018ddaf-7c21-4b37-a838-dae5f110c3d8", null, null, "ASC", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_PartialUpdate_ShortVersion_Async() + public async Task Example_Glossary_GetCategories_GlossaryListCategories_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - using RequestContent content = RequestContent.Create(new - { - key = "", - }); - Response response = await client.PartialUpdateAsync("", content); + Response response = await client.GetCategoriesAsync("c018ddaf-7c21-4b37-a838-dae5f110c3d8", null, null, "ASC", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Glossary_PartialUpdate_ShortVersion_Convenience() + public void Example_Glossary_GetCategories_GlossaryListCategories_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - Response response = client.PartialUpdate("", new Dictionary - { - ["key"] = "" - }); + Response> response = client.GetCategories("c018ddaf-7c21-4b37-a838-dae5f110c3d8"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_PartialUpdate_ShortVersion_Convenience_Async() + public async Task Example_Glossary_GetCategories_GlossaryListCategories_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - Response response = await client.PartialUpdateAsync("", new Dictionary - { - ["key"] = "" - }); + Response> response = await client.GetCategoriesAsync("c018ddaf-7c21-4b37-a838-dae5f110c3d8"); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Glossary_PartialUpdate_AllParameters() + public void Example_Glossary_GetCategoriesHeaders_GlossaryListCategoriesHeaders() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - using RequestContent content = RequestContent.Create(new - { - key = "", - }); - Response response = client.PartialUpdate("", content, ignoreTermsAndCategories: true); + Response response = client.GetCategoriesHeaders("c018ddaf-7c21-4b37-a838-dae5f110c3d8", null, null, "ASC", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("longDescription").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("qualifiedName").ToString()); - Console.WriteLine(result.GetProperty("shortDescription").ToString()); - Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("createTime").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("updateTime").ToString()); - Console.WriteLine(result.GetProperty("updatedBy").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("parentCategoryGuid").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("language").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("usage").ToString()); + Console.WriteLine(result[0].ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_PartialUpdate_AllParameters_Async() + public async Task Example_Glossary_GetCategoriesHeaders_GlossaryListCategoriesHeaders_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - using RequestContent content = RequestContent.Create(new - { - key = "", - }); - Response response = await client.PartialUpdateAsync("", content, ignoreTermsAndCategories: true); + Response response = await client.GetCategoriesHeadersAsync("c018ddaf-7c21-4b37-a838-dae5f110c3d8", null, null, "ASC", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("longDescription").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("qualifiedName").ToString()); - Console.WriteLine(result.GetProperty("shortDescription").ToString()); - Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("createTime").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("updateTime").ToString()); - Console.WriteLine(result.GetProperty("updatedBy").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("parentCategoryGuid").ToString()); - Console.WriteLine(result.GetProperty("categories")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("language").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("terms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("usage").ToString()); + Console.WriteLine(result[0].ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Glossary_PartialUpdate_AllParameters_Convenience() + public void Example_Glossary_GetCategoriesHeaders_GlossaryListCategoriesHeaders_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - Response response = client.PartialUpdate("", new Dictionary - { - ["key"] = "" - }, ignoreTermsAndCategories: true); + Response> response = client.GetCategoriesHeaders("c018ddaf-7c21-4b37-a838-dae5f110c3d8"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_PartialUpdate_AllParameters_Convenience_Async() + public async Task Example_Glossary_GetCategoriesHeaders_GlossaryListCategoriesHeaders_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - Response response = await client.PartialUpdateAsync("", new Dictionary - { - ["key"] = "" - }, ignoreTermsAndCategories: true); + Response> response = await client.GetCategoriesHeadersAsync("c018ddaf-7c21-4b37-a838-dae5f110c3d8"); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Glossary_GetTerms_ShortVersion() + public void Example_Glossary_GetDetailed_GlossaryGetDetailed() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - Response response = client.GetTerms("", null, null, null, null); + Response response = client.GetDetailed("c018ddaf-7c21-4b37-a838-dae5f110c3d8", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_GetTerms_ShortVersion_Async() + public async Task Example_Glossary_GetDetailed_GlossaryGetDetailed_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - Response response = await client.GetTermsAsync("", null, null, null, null); + Response response = await client.GetDetailedAsync("c018ddaf-7c21-4b37-a838-dae5f110c3d8", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Glossary_GetTerms_ShortVersion_Convenience() + public void Example_Glossary_GetDetailed_GlossaryGetDetailed_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - Response> response = client.GetTerms(""); + Response response = client.GetDetailed("c018ddaf-7c21-4b37-a838-dae5f110c3d8"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_GetTerms_ShortVersion_Convenience_Async() + public async Task Example_Glossary_GetDetailed_GlossaryGetDetailed_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - Response> response = await client.GetTermsAsync(""); + Response response = await client.GetDetailedAsync("c018ddaf-7c21-4b37-a838-dae5f110c3d8"); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Glossary_GetTerms_AllParameters() + public void Example_Glossary_PartialUpdate_GlossaryPartialUpdate() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - Response response = client.GetTerms("", 1234, 1234, "", null); + using RequestContent content = RequestContent.Create(new + { + longDescription = "Example Long Description", + }); + Response response = client.PartialUpdate("c018ddaf-7c21-4b37-a838-dae5f110c3d8", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result[0].GetProperty("guid").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result[0].GetProperty("longDescription").ToString()); - Console.WriteLine(result[0].GetProperty("name").ToString()); - Console.WriteLine(result[0].GetProperty("qualifiedName").ToString()); - Console.WriteLine(result[0].GetProperty("shortDescription").ToString()); - Console.WriteLine(result[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result[0].GetProperty("createTime").ToString()); - Console.WriteLine(result[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result[0].GetProperty("updateTime").ToString()); - Console.WriteLine(result[0].GetProperty("updatedBy").ToString()); - Console.WriteLine(result[0].GetProperty("abbreviation").ToString()); - Console.WriteLine(result[0].GetProperty("templateName")[0].ToString()); - Console.WriteLine(result[0].GetProperty("anchor").GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("anchor").GetProperty("glossaryGuid").ToString()); - Console.WriteLine(result[0].GetProperty("anchor").GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("nickName").ToString()); - Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("guid").ToString()); - Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); - Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("name").ToString()); - Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("itemPath").ToString()); - Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("resourceId").ToString()); - Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("properties").GetProperty("").ToString()); - Console.WriteLine(result[0].GetProperty("resources")[0].GetProperty("displayName").ToString()); - Console.WriteLine(result[0].GetProperty("resources")[0].GetProperty("url").ToString()); - Console.WriteLine(result[0].GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); - Console.WriteLine(result[0].GetProperty("attributes").GetProperty("").GetProperty("").ToString()); - Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); - Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); - Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); - Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); - Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); - Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); - Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); - Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("expression").ToString()); - Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("steward").ToString()); - Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result[0].GetProperty("examples")[0].ToString()); - Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("expression").ToString()); - Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("steward").ToString()); - Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("expression").ToString()); - Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("steward").ToString()); - Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("expression").ToString()); - Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("steward").ToString()); - Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result[0].GetProperty("usage").ToString()); - Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("expression").ToString()); - Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("steward").ToString()); - Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("expression").ToString()); - Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("steward").ToString()); - Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_GetTerms_AllParameters_Async() + public async Task Example_Glossary_PartialUpdate_GlossaryPartialUpdate_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - Response response = await client.GetTermsAsync("", 1234, 1234, "", null); + using RequestContent content = RequestContent.Create(new + { + longDescription = "Example Long Description", + }); + Response response = await client.PartialUpdateAsync("c018ddaf-7c21-4b37-a838-dae5f110c3d8", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result[0].GetProperty("guid").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result[0].GetProperty("longDescription").ToString()); - Console.WriteLine(result[0].GetProperty("name").ToString()); - Console.WriteLine(result[0].GetProperty("qualifiedName").ToString()); - Console.WriteLine(result[0].GetProperty("shortDescription").ToString()); - Console.WriteLine(result[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result[0].GetProperty("createTime").ToString()); - Console.WriteLine(result[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result[0].GetProperty("updateTime").ToString()); - Console.WriteLine(result[0].GetProperty("updatedBy").ToString()); - Console.WriteLine(result[0].GetProperty("abbreviation").ToString()); - Console.WriteLine(result[0].GetProperty("templateName")[0].ToString()); - Console.WriteLine(result[0].GetProperty("anchor").GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("anchor").GetProperty("glossaryGuid").ToString()); - Console.WriteLine(result[0].GetProperty("anchor").GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("nickName").ToString()); - Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("guid").ToString()); - Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); - Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("name").ToString()); - Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("itemPath").ToString()); - Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("resourceId").ToString()); - Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("properties").GetProperty("").ToString()); - Console.WriteLine(result[0].GetProperty("resources")[0].GetProperty("displayName").ToString()); - Console.WriteLine(result[0].GetProperty("resources")[0].GetProperty("url").ToString()); - Console.WriteLine(result[0].GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); - Console.WriteLine(result[0].GetProperty("attributes").GetProperty("").GetProperty("").ToString()); - Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); - Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); - Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); - Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); - Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); - Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); - Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); - Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("expression").ToString()); - Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("steward").ToString()); - Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result[0].GetProperty("examples")[0].ToString()); - Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("expression").ToString()); - Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("steward").ToString()); - Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("expression").ToString()); - Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("steward").ToString()); - Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("expression").ToString()); - Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("steward").ToString()); - Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result[0].GetProperty("usage").ToString()); - Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("expression").ToString()); - Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("steward").ToString()); - Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("expression").ToString()); - Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("steward").ToString()); - Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Glossary_GetTerms_AllParameters_Convenience() + public void Example_Glossary_PartialUpdate_GlossaryPartialUpdate_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - Response> response = client.GetTerms("", limit: 1234, offset: 1234, sort: ""); + Response response = client.PartialUpdate("c018ddaf-7c21-4b37-a838-dae5f110c3d8", new Dictionary + { + ["longDescription"] = "Example Long Description" + }); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_GetTerms_AllParameters_Convenience_Async() + public async Task Example_Glossary_PartialUpdate_GlossaryPartialUpdate_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); - Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - Response> response = await client.GetTermsAsync("", limit: 1234, offset: 1234, sort: ""); + Response response = await client.PartialUpdateAsync("c018ddaf-7c21-4b37-a838-dae5f110c3d8", new Dictionary + { + ["longDescription"] = "Example Long Description" + }); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Glossary_GetTermHeaders_ShortVersion() + public void Example_Glossary_GetTerms_GlossaryListTerms() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - Response response = client.GetTermHeaders("", null, null, null, null); + Response response = client.GetTerms("c018ddaf-7c21-4b37-a838-dae5f110c3d8", null, null, "ASC", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].ToString()); @@ -9293,13 +2537,13 @@ public void Example_Glossary_GetTermHeaders_ShortVersion() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_GetTermHeaders_ShortVersion_Async() + public async Task Example_Glossary_GetTerms_GlossaryListTerms_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - Response response = await client.GetTermHeadersAsync("", null, null, null, null); + Response response = await client.GetTermsAsync("c018ddaf-7c21-4b37-a838-dae5f110c3d8", null, null, "ASC", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].ToString()); @@ -9307,86 +2551,74 @@ public async Task Example_Glossary_GetTermHeaders_ShortVersion_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Glossary_GetTermHeaders_ShortVersion_Convenience() + public void Example_Glossary_GetTerms_GlossaryListTerms_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - Response> response = client.GetTermHeaders(""); + Response> response = client.GetTerms("c018ddaf-7c21-4b37-a838-dae5f110c3d8"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_GetTermHeaders_ShortVersion_Convenience_Async() + public async Task Example_Glossary_GetTerms_GlossaryListTerms_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - Response> response = await client.GetTermHeadersAsync(""); + Response> response = await client.GetTermsAsync("c018ddaf-7c21-4b37-a838-dae5f110c3d8"); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Glossary_GetTermHeaders_AllParameters() + public void Example_Glossary_GetTermHeaders_GlossaryListTermHeaders() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - Response response = client.GetTermHeaders("", 1234, 1234, "", null); + Response response = client.GetTermHeaders("c018ddaf-7c21-4b37-a838-dae5f110c3d8", null, null, "ASC", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("expression").ToString()); - Console.WriteLine(result[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("steward").ToString()); - Console.WriteLine(result[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result[0].ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_GetTermHeaders_AllParameters_Async() + public async Task Example_Glossary_GetTermHeaders_GlossaryListTermHeaders_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - Response response = await client.GetTermHeadersAsync("", 1234, 1234, "", null); + Response response = await client.GetTermHeadersAsync("c018ddaf-7c21-4b37-a838-dae5f110c3d8", null, null, "ASC", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("displayText").ToString()); - Console.WriteLine(result[0].GetProperty("expression").ToString()); - Console.WriteLine(result[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("steward").ToString()); - Console.WriteLine(result[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result[0].ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Glossary_GetTermHeaders_AllParameters_Convenience() + public void Example_Glossary_GetTermHeaders_GlossaryListTermHeaders_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - Response> response = client.GetTermHeaders("", limit: 1234, offset: 1234, sort: ""); + Response> response = client.GetTermHeaders("c018ddaf-7c21-4b37-a838-dae5f110c3d8"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_GetTermHeaders_AllParameters_Convenience_Async() + public async Task Example_Glossary_GetTermHeaders_GlossaryListTermHeaders_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - Response> response = await client.GetTermHeadersAsync("", limit: 1234, offset: 1234, sort: ""); + Response> response = await client.GetTermHeadersAsync("c018ddaf-7c21-4b37-a838-dae5f110c3d8"); } } } diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/tests/Generated/Samples/Samples_Lineage.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/tests/Generated/Samples/Samples_Lineage.cs index 37004d3d5cd5..f588c40a0df0 100644 --- a/sdk/purview/Azure.Analytics.Purview.DataMap/tests/Generated/Samples/Samples_Lineage.cs +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/tests/Generated/Samples/Samples_Lineage.cs @@ -18,13 +18,13 @@ public partial class Samples_Lineage { [Test] [Ignore("Only validating compilation of examples")] - public void Example_Lineage_GetLineage_ShortVersion() + public void Example_Lineage_GetLineage_LineageGet() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(); - Response response = client.GetLineage("", "INPUT"); + Response response = client.GetLineage("a6894eb3-81f3-829b-2adc-52f3e603411a", "INPUT"); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -32,13 +32,13 @@ public void Example_Lineage_GetLineage_ShortVersion() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Lineage_GetLineage_ShortVersion_Async() + public async Task Example_Lineage_GetLineage_LineageGet_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(); - Response response = await client.GetLineageAsync("", "INPUT"); + Response response = await client.GetLineageAsync("a6894eb3-81f3-829b-2adc-52f3e603411a", "INPUT"); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -46,163 +46,35 @@ public async Task Example_Lineage_GetLineage_ShortVersion_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Lineage_GetLineage_ShortVersion_Convenience() + public void Example_Lineage_GetLineage_LineageGet_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(); - Response response = client.GetLineage("", LineageDirection.Input); + Response response = client.GetLineage("a6894eb3-81f3-829b-2adc-52f3e603411a", LineageDirection.Input); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Lineage_GetLineage_ShortVersion_Convenience_Async() + public async Task Example_Lineage_GetLineage_LineageGet_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(); - Response response = await client.GetLineageAsync("", LineageDirection.Input); + Response response = await client.GetLineageAsync("a6894eb3-81f3-829b-2adc-52f3e603411a", LineageDirection.Input); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Lineage_GetLineage_AllParameters() + public void Example_Lineage_GetNextPage_LineageGetNextPage() { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(); - - Response response = client.GetLineage("", "INPUT", depth: 1234); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("baseEntityGuid").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classificationNames")[0].ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meaningNames")[0].ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("widthCounts").GetProperty("").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("lineageDepth").ToString()); - Console.WriteLine(result.GetProperty("lineageWidth").ToString()); - Console.WriteLine(result.GetProperty("childrenCount").ToString()); - Console.WriteLine(result.GetProperty("lineageDirection").ToString()); - Console.WriteLine(result.GetProperty("parentRelations")[0].GetProperty("childEntityId").ToString()); - Console.WriteLine(result.GetProperty("parentRelations")[0].GetProperty("relationshipId").ToString()); - Console.WriteLine(result.GetProperty("parentRelations")[0].GetProperty("parentEntityId").ToString()); - Console.WriteLine(result.GetProperty("relations")[0].GetProperty("fromEntityId").ToString()); - Console.WriteLine(result.GetProperty("relations")[0].GetProperty("relationshipId").ToString()); - Console.WriteLine(result.GetProperty("relations")[0].GetProperty("toEntityId").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Lineage_GetLineage_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(); - - Response response = await client.GetLineageAsync("", "INPUT", depth: 1234); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("baseEntityGuid").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classificationNames")[0].ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meaningNames")[0].ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("widthCounts").GetProperty("").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("lineageDepth").ToString()); - Console.WriteLine(result.GetProperty("lineageWidth").ToString()); - Console.WriteLine(result.GetProperty("childrenCount").ToString()); - Console.WriteLine(result.GetProperty("lineageDirection").ToString()); - Console.WriteLine(result.GetProperty("parentRelations")[0].GetProperty("childEntityId").ToString()); - Console.WriteLine(result.GetProperty("parentRelations")[0].GetProperty("relationshipId").ToString()); - Console.WriteLine(result.GetProperty("parentRelations")[0].GetProperty("parentEntityId").ToString()); - Console.WriteLine(result.GetProperty("relations")[0].GetProperty("fromEntityId").ToString()); - Console.WriteLine(result.GetProperty("relations")[0].GetProperty("relationshipId").ToString()); - Console.WriteLine(result.GetProperty("relations")[0].GetProperty("toEntityId").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Lineage_GetLineage_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(); - - Response response = client.GetLineage("", LineageDirection.Input, depth: 1234); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Lineage_GetLineage_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(); - - Response response = await client.GetLineageAsync("", LineageDirection.Input, depth: 1234); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Lineage_GetNextPage_ShortVersion() - { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(apiVersion: "2023-09-01"); - Response response = client.GetNextPage("", "INPUT"); + Response response = client.GetNextPage("a6894eb3-81f3-829b-2adc-52f3e603411a", "INPUT"); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -210,13 +82,13 @@ public void Example_Lineage_GetNextPage_ShortVersion() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Lineage_GetNextPage_ShortVersion_Async() + public async Task Example_Lineage_GetNextPage_LineageGetNextPage_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(apiVersion: "2023-09-01"); - Response response = await client.GetNextPageAsync("", "INPUT"); + Response response = await client.GetNextPageAsync("a6894eb3-81f3-829b-2adc-52f3e603411a", "INPUT"); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -224,163 +96,35 @@ public async Task Example_Lineage_GetNextPage_ShortVersion_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Lineage_GetNextPage_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(apiVersion: "2023-09-01"); - - Response response = client.GetNextPage("", LineageDirection.Input); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Lineage_GetNextPage_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(apiVersion: "2023-09-01"); - - Response response = await client.GetNextPageAsync("", LineageDirection.Input); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Lineage_GetNextPage_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(apiVersion: "2023-09-01"); - - Response response = client.GetNextPage("", "INPUT", offset: 1234, limit: 1234); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("baseEntityGuid").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classificationNames")[0].ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meaningNames")[0].ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("widthCounts").GetProperty("").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("lineageDepth").ToString()); - Console.WriteLine(result.GetProperty("lineageWidth").ToString()); - Console.WriteLine(result.GetProperty("childrenCount").ToString()); - Console.WriteLine(result.GetProperty("lineageDirection").ToString()); - Console.WriteLine(result.GetProperty("parentRelations")[0].GetProperty("childEntityId").ToString()); - Console.WriteLine(result.GetProperty("parentRelations")[0].GetProperty("relationshipId").ToString()); - Console.WriteLine(result.GetProperty("parentRelations")[0].GetProperty("parentEntityId").ToString()); - Console.WriteLine(result.GetProperty("relations")[0].GetProperty("fromEntityId").ToString()); - Console.WriteLine(result.GetProperty("relations")[0].GetProperty("relationshipId").ToString()); - Console.WriteLine(result.GetProperty("relations")[0].GetProperty("toEntityId").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Lineage_GetNextPage_AllParameters_Async() + public void Example_Lineage_GetNextPage_LineageGetNextPage_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(apiVersion: "2023-09-01"); - Response response = await client.GetNextPageAsync("", "INPUT", offset: 1234, limit: 1234); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("baseEntityGuid").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classificationNames")[0].ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meaningNames")[0].ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("widthCounts").GetProperty("").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("lineageDepth").ToString()); - Console.WriteLine(result.GetProperty("lineageWidth").ToString()); - Console.WriteLine(result.GetProperty("childrenCount").ToString()); - Console.WriteLine(result.GetProperty("lineageDirection").ToString()); - Console.WriteLine(result.GetProperty("parentRelations")[0].GetProperty("childEntityId").ToString()); - Console.WriteLine(result.GetProperty("parentRelations")[0].GetProperty("relationshipId").ToString()); - Console.WriteLine(result.GetProperty("parentRelations")[0].GetProperty("parentEntityId").ToString()); - Console.WriteLine(result.GetProperty("relations")[0].GetProperty("fromEntityId").ToString()); - Console.WriteLine(result.GetProperty("relations")[0].GetProperty("relationshipId").ToString()); - Console.WriteLine(result.GetProperty("relations")[0].GetProperty("toEntityId").ToString()); + Response response = client.GetNextPage("a6894eb3-81f3-829b-2adc-52f3e603411a", LineageDirection.Input); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Lineage_GetNextPage_AllParameters_Convenience() + public async Task Example_Lineage_GetNextPage_LineageGetNextPage_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(apiVersion: "2023-09-01"); - Response response = client.GetNextPage("", LineageDirection.Input, offset: 1234, limit: 1234); + Response response = await client.GetNextPageAsync("a6894eb3-81f3-829b-2adc-52f3e603411a", LineageDirection.Input); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Lineage_GetNextPage_AllParameters_Convenience_Async() + public void Example_Lineage_GetByUniqueAttribute_LineageGetByUniqueAttribute() { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(apiVersion: "2023-09-01"); - - Response response = await client.GetNextPageAsync("", LineageDirection.Input, offset: 1234, limit: 1234); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Lineage_GetByUniqueAttribute_ShortVersion() - { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(); - Response response = client.GetByUniqueAttribute("", "INPUT"); + Response response = client.GetByUniqueAttribute("azure_blob_path", "BOTH"); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -388,13 +132,13 @@ public void Example_Lineage_GetByUniqueAttribute_ShortVersion() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Lineage_GetByUniqueAttribute_ShortVersion_Async() + public async Task Example_Lineage_GetByUniqueAttribute_LineageGetByUniqueAttribute_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(); - Response response = await client.GetByUniqueAttributeAsync("", "INPUT"); + Response response = await client.GetByUniqueAttributeAsync("azure_blob_path", "BOTH"); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -402,152 +146,24 @@ public async Task Example_Lineage_GetByUniqueAttribute_ShortVersion_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Lineage_GetByUniqueAttribute_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(); - - Response response = client.GetByUniqueAttribute("", LineageDirection.Input); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Lineage_GetByUniqueAttribute_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(); - - Response response = await client.GetByUniqueAttributeAsync("", LineageDirection.Input); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Lineage_GetByUniqueAttribute_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(); - - Response response = client.GetByUniqueAttribute("", "INPUT", depth: 1234, attribute: ""); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("baseEntityGuid").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classificationNames")[0].ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meaningNames")[0].ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("widthCounts").GetProperty("").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("lineageDepth").ToString()); - Console.WriteLine(result.GetProperty("lineageWidth").ToString()); - Console.WriteLine(result.GetProperty("childrenCount").ToString()); - Console.WriteLine(result.GetProperty("lineageDirection").ToString()); - Console.WriteLine(result.GetProperty("parentRelations")[0].GetProperty("childEntityId").ToString()); - Console.WriteLine(result.GetProperty("parentRelations")[0].GetProperty("relationshipId").ToString()); - Console.WriteLine(result.GetProperty("parentRelations")[0].GetProperty("parentEntityId").ToString()); - Console.WriteLine(result.GetProperty("relations")[0].GetProperty("fromEntityId").ToString()); - Console.WriteLine(result.GetProperty("relations")[0].GetProperty("relationshipId").ToString()); - Console.WriteLine(result.GetProperty("relations")[0].GetProperty("toEntityId").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Lineage_GetByUniqueAttribute_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(); - - Response response = await client.GetByUniqueAttributeAsync("", "INPUT", depth: 1234, attribute: ""); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("baseEntityGuid").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classificationNames")[0].ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meaningNames")[0].ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("widthCounts").GetProperty("").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("lineageDepth").ToString()); - Console.WriteLine(result.GetProperty("lineageWidth").ToString()); - Console.WriteLine(result.GetProperty("childrenCount").ToString()); - Console.WriteLine(result.GetProperty("lineageDirection").ToString()); - Console.WriteLine(result.GetProperty("parentRelations")[0].GetProperty("childEntityId").ToString()); - Console.WriteLine(result.GetProperty("parentRelations")[0].GetProperty("relationshipId").ToString()); - Console.WriteLine(result.GetProperty("parentRelations")[0].GetProperty("parentEntityId").ToString()); - Console.WriteLine(result.GetProperty("relations")[0].GetProperty("fromEntityId").ToString()); - Console.WriteLine(result.GetProperty("relations")[0].GetProperty("relationshipId").ToString()); - Console.WriteLine(result.GetProperty("relations")[0].GetProperty("toEntityId").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Lineage_GetByUniqueAttribute_AllParameters_Convenience() + public void Example_Lineage_GetByUniqueAttribute_LineageGetByUniqueAttribute_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(); - Response response = client.GetByUniqueAttribute("", LineageDirection.Input, depth: 1234, attribute: ""); + Response response = client.GetByUniqueAttribute("azure_blob_path", LineageDirection.Both); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Lineage_GetByUniqueAttribute_AllParameters_Convenience_Async() + public async Task Example_Lineage_GetByUniqueAttribute_LineageGetByUniqueAttribute_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(); - Response response = await client.GetByUniqueAttributeAsync("", LineageDirection.Input, depth: 1234, attribute: ""); + Response response = await client.GetByUniqueAttributeAsync("azure_blob_path", LineageDirection.Both); } } } diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/tests/Generated/Samples/Samples_Relationship.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/tests/Generated/Samples/Samples_Relationship.cs index 99462b921aed..367686d43ce3 100644 --- a/sdk/purview/Azure.Analytics.Purview.DataMap/tests/Generated/Samples/Samples_Relationship.cs +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/tests/Generated/Samples/Samples_Relationship.cs @@ -18,183 +18,87 @@ public partial class Samples_Relationship { [Test] [Ignore("Only validating compilation of examples")] - public void Example_Relationship_Create_ShortVersion() + public void Example_Relationship_Create_RelationshipCreate() { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); - - using RequestContent content = RequestContent.Create(new object()); - Response response = client.Create(content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Relationship_Create_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); - - using RequestContent content = RequestContent.Create(new object()); - Response response = await client.CreateAsync(content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Relationship_Create_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); - - AtlasRelationship body = new AtlasRelationship(); - Response response = client.Create(body); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Relationship_Create_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); - - AtlasRelationship body = new AtlasRelationship(); - Response response = await client.CreateAsync(body); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Relationship_Create_AllParameters() - { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); using RequestContent content = RequestContent.Create(new { + typeName = "AtlasGlossarySynonym", attributes = new { - key = new object(), + expression = "Example Expression", + steward = "Example Steward", + description = "Example Description", }, - typeName = "", - lastModifiedTS = "", - createTime = 1234L, - createdBy = "", end1 = new { - guid = "", - typeName = "", - uniqueAttributes = new - { - key = new object(), - }, + guid = "856d31e6-e342-a1ce-6273-22ddb77029c6", + typeName = "AtlasGlossaryTerm", }, - guid = "", - homeId = "", - label = "